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

    https://github.com/apache/flink/pull/4842#discussion_r145262038
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/stream/table/CorrelateITCase.scala
 ---
    @@ -82,6 +82,45 @@ class CorrelateITCase extends 
StreamingMultipleProgramsTestBase {
         assertEquals(expected.sorted, StreamITCase.testResults.sorted)
       }
     
    +  /**
    +    * Due to CALCITE-2004, common join predicates are temporarily 
forbidden.
    +    */
    +  @Test (expected = classOf[ValidationException])
    +  def testLeftOuterJoinWithPredicates(): Unit = {
    +    val t = testData(env).toTable(tEnv).as('a, 'b, 'c)
    +    val func0 = new TableFunc0
    +
    +    val result = t
    +      .leftOuterJoin(func0('c) as ('s, 'l), 'a === 'l)
    +      .select('c, 's, 'l)
    +      .toAppendStream[Row]
    +
    +    result.addSink(new StreamITCase.StringSink[Row])
    +    env.execute()
    +
    +    val expected = "John#19,null,null\n" + "John#22,null,null\n" + 
"Anna44,null,null\n" +
    +      "nosharp,null,null"
    +    assertEquals(expected.sorted, StreamITCase.testResults.sorted)
    +  }
    +
    +  @Test
    +  def testLeftOuterJoinWithWhere(): Unit = {
    --- End diff --
    
    `testUserDefinedTableFunctionWithScalarFunction()` covers the same case (a 
predicate on a table function attribute). 
    
    I think we can remove this test.


---

Reply via email to