[
https://issues.apache.org/jira/browse/HIVE-22601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
okumin resolved HIVE-22601.
---------------------------
Resolution: Duplicate
I verified this issue doesn't happen with Hive 4.
{code:java}
0: jdbc:hive2://hive-hiveserver2:10000/defaul> SELECT stack(1, 'a', 'b', 'c')
AS (c1, c2, c3)
. . . . . . . . . . . . . . . . . . . . . . .> UNION ALL
. . . . . . . . . . . . . . . . . . . . . . .> SELECT stack(1, 'd', 'e', 'f')
AS (c1, c2, c3);
...
+-----+-----+-----+
| c1 | c2 | c3 |
+-----+-----+-----+
| a | b | c |
| d | e | f |
+-----+-----+-----+ {code}
Looks like, HIVE-25754 resolved this issue. Thanks!
> Some columns will be lost when a UDTF has multiple aliases in some cases
> ------------------------------------------------------------------------
>
> Key: HIVE-22601
> URL: https://issues.apache.org/jira/browse/HIVE-22601
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 2.1.1, 2.2.0, 2.3.6, 3.1.2
> Reporter: okumin
> Assignee: okumin
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-22601.1.patch, HIVE-22601.2.patch,
> HIVE-22601.3.patch, HIVE-22601.patch
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Only one column will be retained when putting UDTFs with multiple aliases and
> a top-level UNION together.
> For example, the result of the following SQL should have three columns, c1,
> c2 and c3.
> {code:java}
> SELECT stack(1, 'a', 'b', 'c') AS (c1, c2, c3)
> UNION ALL
> SELECT stack(1, 'd', 'e', 'f') AS (c1, c2, c3);
> {code}
> However, It's only the c3 column which I can get.
> {code:java}
> +---------+
> | _u1.c3 |
> +---------+
> | c |
> | f |
> +---------+
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)