[ https://issues.apache.org/jira/browse/PIG-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785463#action_12785463 ]
Yan Zhou commented on PIG-1121: ------------------------------- Zebra does not support positional reference of a column as PIG does with its $ symbol. Consequently, column name is the only way to refer to a column. Without it, the columns would be useless. > [zebre] zebra user forces pig script to have 'as xxx' in foreach statement in > order to be able to store successfully > -------------------------------------------------------------------------------------------------------------------- > > Key: PIG-1121 > URL: https://issues.apache.org/jira/browse/PIG-1121 > Project: Pig > Issue Type: Bug > Affects Versions: 0.6.0 > Reporter: Jing Huang > Fix For: 0.6.0 > > > In the following pig script, if user do > b = foreach a generate m1#'a' ; > describe b will be: > b: {bytearray} > zebra store will fail, since there is no name passed to zebra, and zebra not > only need type but also name in order to store. > ========= > If user do > b = foreach a generate m1#'a' as ms1; > describe b will be: > b: {ms1: bytearray} > Then zebra store can be succeeded. > ========= > Here is the full pig script. > register /grid/0/dev/hadoopqa/jars/zebra.jar; > a = load '1.txt' as (a:int, > b:float,c:long,d:double,e:chararray,f:bytearray,r1(f1:chararray,f2:chararray),m1:map[]); > b = foreach a generate m1#'a' as ms1; > describe b; > store b into 'map1' using org.apache.hadoop.zebra.pig.TableStorer(''); > ======== > So, we should either fix it or document it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.