[
https://issues.apache.org/jira/browse/PIG-2303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Graham Lea reopened PIG-2303:
-----------------------------
I don't believe I'm using any string concatenation, unless this is happening
under the hood without my knowledge.
Here's a simple script showing what I described:
{code}
$ bin/pig
2011-09-27 09:01:26,411 [main] INFO org.apache.pig.Main - Logging error
messages to: /home/development/pig-0.8.1-cdh3u1/pig_1317078086408.log
2011-09-27 09:01:26,592 [main] INFO
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to
hadoop file system at: hdfs://localhost:9000
2011-09-27 09:01:26,751 [main] INFO
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to
map-reduce job tracker at: localhost:9001
grunt> A = LOAD 'clientInvoiceIds' AS (clientId:int, invoiceMonth:chararray);
grunt> B = GROUP A BY clientId;
grunt> describe B
B: {group: int,A: {clientId: int,invoiceMonth: chararray}}
grunt> C = FOREACH B GENERATE group, MIN(A.invoiceMonth) as
firstMonth:chararray, MAX(A.invoiceMonth) as lastMonth:chararray;
2011-09-27 09:01:45,992 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR
1022: Type mismatch merging schema prefix. Field Schema: double. Other Field
Schema: firstMonth: chararray
Details at logfile: /home/development/pig-0.8.1-cdh3u1/pig_1317078086408.log
{code}
> 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