8000 format · chenkovsky/datafusion-python@0d6cd07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d6cd07

Browse files
committed
format
1 parent a7993a1 commit 0d6cd07

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/tests/test_functions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,9 @@ def test_temporal_functions(df):
884884
literal("2023-09-07 05:06:14.523952000"), literal("%Y-%m-%d %H:%M:%S.%f")
885885
),
886886
f.to_timestamp_nanos(literal("2023-09-07 05:06:14.523952")),
887+
f.to_timestamp_nanos(
888+
literal("2023-09-07 05:06:14.523952000"), literal("%Y-%m-%d %H:%M:%S.%f")
889+
),
887890
)
888891
result = df.collect()
889892
assert len(result) == 1
@@ -934,6 +937,12 @@ def test_temporal_functions(df):
934937
assert result.column(14) == pa.array(
935938
[datetime(2023, 9, 7, 5, 6, 14, 523952)] * 3, type=pa.timestamp("us")
936939
)
940+
assert result.column(15) == pa.array(
941+
[datetime(2023, 9, 7, 5, 6, 14, 523952)] * 3, type=pa.timestamp("ns")
942+
)
943+
assert result.column(16) == pa.array(
944+
[datetime(2023, 9, 7, 5, 6, 14, 523952)] * 3, type=pa.timestamp("ns")
945+
)
937946

938947

939948
def test_arrow_cast(df):

0 commit comments

Comments
 (0)
0