From a2be40a276a987290ac2bea3c8ad35de60dda0d4 Mon Sep 17 00:00:00 2001 From: Colin Ho Date: Fri, 16 Feb 2024 17:44:21 +0800 Subject: [PATCH] add back from_py test data --- tests/table/test_from_py.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/table/test_from_py.py b/tests/table/test_from_py.py index 8f7cf68c99..26d7fba527 100644 --- a/tests/table/test_from_py.py +++ b/tests/table/test_from_py.py @@ -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": [{}, {}], @@ -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()}), @@ -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({}), @@ -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())])), @@ -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())]),