Github user KurtYoung commented on a diff in the pull request:
https://github.com/apache/flink/pull/3594#discussion_r111860657
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/TableEnvironmentTest.scala
---
@@ -335,7 +335,8 @@ class TableEnvironmentTest extends TableTestBase {
val table2 = util.addTable[(Long, Int, String)]('d, 'e, 'f)
- val sqlTable2 = util.tEnv.sql(s"SELECT d, e, f FROM $table2 UNION
SELECT a, b, c FROM $table")
+ val sqlTable2 = util.tEnv.sql(s"SELECT d, e, f FROM $table2 " +
+ s"UNION ALL SELECT a, b, c FROM $table")
--- End diff --
Actually it's wrong in old test using `UNION` instead of `UNION ALL`. If i
understand correctly, `UNION` will do a global distinct for all fields and
`UNION ALL` just concat two datasets or datastreams. I think the behavior of
`DataStream.union` is rather `UNION ALL` than `UNION`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---