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

        

Reply via email to