godfreyhe commented on a change in pull request #8898:
[FLINK-12936][table-planner-blink] Support intersect all / minus all to blink
planner
URL: https://github.com/apache/flink/pull/8898#discussion_r300528900
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/ReplaceMinusWithAntiJoinRule.scala
##########
@@ -26,17 +29,15 @@ import scala.collection.JavaConversions._
/**
* Planner rule that replaces distinct [[Minus]] (SQL keyword: EXCEPT) with
* a distinct [[Aggregate]] on an ANTI [[Join]].
- *
- * <p>Note: Not support Minus All.
*/
-class ReplaceMinusWithAntiJoinRule extends ReplaceSetOpWithJoinRuleBase(
- classOf[Minus],
+class ReplaceMinusWithAntiJoinRule extends RelOptRule(
+ operand(classOf[Minus], any),
+ RelFactories.LOGICAL_BUILDER,
"ReplaceMinusWithAntiJoinRule") {
override def matches(call: RelOptRuleCall): Boolean = {
val minus: Minus = call.rel(0)
- // not support minus all now.
- minus.isDistinct
+ minus.isDistinct && minus.getInputs.size() == 2
Review comment:
minus.isDistinct => !minus.all
add a `TODO`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services