[jira] [Comment Edited] (DATAFU-25) AliasableEvalFunc should use getInputSchema

2016-10-19 Thread Eyal Allweil (JIRA)

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

Eyal Allweil edited comment on DATAFU-25 at 10/19/16 6:01 PM:
--

This is a minimal fix that uses getInputSchema() instead of the udf context, 
when possible.

It will also solve [DATAFU-6|https://issues.apache.org/jira/browse/DATAFU-6], 
though not the example provided there - BagLeftOuterJoin. This is because 
MonitoredUDF prevents the udf context from working (see 
[PIG-3554|https://issues.apache.org/jira/browse/PIG-3554]), and BagJoin uses 
the udf context for other things, not just those that AliasableEvalFunc 
provides.

I couldn't think of a clean way of adding a test for this, but you can verify 
that it works by adding the MonitoredUDF annotation to TransposeTupleToBag - 
this will make the TransposeTest.transposeTest fail, unless my patch is used. I 
didn't want to expose a "fake" udf with the MonitoredUDF annotation, and adding 
it in the test package means that TransposeTest can't access it.


was (Author: eyal):
This is a minimal fix that uses getInputSchema() instead of the udf context, 
when possible.

It will also solve [DATAFU-6|https://issues.apache.org/jira/browse/DATAFU-6], 
though not the example provided there - BagLeftOuterJoin. This is because 
MonitoredUDF prevents the udf context from working (see 
[PIG-3554|https://issues.apache.org/jira/browse/PIG-3554], and BagJoin uses the 
udf context for other things, not just those that AliasableEvalFunc provides.

I couldn't think of a clean way of adding a test for this, but you can verify 
that it works by adding the MonitoredUDF annotation to TransposeTupleToBag - 
this will make the TransposeTest.transposeTest fail, unless my patch is used. I 
didn't want to expose a "fake" udf with the MonitoredUDF annotation, and adding 
it in the test package means that TransposeTest can't access it.

> AliasableEvalFunc should use getInputSchema
> ---
>
> Key: DATAFU-25
> URL: https://issues.apache.org/jira/browse/DATAFU-25
> Project: DataFu
>  Issue Type: Improvement
>Reporter: Matthew Hayes
>Assignee: Will Vaughan
> Attachments: DATAFU-25.patch
>
>
> AliasableEvalFunc derives from ContextualEvalFunc and stores a map of aliases 
> in the UDF context.  We can instead use getInputSchema, which was added to 
> Pig 0.11.  This may in the process resolve DATAFU-6.



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


[jira] [Assigned] (DATAFU-25) AliasableEvalFunc should use getInputSchema

2016-10-19 Thread Eyal Allweil (JIRA)

 [ 
https://issues.apache.org/jira/browse/DATAFU-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eyal Allweil reassigned DATAFU-25:
--

Assignee: Eyal Allweil  (was: Will Vaughan)

> AliasableEvalFunc should use getInputSchema
> ---
>
> Key: DATAFU-25
> URL: https://issues.apache.org/jira/browse/DATAFU-25
> Project: DataFu
>  Issue Type: Improvement
>Reporter: Matthew Hayes
>Assignee: Eyal Allweil
> Attachments: DATAFU-25.patch
>
>
> AliasableEvalFunc derives from ContextualEvalFunc and stores a map of aliases 
> in the UDF context.  We can instead use getInputSchema, which was added to 
> Pig 0.11.  This may in the process resolve DATAFU-6.



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


[jira] [Updated] (DATAFU-25) AliasableEvalFunc should use getInputSchema

2016-10-19 Thread Eyal Allweil (JIRA)

 [ 
https://issues.apache.org/jira/browse/DATAFU-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eyal Allweil updated DATAFU-25:
---
Attachment: DATAFU-25.patch

This is a minimal fix that uses getInputSchema() instead of the udf context, 
when possible.

It will also solve [DATAFU-6|https://issues.apache.org/jira/browse/DATAFU-6], 
though not the example provided there - BagLeftOuterJoin. This is because 
MonitoredUDF prevents the udf context from working (see 
[PIG-3554|https://issues.apache.org/jira/browse/PIG-3554], and BagJoin uses the 
udf context for other things, not just those that AliasableEvalFunc provides.

I couldn't think of a clean way of adding a test for this, but you can verify 
that it works by adding the MonitoredUDF annotation to TransposeTupleToBag - 
this will make the TransposeTest.transposeTest fail, unless my patch is used. I 
didn't want to expose a "fake" udf with the MonitoredUDF annotation, and adding 
it in the test package means that TransposeTest can't access it.

> AliasableEvalFunc should use getInputSchema
> ---
>
> Key: DATAFU-25
> URL: https://issues.apache.org/jira/browse/DATAFU-25
> Project: DataFu
>  Issue Type: Improvement
>Reporter: Matthew Hayes
>Assignee: Will Vaughan
> Attachments: DATAFU-25.patch
>
>
> AliasableEvalFunc derives from ContextualEvalFunc and stores a map of aliases 
> in the UDF context.  We can instead use getInputSchema, which was added to 
> Pig 0.11.  This may in the process resolve DATAFU-6.



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