Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2156

Limit/Sample with variable does not work if the expression starts with an integer/double

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Reviewed

    Description

      Pig generates an error with this script:

      grunt> a = load 'a.txt';                      
      grunt> b = group a all;                       
      grunt> c = foreach b generate COUNT(a) as sum;
      grunt> d = limit a 1 * c.sum;  
      [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 4, column 14>  mismatched input '*' expecting SEMI_COLON
      

      The reason is the parser chooses the wrong alternative.

      Attachments

        1. PIG-2156.2.patch
          3 kB
          Gianmarco De Francisci Morales
        2. PIG-2156.patch
          2 kB
          Gianmarco De Francisci Morales

        Issue Links

          Activity

            People

              azaroth Gianmarco De Francisci Morales
              azaroth Gianmarco De Francisci Morales
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: