You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/01 14:53:59 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2389: Support struct_expr generate struct in sql

andygrove commented on code in PR #2389:
URL: https://github.com/apache/arrow-datafusion/pull/2389#discussion_r862485429


##########
datafusion/core/tests/sql/expr.rs:
##########
@@ -510,6 +510,23 @@ async fn test_array_literals() -> Result<()> {
     Ok(())
 }
 
+#[tokio::test]
+async fn test_struct_literals() -> Result<()> {
+    test_expression!(
+        "STRUCT(1,2,3,4,5)",
+        "{\"f_0\": 1, \"f_1\": 2, \"f_2\": 3, \"f_3\": 4, \"f_4\": 5}"

Review Comment:
   I would prefer the generated column names to be `c0`, `c1`, ... but that is just personal preference (and probably based on experience with Spark).



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

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