Weijun-H commented on code in PR #8304:
URL: https://github.com/apache/arrow-datafusion/pull/8304#discussion_r1402356135


##########
datafusion/core/src/datasource/physical_plan/mod.rs:
##########
@@ -135,10 +135,23 @@ impl DisplayAs for FileScanConfig {
             write!(f, ", infinite_source=true")?;
         }
 
-        if let Some(ordering) = orderings.first() {
-            if !ordering.is_empty() {
-                write!(f, ", output_ordering={}", 
OutputOrderingDisplay(ordering))?;
+        if !orderings.is_empty() && !orderings[0].is_empty() {

Review Comment:
   ```suggestion
           if let Some(ordering) = orderings.get(0) {
               if !ordering.is_empty() {
   ```



##########
datafusion/core/src/datasource/physical_plan/mod.rs:
##########
@@ -135,10 +135,23 @@ impl DisplayAs for FileScanConfig {
             write!(f, ", infinite_source=true")?;
         }
 
-        if let Some(ordering) = orderings.first() {
-            if !ordering.is_empty() {
-                write!(f, ", output_ordering={}", 
OutputOrderingDisplay(ordering))?;
+        if !orderings.is_empty() && !orderings[0].is_empty() {
+            let start = if orderings.len() == 1 {
+                ", output_ordering="
+            } else {
+                ", output_orderings=["
+            };
+            write!(f, "{}", start)?;
+            for (idx, ordering) in orderings.iter().enumerate() {
+                if !ordering.is_empty() {

Review Comment:
   ```suggestion
                   for (idx, ordering) in
                       orderings.iter().enumerate().filter(|(_, o)| 
!o.is_empty())
   ```



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