goldmedal commented on code in PR #11224:
URL: https://github.com/apache/datafusion/pull/11224#discussion_r1664044352


##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -3399,6 +3451,43 @@ impl fmt::Display for ScalarValue {
                         .join(",")
                 )?
             }
+            ScalarValue::Map(map_arr) => {
+                if map_arr.null_count() == map_arr.len() {

Review Comment:
   > should this also have the assert like Struct?
   > 
   > ```
   > // ScalarValue Map should always have a single element
   > assert_eq!(map_arr.len(), 1);
   > ```
   
   
   No, `MapArray` is `StructArray`. It could contain more than one element. 
   
   > or if not, then maybe 
https://github.com/apache/datafusion/pull/11224/files#diff-49e275af8f09685c7bbc491db8ab3b9479960878f42ac558ec0e3e39570590bdR3583
 shoulnd't have it either ? 😅
   
   I forgot to remove this. Thanks for reminding me.



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

Reply via email to