> On May 20, 2014, 11:04 a.m., Philip (flip) Kromer wrote:
> > datafu-pig/src/main/java/datafu/pig/maps/ContainAllKeys.java, line 43
> > <https://reviews.apache.org/r/21306/diff/1/?file=578205#file578205line43>
> >
> >     I think here (and for ContainsAnyKey) I'd prefer it considered a bag of 
> > keys rather than an inline tuple of keys. This would let me test an 
> > arbitrary number of values rather than a fixed number.

This is a good point.  Then the syntax would be like this:

 has_all_cheap_cars = FILTER cars BY ContainAllKeys(price, TOBAG('rolly-royce', 
'chevolet'));

This does seem cleaner to me.

One nice thing about this syntax is that you could have a bag in the relation, 
one that is different for each record:

 has_all_cheap_cars = FILTER cars BY ContainAllKeys(price, bag_of_cars);


- Matthew


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21306/#review43474
-----------------------------------------------------------


On May 11, 2014, 12:42 p.m., wang jian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21306/
> -----------------------------------------------------------
> 
> (Updated May 11, 2014, 12:42 p.m.)
> 
> 
> Review request for DataFu.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/DATAFU-34
>     
> https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/DATAFU-34
> 
> 
> Repository: datafu
> 
> 
> Description
> -------
> 
> Add UDFs to handle map type data.
> 
> Unit tests done.
> 
> One thing left over: validate the byte array output from map
> 
> 
> Diffs
> -----
> 
>   datafu-pig/src/main/java/datafu/pig/maps/BagToMap.java PRE-CREATION 
>   datafu-pig/src/main/java/datafu/pig/maps/ContainAllKeys.java PRE-CREATION 
>   datafu-pig/src/main/java/datafu/pig/maps/ContainAnyKey.java PRE-CREATION 
>   datafu-pig/src/main/java/datafu/pig/maps/ContainKeys.java PRE-CREATION 
>   datafu-pig/src/main/java/datafu/pig/maps/MapToBag.java PRE-CREATION 
>   datafu-pig/src/main/java/datafu/pig/maps/PutToMap.java PRE-CREATION 
>   datafu-pig/src/test/java/datafu/test/pig/maps/MapTests.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21306/diff/
> 
> 
> Testing
> -------
> 
> ues
> 
> 
> Thanks,
> 
> wang jian
> 
>

Reply via email to