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

Russell Jurney commented on PIG-1420:
-------------------------------------

I just ran into this.  I assume it is still broken?  Man, I suck.

grunt> metrics = foreach enrons generate CONCAT('ISODate(', datetime, ')');
2012-05-16 22:24:02,276 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
1045: 
<line 4, column 34> Could not infer the matching function for 
org.apache.pig.builtin.CONCAT as multiple or none of them fit. Please use an 
explicit cast.
2012-05-16 22:24:02,277 [main] ERROR org.apache.pig.tools.grunt.Grunt - 
org.apache.pig.impl.logicalLayer.validators.TypeCheckerException: ERROR 1059: 
<line 4, column 10> Problem while reconciling output schema of ForEach

                
> Make CONCAT act on all fields of a tuple, instead of just the first two 
> fields of a tuple
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-1420
>                 URL: https://issues.apache.org/jira/browse/PIG-1420
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Russell Jurney
>            Assignee: Russell Jurney
>              Labels: five, high
>             Fix For: 0.8.0
>
>         Attachments: PIG-1420.2.patch, addconcat2.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> org.apache.pig.builtin.CONCAT (which acts on DataByteArray's internally) and 
> org.apache.pig.builtin.StringConcat (which acts on Strings internally), both 
> act on the first two fields of a tuple.  This results in ugly nested CONCAT 
> calls like:
> CONCAT(CONCAT(A, ' '), B)
> The more desirable form is:
> CONCAT(A, ' ', B)
> This change will be backwards compatible, provided that no one was relying on 
> the fact that CONCAT ignores fields after the first two in a tuple.  This 
> seems a reasonable assumption to make, or at least a small break in 
> compatibility for a sizable improvement.

--
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