[
https://issues.apache.org/jira/browse/FLINK-3942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350520#comment-15350520
]
ASF GitHub Bot commented on FLINK-3942:
---------------------------------------
Github user wuchong commented on the issue:
https://github.com/apache/flink/pull/2159
Hi @fhueske, that's a good idea to use CoGroup instead of Join. I updated
the PR according to your advice. Meanwhile, I updated the document too (correct
me if I describe wrong).
NOTE:
1. use CoGroup instead of Join, no code gen.
1. add INTERSECT related tests into UnionITCase, and rename it to
`SetOperatorsITCase`
2. remove INTERSECT Java API tests
3. add the `intersectAll` function to `Table`
4. mark `testIntersectAll` as `@ignore` in `sql/SetOperatorsITCase`,
because calcite sql parser doesn't support INTERSECT ALL, it will throw the
following exception:
```
java.lang.AssertionError: Internal error: set operator INTERSECT ALL not
suported
at org.apache.calcite.util.Util.newInternal(Util.java:777)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertSetOp(SqlToRelConverter.java:2920)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:2885)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:582)
at
org.apache.flink.api.table.FlinkPlannerImpl.rel(FlinkPlannerImpl.scala:114)
at
org.apache.flink.api.table.BatchTableEnvironment.sql(BatchTableEnvironment.scala:132)
at
org.apache.flink.api.scala.batch.sql.SetOperatorsITCase.testIntersectAll(SetOperatorsITCase.scala:169)
```
> Add support for INTERSECT
> -------------------------
>
> Key: FLINK-3942
> URL: https://issues.apache.org/jira/browse/FLINK-3942
> Project: Flink
> Issue Type: New Feature
> Components: Table API & SQL
> Affects Versions: 1.1.0
> Reporter: Fabian Hueske
> Assignee: Jark Wu
> Priority: Minor
>
> Currently, the Table API and SQL do not support INTERSECT.
> INTERSECT can be executed as join on all fields.
> In order to add support for INTERSECT to the Table API and SQL we need to:
> - Implement a {{DataSetIntersect}} class that translates an INTERSECT into a
> DataSet API program using a join on all fields.
> - Implement a {{DataSetIntersectRule}} that translates a Calcite
> {{LogicalIntersect}} into a {{DataSetIntersect}}.
> - Extend the Table API (and validation phase) to provide an intersect()
> method.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)