Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cast list items to default before write with different item nam…
…es (#1959) # Description Delta-rs always uses `item` as the list item name when writing lists. If you read data which is for example written by Spark, the item name is `element`, in the current implemantation it's not possible to write RecordBatches with a different item name. This leads for example to the problem that you cann't optimize tables which are written by Spark and contain a List column. In this MR I add condition which will intiate a cast if the list item name of the record batch is different to the target schema one. I have also tried to explain this behaviour in the tests, but unfortunately creating the test data has become complicated (Happy to get feedback) This is my first MR in this project # Related Issue(s) https://github.com/delta-io/delta-rs/blob/main/crates/deltalake-core/src/kernel/arrow/mod.rs#L58 https://github.com/delta-io/delta-rs/pull/684/files#r940790524 https://delta-users.slack.com/archives/C013LCAEB98/p1701885637615699 --------- Co-authored-by: Jonas Schmitz <jonas.schmitz@obi.de> Co-authored-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com> Co-authored-by: Robert Pack <42610831+roeap@users.noreply.github.com>
- Loading branch information