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

bugfix: fix bug in LimitPushDown which pushdown into limit wrong. #4309

Closed
wants to merge 2 commits into from

Conversation

jackwener
Copy link
Member

@jackwener jackwener commented Nov 21, 2022

Which issue does this PR close?

Closes #4308.

Current computation is wrong when meet two limit merge.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the optimizer Optimizer rules label Nov 21, 2022
@jackwener jackwener closed this Nov 21, 2022
@jackwener jackwener reopened this Nov 21, 2022
.build()
.unwrap();

let expected = "Limit: skip=1000, fetch=None\
Copy link
Member Author

Choose a reason for hiding this comment

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

original

Limit: skip=1000, fetch=None
\n  Limit: skip=0, fetch=1000
\n    TableScan: test, fetch=1000

Comment on lines +998 to +1000
let expected = "Limit: skip=1000, fetch=None\
\n Limit: skip=1000, fetch=0\
\n TableScan: test, fetch=0";
Copy link
Member Author

Choose a reason for hiding this comment

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

original

Limit: skip=1000, fetch=None
\n  Limit: skip=0, fetch=1
\n    TableScan: test, fetch=1

@jackwener jackwener changed the title fix: fix bug in LimitPushDown which pushdown into limit wrong. bugfix: fix bug in LimitPushDown which pushdown into limit wrong. Nov 21, 2022
@jackwener
Copy link
Member Author

add this enhancement into #4276.
close.

@jackwener jackwener closed this Nov 22, 2022
@jackwener jackwener deleted the fix_limit branch November 24, 2022 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LimitPushDown pushdown into limit, result is wrong
1 participant