Skip to content

Commit

Permalink
add back from_py test data
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-ho committed Feb 22, 2024
1 parent 24c6fab commit 3a271c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/table/test_from_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"str": ["foo", "bar"],
"binary": [b"foo", b"bar"],
"date": [datetime.date.today(), datetime.date.today()],
"time": [datetime.time(1, 2, 3), datetime.time(4, 5, 6)],
"list": [[1, 2], [3]],
"struct": [{"a": 1, "b": 2.0}, {"b": 3.0}],
"empty_struct": [{}, {}],
Expand All @@ -41,6 +42,7 @@
"str": DataType.string(),
"binary": DataType.binary(),
"date": DataType.date(),
"time": DataType.time(TimeUnit.us()),
"list": DataType.list(DataType.int64()),
"struct": DataType.struct({"a": DataType.int64(), "b": DataType.float64()}),
"empty_struct": DataType.struct({"": DataType.null()}),
Expand All @@ -65,6 +67,7 @@
"str": pa.large_string(),
"binary": pa.large_binary(),
"date": pa.date32(),
"time": pa.time64("us"),
"list": pa.large_list(pa.int64()),
"struct": pa.struct({"a": pa.int64(), "b": pa.float64()}),
"empty_struct": pa.struct({}),
Expand All @@ -91,6 +94,7 @@
"binary": pa.array(PYTHON_TYPE_ARRAYS["binary"], pa.binary()),
"boolean": pa.array(PYTHON_TYPE_ARRAYS["bool"], pa.bool_()),
"date32": pa.array(PYTHON_TYPE_ARRAYS["date"], pa.date32()),
"time64": pa.array(PYTHON_TYPE_ARRAYS["time"], pa.time64("us")),
"list": pa.array(PYTHON_TYPE_ARRAYS["list"], pa.list_(pa.int64())),
"fixed_size_list": pa.array([[1, 2], [3, 4]], pa.list_(pa.int64(), 2)),
"struct": pa.array(PYTHON_TYPE_ARRAYS["struct"], pa.struct([("a", pa.int64()), ("b", pa.float64())])),
Expand Down Expand Up @@ -140,6 +144,7 @@
"binary": pa.large_binary(),
"boolean": pa.bool_(),
"date32": pa.date32(),
"time64": pa.time64("us"),
"list": pa.large_list(pa.int64()),
"fixed_size_list": pa.list_(pa.int64(), 2),
"struct": pa.struct([("a", pa.int64()), ("b", pa.float64())]),
Expand Down

0 comments on commit 3a271c3

Please sign in to comment.