[ https://issues.apache.org/jira/browse/PIG-2303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115098#comment-13115098 ]
Daniel Dai commented on PIG-2303: --------------------------------- I still didn't see. I run this with success: {code} A = LOAD 'student.txt' USING PigStorage(',') AS (name:chararray, age:int, gpa:chararray); B = group A by age; C = foreach B generate MAX(A.name) as maxName: chararray; explain C; {code} describe C gives me: C: {maxName: chararray} I'm using Pig 0.9.0. > FOREACH doesn't allow explicit schema for MAX() result to be chararray > ---------------------------------------------------------------------- > > Key: PIG-2303 > URL: https://issues.apache.org/jira/browse/PIG-2303 > Project: Pig > Issue Type: Bug > Components: parser > Affects Versions: 0.9.0 > Reporter: Graham Lea > Priority: Trivial > > Here: http://pig.apache.org/docs/r0.9.0/func.html#max > It says MIN/Max can be used on chararray, but the result of those functions > is always a double. > Had to search through the Pig Javadoc to find that I should use > StringMin/StringMax instead. -- 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