Skip to content

Commit

Permalink
[CHORE] Update test to only use store_schema kwarg for pa>=11 (#1253)
Browse files Browse the repository at this point in the history
PyArrow only adds the flag after version 11

Co-authored-by: Jay Chia <[email protected]@users.noreply.github.com>
  • Loading branch information
jaychia and Jay Chia committed Aug 10, 2023
1 parent 074e37c commit 753aeaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/table/table_io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from daft.runners.partitioning import TableParseParquetOptions, TableReadOptions
from daft.table import Table, schema_inference, table_io

PYARROW_GE_7_0_0 = tuple(int(s) for s in pa.__version__.split(".") if s.isnumeric()) >= (7, 0, 0)
PYARROW_GE_11_0_0 = tuple(int(s) for s in pa.__version__.split(".") if s.isnumeric()) >= (11, 0, 0)


def test_read_input(tmpdir):
Expand Down Expand Up @@ -183,7 +183,7 @@ def test_parquet_read_int96_timestamps(use_deprecated_int96_timestamps, use_nati
"use_deprecated_int96_timestamps": use_deprecated_int96_timestamps,
"coerce_timestamps": "us" if not use_deprecated_int96_timestamps else None,
}
if PYARROW_GE_7_0_0:
if PYARROW_GE_11_0_0:
papq_write_table_kwargs["store_schema"] = False

with _parquet_write_helper(
Expand Down Expand Up @@ -220,7 +220,7 @@ def test_parquet_read_int96_timestamps_overflow(coerce_to, use_native_downloader
papq_write_table_kwargs = {
"use_deprecated_int96_timestamps": True,
}
if PYARROW_GE_7_0_0:
if PYARROW_GE_11_0_0:
papq_write_table_kwargs["store_schema"] = False

with _parquet_write_helper(
Expand Down Expand Up @@ -255,7 +255,7 @@ def test_parquet_read_int96_timestamps_schema_inference(coerce_to):
papq_write_table_kwargs = {
"use_deprecated_int96_timestamps": True,
}
if PYARROW_GE_7_0_0:
if PYARROW_GE_11_0_0:
papq_write_table_kwargs["store_schema"] = False

with _parquet_write_helper(
Expand Down

0 comments on commit 753aeaf

Please sign in to comment.