Skip to content

Conversation

@Tpt
Copy link
Contributor

@Tpt Tpt commented Nov 29, 2025

It was previously ignored

Which issue does this PR close?

Rationale for this change

All TableProvider implementations must support the projection argument of the scan method. This was not the case in CteWorkTable.

What changes are included in this PR?

Minimal implementation of the projection support. The projection applied before the plan node return results. It might be nice to push it further inside of the recursion implementation to reduce memory consumption but I preferred to keep the fix minimal.

Are these changes tested?

I have not figured out yet a nice SQL query to trigger an error without this change. Some existing queries in cte.slt have set projection (i.e. not None) so the code is very likely working. Help on it welcome!

@github-actions github-actions bot added catalog Related to the catalog crate physical-plan Changes to the physical-plan crate labels Nov 29, 2025
@Tpt Tpt marked this pull request as ready for review November 29, 2025 20:39
@Tpt Tpt changed the title CteWorkTable: properly apply TableProvider::scan projection argument fix: CteWorkTable: properly apply TableProvider::scan projection argument Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catalog Related to the catalog crate physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CteWorkTable does not properly apply projection

1 participant