Weijun-H commented on PR #12194:
URL: https://github.com/apache/datafusion/pull/12194#issuecomment-2312474996

   > Encounter a bug. Fixed it by changing field name to `item`. But why ?
   > 
   > ```
   > Internal error: Failed due to a difference in schemas, original schema: 
DFSchema { inner: Schema { fields: [Field { name: 
"map_keys(map(make_array(Int64(1),Int64(2),Int64(3)),make_array(Int64(1),Int64(2),Int64(3))))",
 data_type: List(Field { name: "keys", data_type: Int64, nullable: false, 
dict_id: 0, dict_is_ordered: false, metadata: {} }), nullable: true, dict_id: 
0, dict_is_ordered: false, metadata: {} }], metadata: {} }, field_qualifiers: 
[None], functional_dependencies: FunctionalDependencies { deps: [] } }, new 
schema: DFSchema { inner: Schema { fields: [Field { name: 
"map_keys(map(make_array(Int64(1),Int64(2),Int64(3)),make_array(Int64(1),Int64(2),Int64(3))))",
 data_type: List(Field { name: "item", data_type: Int64, nullable: false, 
dict_id: 0, dict_is_ordered: false, metadata: {} }), nullable: false, dict_id: 
0, dict_is_ordered: false, metadata: {} }], metadata: {} }, field_qualifiers: 
[None], functional_dependencies: FunctionalDependencies { deps: [] } }.
   > ```
   
   I think it is caused by the pre-defined field name in `make_array`.
   
   
https://github.com/apache/datafusion/blob/7e9ea3ad59071d56093c197c5ecd5c50021deb94/datafusion/functions-nested/src/map.rs#L33-L39


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to