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

Spooling shortcut for one/zero return schemas #2512

Merged
merged 7 commits into from
May 23, 2024

Conversation

max-hoffman
Copy link
Contributor

@max-hoffman max-hoffman commented May 23, 2024

Nodes that return zero or one row don't need a beefy channel/wait group setup to execute. They just need to grab the first row and close the iterator. There are several nodes that incorrectly reported their schemas previously, which I've updated to be more accurate. There are some nodes that optionally return rows, which I've simplified to return an empty schema that can be differentiated from the nil schema. We could make the distinction more explicit, also.

bump with perf here: dolthub/dolt#7894

@max-hoffman max-hoffman requested a review from zachmu May 23, 2024 22:27
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

This is a good optimization but the length of this method has always bothered me and now it's even longer / more indented. Reasonable to pull out a method for each of the three branches? Lots of local vars but most of them are only needed in the spooling case.

@max-hoffman max-hoffman merged commit 17b9cc6 into main May 23, 2024
7 checks passed
@max-hoffman max-hoffman deleted the max/result-row-spool-perf branch May 23, 2024 23:38
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