alamb commented on code in PR #7259:
URL: https://github.com/apache/arrow-datafusion/pull/7259#discussion_r1290436331


##########
datafusion/core/src/physical_plan/memory.rs:
##########
@@ -44,16 +46,16 @@ pub struct MemoryExec {
     projected_schema: SchemaRef,
     /// Optional projection
     projection: Option<Vec<usize>>,
-    // Optional sort information
-    sort_information: Option<Vec<PhysicalSortExpr>>,
+    // Sort information, including order equivalence

Review Comment:
   ```suggestion
       // Sort information: one or more equivalent orderings
   ```



##########
datafusion/core/src/physical_plan/memory.rs:
##########
@@ -161,16 +169,13 @@ impl MemoryExec {
             schema,
             projected_schema,
             projection,
-            sort_information: None,
+            sort_information: vec![],
         })
     }
 
     /// Set sort information
-    pub fn with_sort_information(
-        mut self,
-        sort_information: Vec<PhysicalSortExpr>,
-    ) -> Self {
-        self.sort_information = Some(sort_information);
+    pub fn with_sort_information(mut self, sort_information: Vec<LexOrdering>) 
-> Self {

Review Comment:
   Maybe we can add some more information here with a link to somewhere that 
explains what multiple equivalent orderings are / mean? I think that would make 
this code easier to use / understand



-- 
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]

Reply via email to