Skip to content

Commit bae5d54

Browse files
committed
Add feature flag for pyarrow UUID helper detection
Implement a feature flag to check for UUID helper in pyarrow. Add conditional skip to the UUID extension UDF chaining test when the helper is unavailable, retaining original assertions for supported environments.
1 parent 5aacb41 commit bae5d54

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/tests/test_udf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from datafusion import column, udf
2323

2424

25+
UUID_EXTENSION_AVAILABLE = hasattr(pa, "uuid")
26+
27+
2528
@pytest.fixture
2629
def df(ctx):
2730
# create a RecordBatch and a new DataFrame from it
@@ -128,6 +131,10 @@ def udf_with_param(values: pa.Array) -> pa.Array:
128131
assert result == pa.array([False, True, True])
129132

130133

134+
@pytest.mark.skipif(
135+
not UUID_EXTENSION_AVAILABLE,
136+
reason="PyArrow uuid extension helper unavailable",
137+
)
131138
def test_uuid_extension_chain(ctx) -> None:
132139
uuid_type = pa.uuid()
133140
uuid_field = pa.field("uuid_col", uuid_type)

0 commit comments

Comments
 (0)