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

Carlos Balduz commented on PIG-4517:
------------------------------------

No no, I meant something to avoid using multiple CONCATs to join several fields 
in a relation (but not necessarily in a tuple). For instance:

{code}
B = foreach A generate CONCAT(CONCAT(id_user, '-'), username);
{code}

Sometimes I want to concatenate two different fields of a relationship using a 
custom delimiter, and I have to perform a double CONCAT. They are not in a 
tuple or in a bag, so there is nothing else I can do. Being able to do 
something like CONCAT_MULTIPLE(field1, '-', field2) would be nice, although 
it's not a very important or useful feature. If someone else thinks it would be 
helpful I can write it myself.

> builtin UDF for mass concat of strings
> --------------------------------------
>
>                 Key: PIG-4517
>                 URL: https://issues.apache.org/jira/browse/PIG-4517
>             Project: Pig
>          Issue Type: New Feature
>          Components: piggybank
>            Reporter: Pracheer Agarwal
>            Priority: Minor
>
> Right now we have CONCAT UDF which concatenate two strings. We don't have any 
> UDF for mass concatenation. The functionality of the proposed udf can be 
> exact reverse of STRSPLIT. 
> STRSPLIT take a string and a regex and return a tuple of strings. On the same 
> line MASSCONCAT can take a tuple and a delimeter as inputs and return a 
> string as output.
> Example:
> Inputs - (a,b,c,d), "|"
> Output - a|b|c|d



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to