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(planner): Fix prune projection #7013

Merged
merged 1 commit into from
Aug 5, 2022

Conversation

leiysky
Copy link
Contributor

@leiysky leiysky commented Aug 5, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Keep at least one column for Project operator.

@vercel
Copy link

vercel bot commented Aug 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Aug 5, 2022 at 2:35PM (UTC)

@leiysky leiysky requested review from sundy-li and andylokandy August 5, 2022 14:35
@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label Aug 5, 2022
@leiysky leiysky merged commit f6dda7b into databendlabs:main Aug 5, 2022
@leiysky leiysky deleted the fix-prune-columns branch August 5, 2022 15:07
let mut used: ColumnSet = p.columns.intersection(&required).cloned().collect();
if used.is_empty() {
// Keep at least one column for project.
used.insert(*p.columns.iter().sorted().take(1).next().ok_or_else(|| {
Copy link
Contributor

@andylokandy andylokandy Aug 5, 2022

Choose a reason for hiding this comment

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

What about using min() instead of sorted().take(1).next()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants