flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #3033: [FLINK-5256] Extend DataSetSingleRowJoin to suppor...
Date Wed, 21 Dec 2016 17:05:49 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3033#discussion_r93472610
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/dataSet/DataSetSingleRowJoinRule.scala
---
    @@ -35,16 +35,7 @@ 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
    -    }
    -  }
    -
    -  private def isInnerJoin(join: LogicalJoin) = {
    -    join.getJoinType == JoinRelType.INNER
    +    isSingleRow(join.getRight) || isSingleRow(join.getLeft)
    --- End diff --
    
    The check should be 
    ```
    join.getJoinType match {
      case JoinRelType.INNER =>
        isSingleRow(join.getRight) || isSingleRow(join.getLeft)
      case JoinRelType.LEFT => 
        isSingleRow(join.getRight)
      case JoinRelType.RIGHT => 
        isSingleRow(join.getLeft)
      case _ => false
    }
    ```
    
    We also need to pass the `JoinRelType` to the `DataSetSingleRowJoin`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message