berkaysynnada commented on code in PR #12876:
URL: https://github.com/apache/datafusion/pull/12876#discussion_r1797440044
##########
datafusion/core/src/datasource/memory.rs:
##########
@@ -241,6 +245,31 @@ impl TableProvider for MemTable {
)
})
.collect::<Result<Vec<_>>>()?;
+
+ // If there is a projection on the source, we also need to project
orderings
Review Comment:
I don't think I can simply apply a straightforward projection to the
`self.sort_order`, as they may still require special handling. For example, if
we have an ordering `[a, b, c]` and the projection excludes column `a`, the
remaining ordering `[b,c]` would not be valid. To avoid missing edge cases like
this, I prefer consulting the equivalence API to ensure correctness.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]