Blizzara commented on code in PR #11547:
URL: https://github.com/apache/datafusion/pull/11547#discussion_r1685012930


##########
datafusion/sqllogictest/test_files/map.slt:
##########
@@ -302,3 +302,11 @@ SELECT MAP(arrow_cast(make_array('POST', 'HEAD', 'PATCH'), 
'LargeList(Utf8)'), a
 {POST: 41, HEAD: 33, PATCH: 30}
 {POST: 41, HEAD: 33, PATCH: 30}
 {POST: 41, HEAD: 33, PATCH: 30}
+
+
+query ?
+VALUES (MAP(['a'], [1])), (MAP(['b'], [2])), (MAP(['c', 'a'], [3, 1]))

Review Comment:
   Without the changes in `scalar/mod.rs`, this would error:
   ```
   External error: query failed: DataFusion error: Internal error: Unsupported 
creation of Map(Field { name: "entries", data_type: Struct([Field { name: 
"key", data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, 
metadata: {} }, Field { name: "value", data_type: Int64, nullable: true, 
dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 
0, dict_is_ordered: false, metadata: {} }, false) array from ScalarValue 
Some(Map([{}])).
   This was likely caused by a bug in DataFusion's code and we would welcome 
that you file an bug report in our issue tracker
   [SQL] VALUES(MAP([], []))
   at test_files/map.slt:307
   ```



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