[
https://issues.apache.org/jira/browse/PIG-4511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joseph Babcock updated PIG-4511:
--------------------------------
Description:
Currently pluckTuple returns all columns in relation that match a prefix
predicate. This patch allows a boolean flag 'false' to specify that columns NOT
matching this prefix should be retained.
Example:
<source>
a = load 'a' as (x:int,y:chararray,z:long)
b = load 'b' as (x:int,y:chararray,z:long)
c = join a by x, b by x;
Define pluck PluckTuple('a::','false')
-- returns b
</source>
was:
Currently pluckTuple returns all columns in relation that match a prefix
predicate. This patch allows a variable argument list of column names following
the predicate to remove from the alias.
Example:
a = load 'a' as (x:int,y:chararray,z:long)
b = load 'b' as (x:int,y:chararray,z:long)
c = join a by x, b by x;
Define pluck PluckTuple('a::','x',z')
-- returns y from a only
> Add columns to prune from PluckTuple
> ------------------------------------
>
> Key: PIG-4511
> URL: https://issues.apache.org/jira/browse/PIG-4511
> Project: Pig
> Issue Type: Improvement
> Affects Versions: 0.14.0
> Reporter: Joseph Babcock
> Assignee: Joseph Babcock
> Priority: Minor
> Fix For: 0.15.0
>
> Attachments: pluckTuple.patch
>
>
> Currently pluckTuple returns all columns in relation that match a prefix
> predicate. This patch allows a boolean flag 'false' to specify that columns
> NOT matching this prefix should be retained.
> Example:
> <source>
> a = load 'a' as (x:int,y:chararray,z:long)
> b = load 'b' as (x:int,y:chararray,z:long)
> c = join a by x, b by x;
> Define pluck PluckTuple('a::','false')
> -- returns b
> </source>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)