[
https://issues.apache.org/jira/browse/HIVE-21768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16846999#comment-16846999
]
Gopal V commented on HIVE-21768:
--------------------------------
Sure, I think that's a valid concern - we should switch it to the private
prefix used elsewhere of "__" instead of a single one.
bq. Not sure if this could lead to some other issues?
This is the result table schema and this does get stripped if you do "create
temporary table foo as select 1 union all select 2".
And joins require explicit naming of union sub-queries, so this only applies to
uncovered unions.
> JDBC: Strip the default union prefix for un-enclosed UNION queries
> ------------------------------------------------------------------
>
> Key: HIVE-21768
> URL: https://issues.apache.org/jira/browse/HIVE-21768
> Project: Hive
> Issue Type: Bug
> Components: Logical Optimizer
> Affects Versions: 4.0.0, 3.1.1
> Reporter: Gopal V
> Assignee: Gopal V
> Priority: Major
> Attachments: HIVE-21768.1.patch, HIVE-21768.2.patch
>
>
> {code}
> beeline> select 1 union all select 2;
> +----------+
> | _u1._c0 |
> +----------+
> | 2 |
> | 1 |
> +----------+
> {code}
> The _u1 is superfluous and harmful to result schema parsing.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)