-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(python): add schema conversion of FixedSizeBinaryArray and Fixed…
…SizeListType (#2005) # Description Map `FixedSizeBinaryType` to `BinaryArray`, since Delta does not support fixed arrays. # Related Issue(s) None. # Documentation N/A # Minimal Example I've noticed this error when doing subsequent calls to like so: ``` import deltalake as dl import pyarrow as pa schema = pa.schema([ ("field_a", pa.binary(4)), # To simulate fix, switch this line to: ("field_a", pa.binary()), ]) table = pa.Table.from_pylist( [ {"field_a": val.to_bytes(4, "little")} for val in range(0, 100) ], schema=schema ) # This works dl.write_deltalake( "bad_table", data=table, mode="append", ) # This fails dl.write_deltalake( "bad_table", data=table, mode="append", ) ``` with error: ``` ValueError: Schema of data does not match table schema Data schema: field_a: fixed_size_binary[4] Table Schema: field_a: binary ``` --------- Co-authored-by: Jakub Filipek <jakub@overland.ai> Co-authored-by: Jakub Filipek <jfilipek@proton.me>
- Loading branch information
1 parent
25040b8
commit a86cf66
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters