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

move EmptyExec produce_one_row to be part of MemoryExec #8412

Closed

Conversation

razeghi71
Copy link
Contributor

@razeghi71 razeghi71 commented Dec 4, 2023

Which issue does this PR close?

Closes #8355.

Rationale for this change

Explained in the issue.

What changes are included in this PR?

In this PR I moved the produce_one_row logic in EmptyExec into a new constructor in MemoryExec. I haven't found anywhere where the multiple partition case for produce_one_row was used, but I made it so that it also input the number of partitions.

What I didn't do in this PR is to change the LogicalPlan::EmptyRelation to remove the product_one_row logic there. Probably a good Idea to do this in another PR.

Are these changes tested?

Yes, I have brought the tests that we had before in EmptyExec for the produce_one_row case over to the MemoryExec and the previous tests are working which I assume contains cases such as SELECT now() or select 1,2,3 (I haven't looked at this honestly, but I can implement this kind of tests also).

Are there any user-facing changes?

No.

@github-actions github-actions bot added the core Core DataFusion crate label Dec 4, 2023
@razeghi71 razeghi71 force-pushed the one-row-empty-exec-to-memory-exec branch 2 times, most recently from 9e902bf to 0a8d519 Compare December 4, 2023 11:51
@razeghi71 razeghi71 force-pushed the one-row-empty-exec-to-memory-exec branch from 0a8d519 to f5c6cf7 Compare December 4, 2023 12:01
@github-actions github-actions bot added optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt) labels Dec 4, 2023
@razeghi71 razeghi71 force-pushed the one-row-empty-exec-to-memory-exec branch 2 times, most recently from 4d8d85d to 7dfbd86 Compare December 4, 2023 18:31
@razeghi71 razeghi71 force-pushed the one-row-empty-exec-to-memory-exec branch from 7dfbd86 to 2312e1f Compare December 4, 2023 18:49
@razeghi71 razeghi71 closed this Dec 7, 2023
@razeghi71 razeghi71 deleted the one-row-empty-exec-to-memory-exec branch December 7, 2023 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split EmptyExec into OneRowExec
1 participant