Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-29138][table-planner] fix project can not be pushed into lookup source #20717

Merged
merged 3 commits into from
Sep 1, 2022

Conversation

lincoln-lil
Copy link
Contributor

What is the purpose of the change

Projected pushdown is a basic optimization for table source , but actually not work for lookup source (which implments SupportsProjectionPushDown), this is unexpected, we should fix this.

Brief change log

Add a new rule ProjectSnapshotTransposeRule for both batch and stream rule sets

Verifying this change

  • newly added ProjectSnapshotTransposeRuleTest to cover both batch and streaming mode
  • existing LookupJoinTest

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)

@flinkbot
Copy link
Collaborator

flinkbot commented Aug 30, 2022

CI report:

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

@Override
public boolean matches(RelOptRuleCall call) {
LogicalProject project = call.rel(0);
return project.getProjects().stream().noneMatch(RexOver::containsOver);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lincoln-lil , just jumping into this PR, can you help me understand why here need to check for the RexOver ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aitozi some comment should be here, I'll add it.
The reason we don't push a project which contains over into a snapshot is snapshot on window aggregate is unsupported for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your explanation. One more minor comment here, it seems can directly use !project.containsOver()

@lincoln-lil
Copy link
Contributor Author

@flinkbot run azure

1 similar comment
@lincoln-lil
Copy link
Contributor Author

@flinkbot run azure

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixing! Looks good to me!

@JingsongLi JingsongLi merged commit 2e2fb24 into apache:master Sep 1, 2022
@lincoln-lil lincoln-lil deleted the FLINK-29138 branch September 1, 2022 03:04
huangxiaofeng10047 pushed a commit to huangxiaofeng10047/flink that referenced this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants