[
https://issues.apache.org/jira/browse/HIVE-2540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145585#comment-13145585
]
Bejoy KS commented on HIVE-2540:
--------------------------------
The exception is happening when I'm trying to use explode map as well
DDL
CREATE EXTERNAL TABLE ver_data
(
key STRING,
id STRING,
date_time STRING,
model STRING,
version STRING,
sid STRING,
message STRING,
tags MAP<STRING,STRING>
);
HQL Query
SELECT ver_data.*,t1.* FROM ver_data LATERAL VIEW explode(tags) t1 AS
param_name,param_value;
This Query throws a concurrent modification exception on a LinkedHashMap while
doing the join. If I modify the query and avoids the map column('tags') in the
retrieval/join,then the query executes successfully.
The below modified query executes successfully
SELECT ver_data.key, ver_data.id, ver_data.date_time, ver_data.model,
ver_data.version, ver_data.sid, ver_data.message,
t1.* FROM ver_data LATERAL VIEW explode(tags) t1 AS param_name,param_value;
Stack Trace When using Joins on maps with Lateral View
2011-11-07 07:18:22,679 FATAL ExecMapper:
org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while
processing row {"key":"0000","id":"10001",...}
at
org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:546)
at org.apache.hadoop.hive.ql.exec.ExecMapper.map(ExecMapper.java:143)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:391)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:325)
at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127)
at org.apache.hadoop.mapred.Child.main(Child.java:264)
Caused by: java.util.ConcurrentModificationException
at
java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
> LATERAL VIEW with EXPLODE produces ConcurrentModificationException
> ------------------------------------------------------------------
>
> Key: HIVE-2540
> URL: https://issues.apache.org/jira/browse/HIVE-2540
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 0.7.1
> Reporter: David Phillips
>
> The following produces {{ConcurrentModificationException}} on the {{for}}
> loop inside EXPLODE:
> {code}
> create table foo as select array(1, 2) a from src limit 1;
> select a, x.b from foo lateral view explode(a) x as b;
> {code}
--
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