What happened?
As the title suggests, an error doesn't get raised when the schemas are not matching.
Am i missing something?
Expected behavior
I would expect a ValueError, as described in the docs.
Operating System
macOS
Binding
Python
Bindings Version
1.2.1
Steps to reproduce
import datetime
import deltalake
import polars as pl
schema1 = pl.Schema({'id': pl.Int64, 'name': pl.String, 'age': pl.Int64})
schema2 = pl.Schema({'id': pl.Int64, 'name': pl.String, 'age': pl.Date})
schema3 = pl.Schema({'id': pl.Int64, 'name': pl.String, 'age': pl.String})
df1 = pl.DataFrame({'id': [1, 2], 'name': ['Alice', 'Bob'], 'age': [25, 30]}, schema=schema1)
df2 = pl.DataFrame(
{'id': [10, 11], 'name': ['Simon', 'Tom'], 'age': [datetime.date(2025, 1, 1), datetime.date(2025, 1, 2)]},
schema=schema2,
)
df3 = pl.DataFrame(
{'id': [10, 11], 'name': ['Kate', 'John'], 'age': ['25', '30']},
schema=schema3,
)
delta_path = 'test_delta_table'
deltalake.write_deltalake(str(delta_path), df1, mode='append')
deltalake.write_deltalake(str(delta_path), df2, mode='append')
deltalake.write_deltalake(str(delta_path), df3, mode='append')
df_read = pl.read_delta(str(delta_path))
print(df_read)
### Relevant logs
```shell
shape: (6, 3)
┌─────┬───────┬───────┐
│ id ┆ name ┆ age │
│ --- ┆ --- ┆ --- │
│ i64 ┆ str ┆ i64 │
╞═════╪═══════╪═══════╡
│ 10 ┆ Kate ┆ 25 │
│ 11 ┆ John ┆ 30 │
│ 10 ┆ Simon ┆ 20089 │
│ 11 ┆ Tom ┆ 20090 │
│ 1 ┆ Alice ┆ 25 │
│ 2 ┆ Bob ┆ 30 │
└─────┴───────┴───────┘
What happened?
As the title suggests, an error doesn't get raised when the schemas are not matching.
Am i missing something?
Expected behavior
I would expect a
ValueError, as described in the docs.Operating System
macOS
Binding
Python
Bindings Version
1.2.1
Steps to reproduce