Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3141#discussion_r96856944
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/table/JoinITCase.scala
 ---
    @@ -234,7 +249,38 @@ class JoinITCase(
         TestBaseUtils.compareResultAsText(results.asJava, expected)
       }
     
    -  @Test
    +  @Test(expected = classOf[ValidationException])
    +  def testLeftJoinWithNotOnlyEquiJoin(): Unit = {
    +    val env: ExecutionEnvironment = 
ExecutionEnvironment.getExecutionEnvironment
    +    val tEnv = TableEnvironment.getTableEnvironment(env, config)
    +    tEnv.getConfig.setNullCheck(true)
    +
    +    val ds1 = CollectionDataSets.get3TupleDataSet(env).toTable(tEnv, 'a, 
'b, 'c)
    +    val ds2 = CollectionDataSets.get5TupleDataSet(env).toTable(tEnv, 'd, 
'e, 'f, 'g, 'h)
    +
    +    val joinT = ds1.leftOuterJoin(ds2, 'a === 'd && 'b < 'h).select('c, 'g)
    +
    +    val results = joinT.toDataSet[Row].collect()
    +  }
    +
    +  @Test(expected = classOf[ValidationException])
    +  def testFullJoinWithNotOnlyEquiJoin(): Unit = {
    +    val env: ExecutionEnvironment = 
ExecutionEnvironment.getExecutionEnvironment
    +    val tEnv = TableEnvironment.getTableEnvironment(env, config)
    +    tEnv.getConfig.setNullCheck(true)
    +
    +    val ds1 = CollectionDataSets.get3TupleDataSet(env).toTable(tEnv, 'a, 
'b, 'c)
    +    val ds2 = CollectionDataSets.get5TupleDataSet(env).toTable(tEnv, 'd, 
'e, 'f, 'g, 'h)
    +
    +    val joinT = ds1.fullOuterJoin(ds2, 'a === 'd && 'b < 'h).select('c, 'g)
    +
    +    val results = joinT.toDataSet[Row].collect()
    +  }
    +
    +
    --- End diff --
    
    Add tests to check that local predicates are not allowed in outer joins as 
well.


---
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.
---

Reply via email to