[
https://issues.apache.org/jira/browse/HIVE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649591#action_12649591
]
Ashish Thusoo commented on HIVE-76:
-----------------------------------
The following test case leads to the error:
CREATE TABLE dest1(key1 INT, value1 STRING, key2 INT, value2 STRING) STORED AS
TEXTFILE;
FROM src src1 JOIN src src2 ON (src1.key = src2.key)
INSERT OVERWRITE TABLE dest1 SELECT src1.*, src2.*;
where src has two columns (key INT, value STRING)
In this situation we should not be getting a column mismatch error as the
destination has 4 columns and SELECT src1.*, src2.* also should
have 4 columns. However, due to a bug in SemanticAnalyzer we add all the
columns in the select list to the row resolver as many times as an
expression of the form alias.* appears.
As a result it is impossible to insert into a destination table. A workaround
is to enumerate all the columns and not use alias.* in the select list
with joins when inserting the results into a table.
> Column number mismatch between query and destination tables when alias.*
> expressions are present in the select list of a join
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-76
> URL: https://issues.apache.org/jira/browse/HIVE-76
> Project: Hadoop Hive
> Issue Type: Bug
> Affects Versions: 0.20.0
> Reporter: Ashish Thusoo
> Assignee: Ashish Thusoo
> Fix For: 0.20.0
>
>
> Column number mismatch between query and destination tables when alias.*
> expressions are present in the select list of a join. The reason is due to a
> bug in how the row resolver is constructed in SemanticAnalyzer.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.