jayzhan211 commented on code in PR #7893:
URL: https://github.com/apache/arrow-datafusion/pull/7893#discussion_r1447448644


##########
datafusion/common/src/scalar.rs:
##########
@@ -2988,18 +3034,38 @@ impl fmt::Display for ScalarValue {
             ScalarValue::DurationMillisecond(e) => format_option!(f, e)?,
             ScalarValue::DurationMicrosecond(e) => format_option!(f, e)?,
             ScalarValue::DurationNanosecond(e) => format_option!(f, e)?,
-            ScalarValue::Struct(e, fields) => match e {
-                Some(l) => write!(
+            ScalarValue::Struct(struct_arr) => {
+                // ScalarValue Struct should always have a single element
+                assert_eq!(struct_arr.len(), 1);
+
+                let columns = struct_arr.columns();
+                let fields = struct_arr.fields();
+                let nulls = struct_arr.nulls();
+
+                write!(

Review Comment:
   to align with the old format
   



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