Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
With Hive dialect, for union sql statement, if one side of union select multiple same columns, the columns will be duplicated, thus only retains one column. Then it will throw the exception "Schema of both sides of union should match" for it will loss some columns.
It can be reproduced using the following code in HiveDialectQueryITCase:
List<Row> result =
CollectionUtil.iteratorToList(
tableEnv.executeSql("select x,y from foo union all select i,i from bar")
.collect());
Attachments
Issue Links
- links to