[ 
https://issues.apache.org/jira/browse/PIG-2303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115014#comment-13115014
 ] 

Graham Lea commented on PIG-2303:
---------------------------------

>From the log file:
{noformat}
Pig Stack Trace
---------------
ERROR 1022: Type mismatch merging schema prefix. Field Schema: double. Other 
Field Schema: firstMonth: chararray

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during 
parsing. Type mismatch merging schema prefix. Field Schema: double. Other Field 
Schema: firstMonth: chararray
        at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1618)
        at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1562)
        at org.apache.pig.PigServer.registerQuery(PigServer.java:534)
        at 
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:871)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:388)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:168)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:144)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:76)
        at org.apache.pig.Main.run(Main.java:455)
        at org.apache.pig.Main.main(Main.java:107)
Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Problems in 
merging user defined schema
        at 
org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:853)
        at 
org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:63)
        at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1612)
        ... 9 more
Caused by: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1016: 
Problems in merging user defined schema
        at 
org.apache.pig.impl.logicalLayer.LOForEach.getSchema(LOForEach.java:337)
        at 
org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:851)
        ... 11 more
Caused by: org.apache.pig.impl.logicalLayer.schema.SchemaMergeException: ERROR 
1022: Type mismatch merging schema prefix. Field Schema: double. Other Field 
Schema: firstMonth: chararray
        at 
org.apache.pig.impl.logicalLayer.schema.Schema$FieldSchema.mergePrefixFieldSchema(Schema.java:550)
        at 
org.apache.pig.impl.logicalLayer.schema.Schema$FieldSchema.mergePrefixFieldSchema(Schema.java:474)
        at 
org.apache.pig.impl.logicalLayer.LOForEach.getSchema(LOForEach.java:332)
        ... 12 more
================================================================================
{noformat}
                
> Documentation says the MAX function can be used on chararray, but it can't
> --------------------------------------------------------------------------
>
>                 Key: PIG-2303
>                 URL: https://issues.apache.org/jira/browse/PIG-2303
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation
>            Reporter: Graham Lea
>            Priority: Trivial
>              Labels: documentation
>
> 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

        

Reply via email to