Jeyhun Karimov created FLINK-34924: -------------------------------------- Summary: Support partition pushdown for join queries Key: FLINK-34924 URL: https://issues.apache.org/jira/browse/FLINK-34924 Project: Flink Issue Type: Improvement Components: Table SQL / Planner Affects Versions: 1.19.0 Reporter: Jeyhun Karimov
Consider the following tables: {code:java} create table partitionedTable1 ( a int, b int, c int) partitioned by (a, b) with ( ... ) {code} {code:java} create table partitionedTable2 ( c int, d int, e int) partitioned by (d, e) with ( ... ) {code} And the following query: {code:java} select t1.b from partitionedTable1 t1 inner join partitionedTable2 t2 on t1.a = t2.d where t1.a > 1{code} Currently, the partition pushdown only considers the filter clause (t1.a > 1) and pushes the related partitions to the source operator. However, we should be able to also pushdown partitions because of join clause. Note that partitioned columns are the same as join fields. So, we can fetch existing partitions from each table, intersect them, and push their intersection to their source operators. -- This message was sent by Atlassian Jira (v8.20.10#820010)