sundaresanr commented on issue #1491:
URL:
https://github.com/apache/iceberg-python/issues/1491#issuecomment-2576078566
@kevinjqliu The issue can be reproduced with a partitioned table.
As you can see in the backtrace, the issue is with the call to
`_determine_partitions()`, which calls `arrow_table.take()`
You can reproduce the issue with this code [added partition spec]
```
import numpy as np
import pyarrow as pa
from pyiceberg import transforms
from pyiceberg.catalog.sql import SqlCatalog
x = np.random.randint(low=0, high=1000, size=(30_000,)).tolist()
ta = pa.chunked_array([x] * 10_000)
y = ["fixed_string"] * 30_000
tb = pa.chunked_array([y] * 10_000)
# Create pa.table
arrow_table = pa.table({"a": ta, "b": tb})
warehouse_path = "/tmp/warehouse"
catalog = SqlCatalog(
"default",
uri=f"sqlite:///{warehouse_path}/pyiceberg_catalog.db",
warehouse=f"file://{warehouse_path}",
)
catalog.create_namespace_if_not_exists("default")
try:
catalog.drop_table("default.locations")
except:
pass
table = catalog.create_table("default.locations", arrow_table.schema)
with table.update_spec() as update_spec:
update_spec.add_field("b", transforms.IdentityTransform(), "pb")
table.append(arrow_table)
```
--
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]