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

fix: limit 0 return empty #852

Closed
wants to merge 1 commit into from
Closed

Conversation

caicancai
Copy link
Contributor

No description provided.

Signed-off-by: caicancai <[email protected]>
Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

LGTM, but it seems that a lot of regress tests are failing because we don't populate data for these queries. Need to figure out a way to fix them before merging. Thanks anyways!

@caicancai
Copy link
Contributor Author

caicancai commented Jun 17, 2024

LGTM, but it seems that a lot of regress tests are failing because we don't populate data for these queries. Need to figure out a way to fix them before merging. Thanks anyways!

I'll try to fix it over the weekend.
Do we just need to fill in the data of the test sample? I am not very clear about this part. Can you give me some advice?

cc @wangrunji0408

wangrunji0408
wangrunji0408 previously approved these changes Jun 17, 2024
rw!("limit-null"; "(limit null 0 ?child)" => "?child"),
rw!("limit-null"; "(limit null 0 ?child)" => "(empty ?child)"),
Copy link
Member

Choose a reason for hiding this comment

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

The definition of the limit node is (limit limit_num offset_num child).
So (limit null 0 ?child) means LIMIT ALL OFFSET 0, which is a dummy operation.
Actually this is not a bug. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the reminder, but limit 0 actually returns a logical plan similar to
LogicalValues(tuples=[[]]).
I don't know if risinglight has implemented it now. If not, I'd be happy to contribute.

@wangrunji0408 wangrunji0408 dismissed their stale review June 17, 2024 03:43

misoperation

@caicancai caicancai closed this Jun 17, 2024
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.

3 participants