Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3033#discussion_r96410649
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/dataSet/DataSetSingleRowJoinRule.scala
---
@@ -36,17 +36,13 @@ class DataSetSingleRowJoinRule
override def matches(call: RelOptRuleCall): Boolean = {
val join = call.rel(0).asInstanceOf[LogicalJoin]
- if (isInnerJoin(join)) {
- isSingleRow(join.getRight) || isSingleRow(join.getLeft)
- } else {
- false
+ join.getJoinType match {
+ case JoinRelType.INNER | JoinRelType.LEFT | JoinRelType.RIGHT =>
--- End diff --
Since we execute the outer join as a broadcast join, we can only support
the case where the multi-input is the outer side.
I'd change the condition to:
```
case JoinRelType.INNER if isSingleRow(join.getLeft) ||
isSingleRow(join.getRight) => true
case JoinRelType.LEFT if isSingleRow(join.getRight) => true
case JoinRelType.RIGHT if isSingleRow(join.getLeft) => true
case _ => false
```
---
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.
---