hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Gates (JIRA)" <j...@apache.org>
Subject [jira] Created: (PIG-1663) Order by only allows ordering on columns, not expressions
Date Fri, 01 Oct 2010 21:17:33 GMT
Order by only allows ordering on columns, not expressions
---------------------------------------------------------

                 Key: PIG-1663
                 URL: https://issues.apache.org/jira/browse/PIG-1663
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.7.0
            Reporter: Alan Gates
            Assignee: Xuefu Zhang
            Priority: Minor
             Fix For: 0.9.0


Currently the following Pig Latin will fail:

{code}
A = LOAD '/Users/gates/test/data/studenttab10' as (name, age, gpa);
B = order A by (int)age;
dump B;
{code}

with an error message
{code}
ERROR 1000: Error during parsing. Encountered " "int" "int "" at line 2, column 17.
Was expecting one of:
    <IDENTIFIER> ...
    <DOLLARVAR> ...
{code}

The issue is because Pig expects a column not an expression for Order By.  If the cast is
removed, the script passes.  Order by should take an expression for its key, just as group,
join, etc. do.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message