[jira] [Assigned] (PIG-4750) REPLACE_MULTI should compile Pattern once and reuse it
[ https://issues.apache.org/jira/browse/PIG-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao reassigned PIG-4750: --- Assignee: Murali Rao > REPLACE_MULTI should compile Pattern once and reuse it > -- > > Key: PIG-4750 > URL: https://issues.apache.org/jira/browse/PIG-4750 > Project: Pig > Issue Type: Improvement >Reporter: Rohini Palaniswamy >Assignee: Murali Rao > Labels: newbie > > Details in > https://issues.apache.org/jira/browse/PIG-4673?focusedCommentId=14876190&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14876190 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14876840#comment-14876840 ] Murali Rao commented on PIG-4673: - [~rohini] : Thanks for your inputs, will check on the performance and will take necessary actions. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Affects Versions: site >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > Labels: None > Fix For: 0.16.0 > > Attachments: PIG-4673-1.patch, replace_multi_udf.patch > > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') > > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14791312#comment-14791312 ] Murali Rao commented on PIG-4673: - [~daijy] : Thanks for the review. While committing the code to SVN, getting error as below. Plz. let me know how to get write access to repo. org.apache.subversion.javahl.ClientException: svn: E170001: Commit failed (details follow): svn: E170001: MKACTIVITY of '/repos/asf/!svn/act/0fb982d8-4f01-0010-a887-1302968552fb': 403 Forbidden ( http://svn.apache.org) > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Affects Versions: site >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > Labels: None > Fix For: site > > Attachments: PIG-4673-1.patch, replace_multi_udf.patch > > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') > > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14790765#comment-14790765 ] Murali Rao commented on PIG-4673: - [~daijy] : Attached patch, plz check and let me know your inputs. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Affects Versions: site >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > Labels: None > Fix For: site > > Attachments: replace_multi_udf.patch > > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') > > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Attachment: replace_multi_udf.patch Attaching patch for REPLACE_MULTI UDF. Path contains UDF and Test File. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Affects Versions: site >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > Labels: None > Fix For: site > > Attachments: replace_multi_udf.patch > > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') > > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14747063#comment-14747063 ] Murali Rao commented on PIG-4673: - [~daijy] : Have added a patch with UDF and test file for REPLACE_MULTI UDF. Plz. do review and let me know your inputs. Many Thanks. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Affects Versions: site >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > Labels: None > Fix For: site > > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') > > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Labels: None (was: ) Fix Version/s: site Release Note: Built In UDF - REPLACE_MULTI : Method which take a tuple having source string as first parameter and a map having search key and replacement values. Method will replace all occurrences of search key in source string with the replacement values. Affects Version/s: site Status: Patch Available (was: Open) Built In UDF - REPLACE_MULTI - Patch > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Affects Versions: site >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > Labels: None > Fix For: site > > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') > > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('A1B2C3D4','A','1'),'B','2'),'C','3'),'D','4') > > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI ( 'ABCD', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'A1B2C3D4', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI ( 'ABCD', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI ( 'abcd', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'ABCD', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI ( 'abcd', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI('abcd', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI ( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI ( 'abcd', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI('abcd', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI('abcd', [ 'A'#'1','B'#'2', 'C'#'3', 'D'#'4' ] ) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString, [search1#replacement1, ...] ) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI(String sourceString, [search1#replacement1, ...] ) > REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI( sourceString, [ search1#replacement1, ... ] ) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString, [search1#replacement1, ...] ) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI( sourceString, [ search1#replacement1, ... ] ) > REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') With proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') With Proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','A','1'),'B','2'),'C','3'),'D','4') > With proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) > REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 11223344 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') With Proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'ABCD'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 1234 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') With Proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'A1B2C3D4'. Our objective is to replace A with 1, > B with 2, C with 3 and D with 4 to derive 11223344 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') > With Proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) > REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
Murali Rao created PIG-4673: --- Summary: Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values. Key: PIG-4673 URL: https://issues.apache.org/jira/browse/PIG-4673 Project: Pig Issue Type: New Feature Components: piggybank Reporter: Murali Rao Assignee: Murali Rao Priority: Minor Lets say we have a string = 'ABCD'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 1234 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') With Proposed UDF : REPLACE_MULTI method General Syntax : MULTI_REPLACE(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (PIG-4673) Built In UDF - REPLACE_MULTI : For a given string, search and replace all occurrences of search keys with replacement values.
[ https://issues.apache.org/jira/browse/PIG-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Murali Rao updated PIG-4673: Description: Lets say we have a string = 'ABCD'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 1234 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') With Proposed UDF : REPLACE_MULTI method General Syntax : REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. was: Lets say we have a string = 'ABCD'. Our objective is to replace A with 1, B with 2, C with 3 and D with 4 to derive 1234 string. Using existing REPLACE method REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') With Proposed UDF : REPLACE_MULTI method General Syntax : MULTI_REPLACE(String sourceString,[search1#replacement1, ...]) REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) Advantage : 1. Function calls are reduced. 2. Ease to code and better readable. Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take this up based on this. > Built In UDF - REPLACE_MULTI : For a given string, search and replace all > occurrences of search keys with replacement values. > -- > > Key: PIG-4673 > URL: https://issues.apache.org/jira/browse/PIG-4673 > Project: Pig > Issue Type: New Feature > Components: piggybank >Reporter: Murali Rao >Assignee: Murali Rao >Priority: Minor > > Lets say we have a string = 'ABCD'. Our objective is to replace A with 1, B > with 2, C with 3 and D with 4 to derive 1234 string. > Using existing REPLACE method > REPLACE(REPLACE(REPLACE(REPLACE('ABCD','1'),'2'),'3'),'4') > With Proposed UDF : REPLACE_MULTI method > General Syntax : > REPLACE_MULTI(String sourceString,[search1#replacement1, ...]) > REPLACE_MULTI('abcd',['A'#'1','B'#'2', 'C'#'3', 'D'#'4']) > Advantage : > 1. Function calls are reduced. > 2. Ease to code and better readable. > > Let me know your thoughts/ inputs on having this UDF in Piggy Bank. Will take > this up based on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)