You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Philip Tromans (JIRA)" <ji...@apache.org> on 2012/06/13 13:07:42 UTC

[jira] [Created] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Philip Tromans created HIVE-3125:
------------------------------------

             Summary: sort_array doesn't work with LazyPrimitive
                 Key: HIVE-3125
                 URL: https://issues.apache.org/jira/browse/HIVE-3125
             Project: Hive
          Issue Type: Bug
          Components: UDF
            Reporter: Philip Tromans




--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Edward Capriolo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294463#comment-13294463 ] 

Edward Capriolo commented on HIVE-3125:
---------------------------------------

Nice catch. A feature that sorts out literals only is not useful outside of the unit tests. I will look at this.
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Philip Tromans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13395758#comment-13395758 ] 

Philip Tromans commented on HIVE-3125:
--------------------------------------

@Carl, @Edward: Review board seems to be back now. I've submitted a review request: https://reviews.apache.org/r/5384/
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-3125:
---------------------------------

    Status: Patch Available  (was: Open)
    
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Edward Capriolo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399986#comment-13399986 ] 

Edward Capriolo commented on HIVE-3125:
---------------------------------------

+1 will commit if tests pass
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt, HIVE-3125.2.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Philip Tromans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398277#comment-13398277 ] 

Philip Tromans commented on HIVE-3125:
--------------------------------------

@Carl, @Edward: I've updated the patch on reviewboard.
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Philip Tromans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Tromans updated HIVE-3125:
---------------------------------

    Attachment: HIVE-3125.1.patch.txt

I'm not entirely sure if this is the right way to fix this. The right thing to do may well be to make LazyInteger Comparable, but I thought it'd be best for me to stay out of Hive's serde stuff. I'm still a little new round here...

This fixes it by using the ObjectInspectorUtils compare() method.
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Philip Tromans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294921#comment-13294921 ] 

Philip Tromans commented on HIVE-3125:
--------------------------------------

@Carl: reviews.apache.org appears to be down at the moment. I'll keep checking and submit a request if it comes back up.
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294764#comment-13294764 ] 

Carl Steinbach commented on HIVE-3125:
--------------------------------------

@Philip: Good catch. Can you please submit a review request for this patch on reviews.apache.org? Thanks.
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Edward Capriolo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edward Capriolo updated HIVE-3125:
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.10.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)

Committed. Thanks Philip.
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3125.1.patch.txt, HIVE-3125.2.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Philip Tromans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Tromans updated HIVE-3125:
---------------------------------

    Attachment: HIVE-3125.2.patch.txt
    
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt, HIVE-3125.2.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Philip Tromans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Tromans updated HIVE-3125:
---------------------------------

    Status: Patch Available  (was: Open)
    
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Philip Tromans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Tromans updated HIVE-3125:
---------------------------------

          Description: 
The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.

If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.
    Affects Version/s: 0.9.0
             Assignee: Philip Tromans
    
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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] (HIVE-3125) sort_array doesn't work with LazyPrimitive

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-3125:
---------------------------------

    Status: Open  (was: Patch Available)

@Philip: Patch looks good overall. I added a couple small requests to reviewboard. Thanks.
                
> sort_array doesn't work with LazyPrimitive
> ------------------------------------------
>
>                 Key: HIVE-3125
>                 URL: https://issues.apache.org/jira/browse/HIVE-3125
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Philip Tromans
>            Assignee: Philip Tromans
>         Attachments: HIVE-3125.1.patch.txt
>
>
> The sort_array function doesn't work against data that's actually come out of a table. The test suite only covers constants given in the query.
> If you try and use sort_array on an array from a table, then you get a ClassCastException that you can't convert LazyX to Comparable.

--
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