You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datafu.apache.org by "Kyle Birch (JIRA)" <ji...@apache.org> on 2017/07/29 06:37:02 UTC

[jira] [Updated] (DATAFU-83) InUDF does not validate that types are compatible

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

Kyle Birch updated DATAFU-83:
-----------------------------
    Attachment: rb36702.patch

Since this hasn't been addressed in a while, I'm interested in helping out. Here is the most up-to-date patch that you can find on the RB. I addressed the indentation issue, even though I haven't posted it over at the RB, yet. 

> InUDF does not validate that types are compatible
> -------------------------------------------------
>
>                 Key: DATAFU-83
>                 URL: https://issues.apache.org/jira/browse/DATAFU-83
>             Project: DataFu
>          Issue Type: Improvement
>            Reporter: Matthew Hayes
>            Priority: Minor
>         Attachments: DATAFU-83.patch, rb36702.patch
>
>
> See the example below.  The input data is a long, but ints are provided to match against.  Because it uses the Java equals to compare and these are different types, this will never match, which can lead to confusing results.  I believe it should at least throw an error.
> {code}
>   define I datafu.pig.util.InUDF();
>   
>   data = LOAD 'input' AS (B: bag {T: tuple(v:LONG)});
>   
>   data2 = FOREACH data {
>     C = FILTER B By I(v, 1,2,3);
>     GENERATE C;
>   }
>   
>   describe data2;
>   
>   STORE data2 INTO 'output';
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)