You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jonahgao (via GitHub)" <gi...@apache.org> on 2025/01/09 15:38:14 UTC

Re: [PR] added "DEFAULT_CLI_FORMAT_OPTIONS" for cli and sqllogic test [datafusion]

jonahgao commented on code in PR #14052:
URL: https://github.com/apache/datafusion/pull/14052#discussion_r1909024806


##########
datafusion/functions-nested/src/map.rs:
##########
@@ -195,7 +195,7 @@ SELECT MAP('type', 'test');
 
 SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
 ----
-{POST: 41, HEAD: 33, PATCH: }
+{POST: 41, HEAD: 33, PATCH: NULL}

Review Comment:
   It is more human-readable to me.



##########
datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs:
##########
@@ -240,7 +240,8 @@ pub fn cell_to_string(col: &ArrayRef, row: usize) -> Result<String> {
                 Ok(cell_to_string(dict.values(), key)?)
             }
             _ => {
-                let f = ArrayFormatter::try_new(col.as_ref(), &DEFAULT_FORMAT_OPTIONS);
+                let f =
+                    ArrayFormatter::try_new(col.as_ref(), &DEFAULT_CLI_FORMAT_OPTIONS);

Review Comment:
   This change makes it consistent with
   https://github.com/apache/datafusion/blob/61afb0d486b4617ddc79cb01e8765fedd3ae247b/datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs#L198-L201



-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org