[
https://issues.apache.org/jira/browse/PIG-2000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022566#comment-13022566
]
Xuefu Zhang commented on PIG-2000:
----------------------------------
The expected behavior specified above is not accurate. After discussing with
Thejas, it's found that this is valid use case. Unfortunately, we had issues in
both 0.8 and 0.9. The patch provided above fixes the issue in 0.9. With it,
scalar project in form of "A.x.y" is supported.
Fix for 0.8 would require a different patch.
> Pig gives incorrect error message dealing with scalar projection
> ----------------------------------------------------------------
>
> Key: PIG-2000
> URL: https://issues.apache.org/jira/browse/PIG-2000
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.0, 0.9.0
> Reporter: Xuefu Zhang
> Assignee: Xuefu Zhang
> Fix For: 0.9.0
>
> Attachments: PIG-2000.patch
>
>
> For the following query:
> A = load 'x' as (u:tuple(x,y),v);
> B = load 'y';
> C = foreach B generate $0, A.u.x;
> error msg in 0.8:
> ERROR 1000: Error during parsing. Invalid alias: x in {u: (x: bytearray,y:
> bytearray),v: bytearray}
> error msg in 0.9:
> ERROR 1200: Pig script failed to parse: <line 4, column 27> Invalid scalar
> projection: A
> Both messages are not clear enough. For scalar support, we only support one
> level, which gives a syntax of R.f format.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira