Skip to content

Commit 9f31c67

Browse files
authored
Merge branch 'main' into use-to_backend
2 parents 2053315 + 9a758df commit 9f31c67

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit/io/test_io.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ def test_hive_partitioned_data(tmpdir, cpu):
579579
# Make sure the directory structure is hive-like
580580
df_expect = ddf.compute()
581581
df_expect = df_expect.sort_values(["id", "x", "y"]).reset_index(drop=True)
582+
ts_dtype = df_expect["timestamp"].dtype
582583
timestamp_check = df_expect["timestamp"].iloc[0]
583584
name_check = df_expect["name"].iloc[0]
584585
result_paths = glob.glob(
@@ -596,7 +597,7 @@ def test_hive_partitioned_data(tmpdir, cpu):
596597
# Read back with dask.dataframe and check the data
597598
df_check = dd.read_parquet(path, engine="pyarrow").compute()
598599
df_check["name"] = df_check["name"].astype("object")
599-
df_check["timestamp"] = df_check["timestamp"].astype("int64")
600+
df_check["timestamp"] = df_check["timestamp"].astype(ts_dtype)
600601
df_check = df_check.sort_values(["id", "x", "y"]).reset_index(drop=True)
601602
for col in df_expect:
602603
# Order of columns can change after round-trip partitioning
@@ -605,7 +606,7 @@ def test_hive_partitioned_data(tmpdir, cpu):
605606
# Read back with NVT and check the data
606607
df_check = merlin.io.Dataset(path, engine="parquet").to_ddf().compute()
607608
df_check["name"] = df_check["name"].astype("object")
608-
df_check["timestamp"] = df_check["timestamp"].astype("int64")
609+
df_check["timestamp"] = df_check["timestamp"].astype(ts_dtype)
609610
df_check = df_check.sort_values(["id", "x", "y"]).reset_index(drop=True)
610611
for col in df_expect:
611612
# Order of columns can change after round-trip partitioning

0 commit comments

Comments
 (0)