You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Guodong Wang (JIRA)" <ji...@apache.org> on 2015/06/26 12:27:04 UTC

[jira] [Commented] (HIVE-11126) multiple insert fails when select with group by clause

    [ https://issues.apache.org/jira/browse/HIVE-11126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602668#comment-14602668 ] 

Guodong Wang commented on HIVE-11126:
-------------------------------------

looks like the parse does not use the alias in the select statement.

> multiple insert fails when select with group by clause
> ------------------------------------------------------
>
>                 Key: HIVE-11126
>                 URL: https://issues.apache.org/jira/browse/HIVE-11126
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 0.12.0
>            Reporter: Guodong Wang
>
> When the select statement contains group by clause, multiple insert fails.
> Here is the sample sql.
> {code}
> from test_src_table 
> insert overwrite table test_target_table partition(p)
> select src_id as id, "lala"  as p
> group by src_id
> insert overwrite table test_target_table partition(p)
> select id, p from
> select src_id as id, "papa" as p
> group by src_id
> {code}
> The exception is like this
> {code}
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row {"_col0":"1107625951@qq.com","_col1":"lala"}
> 	at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:195)
> 	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
> 	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
> 	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
> 	at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:415)
> 	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)
> 	at org.apache.hadoop.mapred.Child.main(Child.java:262)
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row {"_col0":"1107625951@qq.com","_col1":"lala"}
> 	at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:550)
> 	at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(Ex
> FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)