You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Jonathan Coveney (Created) (JIRA)" <ji...@apache.org> on 2011/12/15 09:44:30 UTC

[jira] [Created] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
-----------------------------------------------------------------------------------------------------------------------------------------

                 Key: PIG-2430
                 URL: https://issues.apache.org/jira/browse/PIG-2430
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.11
            Reporter: Jonathan Coveney
            Assignee: Jonathan Coveney


If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Coveney updated PIG-2430:
----------------------------------

    Fix Version/s: 0.11
           Status: Patch Available  (was: Open)

I added a new test. Ran ant test-commit successful. Should test on 0.10 and 0.9
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.11
>
>         Attachments: PIG2430.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Coveney updated PIG-2430:
----------------------------------

    Attachment: PIG2430.patch

This takes into account Dmitriy's suggestions. I successfully ran ant test-commit on trunk, and ant -Dtestcase=TestUDF test on 0.9 and 0.10.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: PIG2430.patch, PIG2430.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Coveney updated PIG-2430:
----------------------------------

    Attachment: PIG2430.patch
    
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.11
>
>         Attachments: PIG2430.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Thejas M Nair (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thejas M Nair updated PIG-2430:
-------------------------------

    Attachment: DummySize.patch

{code}
grunt> define SZ SIZE('10');        
grunt> l = load 't.txt' as (a,b);   
grunt> f = foreach l generate SZ(a);
grunt> dump f;

{code}

I have attached a patch with a change to size udf to return a dummy size value passed in the constructor. (the change is just meant to demonstrate the issue)

With the change proposed in PIG2430_1.patch, the constructor argument does not get set. Without the PIG2430_1.patch, the SZ(a) call will return 10, with it returns 0.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Coveney updated PIG-2430:
----------------------------------

    Affects Version/s: 0.10
                       0.9.0
        Fix Version/s: 0.9.0
                       0.10
    
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: PIG2430.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Coveney updated PIG-2430:
----------------------------------

    Attachment:     (was: PIG2430.patch)
    
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170593#comment-13170593 ] 

Jonathan Coveney commented on PIG-2430:
---------------------------------------

I patched .9 and .10 and ran ant test-commit successfully too :)
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.11
>
>         Attachments: PIG2430.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Thejas M Nair (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180780#comment-13180780 ] 

Thejas M Nair commented on PIG-2430:
------------------------------------

Does anybody feel strongly to have this in 0.9 branch? While I don't see the change as being risky, I think it is better to minimize the patches to 0.9 in the interest of keeping it stable. 

                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Thejas M Nair (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thejas M Nair updated PIG-2430:
-------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.9.0)
           Status: Resolved  (was: Patch Available)

test-patch and unit tests pass. Committed the patches to 0.10 branch and trunk.
Thanks Jonathan!

                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.010.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Coveney updated PIG-2430:
----------------------------------

    Attachment: PIG2430_2.patch
    
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Dmitriy V. Ryaboy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173285#comment-13173285 ] 

Dmitriy V. Ryaboy commented on PIG-2430:
----------------------------------------

Is there a way for us to tell if a UDF was DEFINEd or just used directly? That way we could tell if no-arguments was forced through a define, or if we should obey the args passed via argToFuncMapping.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170806#comment-13170806 ] 

Jonathan Coveney commented on PIG-2430:
---------------------------------------

I ran ant test-commit successfully on 0.9 and 0.10
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180885#comment-13180885 ] 

Jonathan Coveney commented on PIG-2430:
---------------------------------------

I'm fine keeping this out of 0.9. The genesis of this patch was that it enables other things I'd like to do in trunk. 0.9 should probably really only have bug fixes and minor improvements at this point, keeping it stable, and we should make 0.10 the next bastion of the high tech pigs.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Thejas M Nair (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173449#comment-13173449 ] 

Thejas M Nair commented on PIG-2430:
------------------------------------

bq. Is there a way for us to tell if a UDF was DEFINEd or just used directly? 
The information is not currently available in TypeCheckingExpVisitor, but it should be possible to pass that along. LogicalPlanBuilder.buildUDF is where the replacement with defined udf happens.

bq. This ambiguity could be why this argument was ignored in the first place, but given it's there, I think it could be useful in UDFs, we just have to be clear on the semantics.
I think we can define the semantics as the getArgsToFuncMapping() returns function with default constructor arguments, which can be overridden by define statement. I think it makes sense to add this info to the javadoc comments for getArgsToFuncMapping.

We need to think about how this constructor argument semantics should be defined with the new EvalFunc interface in PIG-2421.

                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Thejas M Nair (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180755#comment-13180755 ] 

Thejas M Nair commented on PIG-2430:
------------------------------------

Sorry, I had forgot about this jira. Thanks for reminding!
This looks good. I will commit after running unit tests and test-patch.

                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Dmitriy V. Ryaboy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180791#comment-13180791 ] 

Dmitriy V. Ryaboy commented on PIG-2430:
----------------------------------------

I'm ok with keeping this out of 0.9 branch.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Coveney updated PIG-2430:
----------------------------------

    Attachment: PIG2430_1.patch
    
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173871#comment-13173871 ] 

Jonathan Coveney commented on PIG-2430:
---------------------------------------

I agree that this experience should definitely inform the new EvalFunc design. I added a new comment

As far as this patch, I added your case to TestUDF, and took it into account. There is a part of LogicalPlanBuilder.java's buildUDF that is only called if there was no define statement for the alias in question. Thus, I added a field to UserFuncExpression which holds true if it was created via a define, and false otherwise.

Thus, if you were to do...

{code}
define my myudf('val');
a = load ...
b = foreach a generate my($0), myudf($0);
{code}

In this case, the my would have any FuncSpec values overriden by the define statement, but myudf would not, since it was not via an alias.

Let me know if this seems like an appropriate way to do this!
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Dmitriy V. Ryaboy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170746#comment-13170746 ] 

Dmitriy V. Ryaboy commented on PIG-2430:
----------------------------------------

Nice fix, but make the test use local mode. Also might want to move the UDF classes into the test itself, it's not like someone is likely to reuse it from the utils package.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: PIG2430.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Thejas M Nair (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thejas M Nair updated PIG-2430:
-------------------------------

    Attachment: PIG2430_2.010.patch

PIG2430_2.010.patch - patch re-based with 0.10 branch .

                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.010.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180674#comment-13180674 ] 

Jonathan Coveney commented on PIG-2430:
---------------------------------------

Thejas,

Was wondering if you might be able to get this a look to see if it seems reasonable.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch, PIG2430_2.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2430) An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments

Posted by "Jonathan Coveney (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172925#comment-13172925 ] 

Jonathan Coveney commented on PIG-2430:
---------------------------------------

Thejas, thanks again for taking a look. I see what you mean now. I think there are a couple of resolutions to this, the question comes down to: in the case of an explicit define statement, but where there is also a matching getArgToFuncMapping, which should take precedence? For an explicit parameter (ie you dummy sIZE example), it seems pretty clear that the user defined parameter should take precedence. With no parameter it is less clear...there are 2 reasons why people would use a define statement.
1) to explicitly define a constructor parameter (or intentionally 0 constructor parameters)
2) to be able to refer to a UDF by an alias (in which case, the argument by the getArgToFuncMapping may be appropriate)

This ambiguity could be why this argument was ignored in the first place, but given it's there, I think it could be useful in UDFs, we just have to be clear on the semantics.
                
> An EvalFunc which overrides getArgToFuncMapping with FuncSpec with constructor arguments is not properly instantiated with said arguments
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2430
>                 URL: https://issues.apache.org/jira/browse/PIG-2430
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0, 0.10, 0.11
>            Reporter: Jonathan Coveney
>            Assignee: Jonathan Coveney
>             Fix For: 0.9.0, 0.10, 0.11
>
>         Attachments: DummySize.patch, PIG2430.patch, PIG2430_1.patch
>
>
> If you override getArgToFuncMapping and any of the FuncSpec's specify constructor arguments, those arguments are currently ignored. Thankfully, there is a one line fix (it's funny that this has never been run into before, but is an). Patch with tests incoming. I assume that this affects 0.10 and 0.9 but haven't tested, I was just working with trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira