From af7a7bc152e9b9709b53123f5491a11e4531994c Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sat, 4 Jul 2026 16:08:48 +0530 Subject: [PATCH] fix: require pyarrow>=18.0.0 for native UUID type support PyIceberg's PyArrow UUID handling relies on APIs that only exist in Apache Arrow 18.0.0 and later, but the pyarrow, pandas, duckdb, and ray extras still pin pyarrow>=17.0.0. On write, PyArrowSchemaVisitor.visit_uuid returns pa.uuid(); on read, _ConvertToIceberg branches on isinstance(primitive, pa.UuidType). Both pyarrow.uuid() and pyarrow.UuidType were introduced in pyarrow 18.0.0 and do not exist on 17.x, so an install that resolves pyarrow==17.x raises AttributeError as soon as a UUID-typed column is written or an Arrow schema containing a UUID is converted back to Iceberg. Bump the floor to pyarrow>=18.0.0 for the affected extras so the declared dependency matches what the code actually requires, and keep uv.lock in sync. --- pyproject.toml | 8 ++++---- uv.lock | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e60222fcf9..76c8526712 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,19 +55,19 @@ pyiceberg = "pyiceberg.cli.console:run" [project.optional-dependencies] pyarrow = [ - "pyarrow>=17.0.0", + "pyarrow>=18.0.0", ] pandas = [ "pandas>=1.0.0", - "pyarrow>=17.0.0", + "pyarrow>=18.0.0", ] duckdb = [ "duckdb>=0.5.0", - "pyarrow>=17.0.0", + "pyarrow>=18.0.0", ] ray = [ "ray>=2.10.0", - "pyarrow>=17.0.0", + "pyarrow>=18.0.0", "pandas>=1.0.0", ] bodo = ["bodo>=2025.7.4"] diff --git a/uv.lock b/uv.lock index 002111053c..0aea046671 100644 --- a/uv.lock +++ b/uv.lock @@ -5058,10 +5058,10 @@ requires-dist = [ { name = "pandas", marker = "extra == 'ray'", specifier = ">=1.0.0" }, { name = "polars", marker = "extra == 'polars'", specifier = ">=1.21.0" }, { name = "psycopg2-binary", marker = "extra == 'sql-postgres'", specifier = ">=2.9.6" }, - { name = "pyarrow", marker = "extra == 'duckdb'", specifier = ">=17.0.0" }, - { name = "pyarrow", marker = "extra == 'pandas'", specifier = ">=17.0.0" }, - { name = "pyarrow", marker = "extra == 'pyarrow'", specifier = ">=17.0.0" }, - { name = "pyarrow", marker = "extra == 'ray'", specifier = ">=17.0.0" }, + { name = "pyarrow", marker = "extra == 'duckdb'", specifier = ">=18.0.0" }, + { name = "pyarrow", marker = "extra == 'pandas'", specifier = ">=18.0.0" }, + { name = "pyarrow", marker = "extra == 'pyarrow'", specifier = ">=18.0.0" }, + { name = "pyarrow", marker = "extra == 'ray'", specifier = ">=18.0.0" }, { name = "pydantic", specifier = ">=2.0,!=2.4.0,!=2.4.1,!=2.12.0,!=2.12.1,<3.0" }, { name = "pyiceberg-core", marker = "extra == 'pyiceberg-core'", specifier = ">=0.5.1,<0.10.0" }, { name = "pyparsing", specifier = ">=3.1.0" },