Skip to content

Conversation

@rdettai
Copy link
Contributor

@rdettai rdettai commented Jun 23, 2021

Which issue does this PR close?

Closes #612.

Rationale for this change

The pushdown is forced even for select * in https://github.com/apache/arrow-datafusion/blob/20f6f21ec551f066fd9ff228cc5221f1068c8b03/datafusion/src/optimizer/projection_push_down.rs#L164-L170. In that case, we should ensure that no column is artificially added if the table is empty.

What changes are included in this PR?

I added the test at the context level because it allows it to have a wider coverage of this corner case.

Are there any user-facing changes?

No

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

The change and test looks good to me

Copy link
Contributor

@Dandandan Dandandan left a comment

Choose a reason for hiding this comment

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

👍

@Dandandan Dandandan merged commit c82c29c into apache:master Jun 23, 2021
@Dandandan
Copy link
Contributor

Thanks @rdettai !

@rdettai rdettai deleted the fix-empy-table-proj branch June 24, 2021 06:38
@houqp houqp added the bug Something isn't working label Jul 31, 2021
unkloud pushed a commit to unkloud/datafusion that referenced this pull request Mar 23, 2025
* feat: Use unified allocator for execution iterators

* Disable CometTakeOrderedAndProjectExec

* Add comment

* Increase heap memory

* Enable CometTakeOrderedAndProjectExec

* More

* More

* Reduce heap memory

* Run sort merge join TPCDS with -e for debugging

* Add -X flag

* Disable q72 and q72-v2.7

* Update .github/workflows/benchmark.yml
H0TB0X420 pushed a commit to H0TB0X420/datafusion that referenced this pull request Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Illegal projection on empty columns

4 participants