[
https://issues.apache.org/jira/browse/PIG-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Olga Natkovich updated PIG-1663:
--------------------------------
Fix Version/s: (was: 0.10)
> 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
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira