ion-elgreco opened a new issue, #12370:
URL: https://github.com/apache/datafusion/issues/12370

   ### Describe the bug
   
   Recently we made a change in delta-rs to make the schema's agnostic of 
large/normal/view types. However datafusion can't properly coerce `List` and 
`LargeList` yet
   
   ### To Reproduce
   
   import polars as pl
   tmp_path = "test_table"
   
   pl.DataFrame({"a": ["test"], "b": [[1]]}).write_delta(tmp_path)
   pl.DataFrame({"a": ["test1"], "b": [[1]]}).write_delta(
       tmp_path,
       mode="merge",
       delta_merge_options={
           "predicate": "s.a = t.a",
           "source_alias": "s",
           "target_alias": "t",
       },
   ).when_not_matched_insert_all().execute()
   
   
   ```
   DeltaError: Generic DeltaTable error: type_coercion
   caused by
   Error during planning: Failed to coerce then ([LargeList(Field { name: 
"item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, 
metadata: {} }), List(Field { name: "item", data_type: Int64, nullable: true, 
dict_id: 0, dict_is_ordered: false, metadata: {} }), List(Field { name: "item", 
data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: 
{} }), List(Field { name: "item", data_type: Int64, nullable: true, dict_id: 0, 
dict_is_ordered: false, metadata: {} })]) and else (None) to common types in 
CASE WHEN expression
   ```
   
   ### Expected behavior
   
   Be able to coerce any list type combination, whether its large, view or 
normal
   
   ### Additional context
   
   _No response_


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