Skip to content

[FLINK-39804][table] Fix nested projection pushdown with non-pushable filters#28370

Open
qiuyanjun888 wants to merge 1 commit into
apache:masterfrom
qiuyanjun888:FLINK-39804-nested-projection-pushdown
Open

[FLINK-39804][table] Fix nested projection pushdown with non-pushable filters#28370
qiuyanjun888 wants to merge 1 commit into
apache:masterfrom
qiuyanjun888:FLINK-39804-nested-projection-pushdown

Conversation

@qiuyanjun888

@qiuyanjun888 qiuyanjun888 commented Jun 10, 2026

Copy link
Copy Markdown

What is the purpose of the change

Currently, nested projection pushdown can prune nested fields that are only referenced by a filter which cannot be pushed into the table source. In that case, the rewritten projection may no longer keep the complete filter input, and the final source projection can miss fields that are still required by the filter.

This PR fixes the project rewrite phase to preserve complete filter expressions before nested projection pushdown is derived.

Brief change log

  • Added separate batch and stream project rewrite rule sets that use PROJECT_FILTER_TRANSPOSE_WHOLE_EXPRESSIONS.
  • Switched the batch and stream project rewrite programs to use the rewrite-specific project rule sets.
  • Added batch and stream SQL plan regression coverage for nested projection with a non-pushable filter.

Verifying this change

This change added tests and can be verified as follows:

  • Batch and stream SQL plan tests in TableSourceTest for nested projection with a non-pushable filter.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

Was generative AI tooling used to co-author this PR?
  • Yes, Hermes Agent (gpt-5.5, openai-codex)

Generated-by: Hermes Agent (gpt-5.5, openai-codex)

@flinkbot

flinkbot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

… filters

Generated-by: Hermes Agent (gpt-5.5, openai-codex)
@qiuyanjun888 qiuyanjun888 force-pushed the FLINK-39804-nested-projection-pushdown branch from 285ffc6 to 6125c7a Compare June 10, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants