srh opened a new pull request, #17185: URL: https://github.com/apache/datafusion/pull/17185
This makes pushing projections down into MemorySourceConfig tables not discard their sort ordering. This lacks tests. Please tell me where I should put tests. I will add them. (Should they be in memory.rs? In physical planning code?) (As far as I can tell, we can't create a sort order on in-memory tables via SQL, thus SQL test case files wouldn't be the place.) I think a test will want to specifically check that a plan requiring a sort order consistent with a sorted MemorySourceConfig (and a simple projection on top) produces the correct plan without unnecessary sort nodes, no sanity check failures, or whatnot. ## Which issue does this PR close? - Closes #17184. ## Rationale for this change Without this change, it is impossible in some circumstances for query plans to take advantage of known sort order for in-memory tables. I forget how this bug manifests, but it might be that discarding sort order breaks optimization sanity checks in some way too, or produces an incorrect plan. ## Are these changes tested? Not in the DataFusion repository. (See comment above asking for advice on where to add tests.) ## Are there any user-facing changes? No? (Or yes? I mean, this fixes planning behavior for some users.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org