You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Igor Kabiljo (Created) (JIRA)" <ji...@apache.org> on 2012/04/10 07:51:25 UTC

[jira] [Created] (HIVE-2939) LazyArray.getList changes array it previously returned

LazyArray.getList changes array it previously returned 
-------------------------------------------------------

                 Key: HIVE-2939
                 URL: https://issues.apache.org/jira/browse/HIVE-2939
             Project: Hive
          Issue Type: Bug
          Components: UDF
    Affects Versions: 0.8.1
            Reporter: Igor Kabiljo


Simple query like:
SELECT a, e
FROM ikabiljo_test_string_array
LATERAL VIEW EXPLODE(a) x1 AS e

(table contains one column - ARRAY<STRING> - and has one row - [b,c,a] )

fails with ConcurrentModificationException, since LazyArray.getList changes the cached array it returns.
LazyArray.getList can easily:
- return cached array if present, without clearing and refiling. Hive is already not going to work properly if you change input parameters in an UDF. If that doesn't sound good - it can return Collections.unmodifiableList
- or just not cache anything

Same is true for LazyMap.getMap

--
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-2939) LazyArray.getList changes array it previously returned

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

Igor Kabiljo updated HIVE-2939:
-------------------------------

    Priority: Minor  (was: Major)
    
> LazyArray.getList changes array it previously returned 
> -------------------------------------------------------
>
>                 Key: HIVE-2939
>                 URL: https://issues.apache.org/jira/browse/HIVE-2939
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.8.1
>            Reporter: Igor Kabiljo
>            Priority: Minor
>
> Simple query like:
> SELECT a, e
> FROM ikabiljo_test_string_array
> LATERAL VIEW EXPLODE(a) x1 AS e
> (table contains one column - ARRAY<STRING> - and has one row - [b,c,a] )
> fails with ConcurrentModificationException, since LazyArray.getList changes the cached array it returns.
> LazyArray.getList can easily:
> - return cached array if present, without clearing and refiling. Hive is already not going to work properly if you change input parameters in an UDF. If that doesn't sound good - it can return Collections.unmodifiableList
> - or just not cache anything
> Same is true for LazyMap.getMap

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