Xuyang Zhong created FLINK-38634:
------------------------------------

             Summary: The filter on the dim table will not be pushed down
                 Key: FLINK-38634
                 URL: https://issues.apache.org/jira/browse/FLINK-38634
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / Planner
    Affects Versions: 2.1.1, 2.0.1
            Reporter: Xuyang Zhong
            Assignee: Xuyang Zhong


Take the following test as example:

 
{code:java}
// batch CalcTest
@Test
def test(): Unit = {
  val tEnv = util.tableEnv
  tEnv.executeSql("""
                    |create table src(
                    | a int,
                    | b int,
                    | pt as proctime()
                    |) with (
                    | 'connector' = 'values',
                    | 'bounded' = 'true'
                    |)
                    |""".stripMargin)

  tEnv.executeSql("""
                    |create table dim(
                    | a int,
                    | b int
                    |) with (
                    | 'connector' = 'values',
                    | 'filterable-fields' = 'b',
                    | 'bounded' = 'true'
                    |)
                    |""".stripMargin)

  util.verifyRelPlan(
    """
      |select src.* from src join dim for system_time as of src.pt on src.a = 
dim.a and dim.b = 1
      |""".stripMargin)

} {code}
 

after CalcSnapshotTransposeRule, we lack 
PushFilterInCalcIntoTableSourceScanRule to push down filter in the calc to 
source.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to