Skip to content

Commit

Permalink
Fix test failures with new pyarrow (#477)
Browse files Browse the repository at this point in the history
Also fixes type warning.
  • Loading branch information
gtopper authored Dec 17, 2023
1 parent f3f11e8 commit a6d37a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4473,7 +4473,7 @@ def test_filter_by_time_non_partitioned(data_with_timezone, filter_with_timezone
)
df.set_index("my_string")
path = "/tmp/test_filter_by_time_non_partitioned.parquet"
df.to_parquet(path)
df.to_parquet(path, coerce_timestamps="us")
start = datetime.fromisoformat("2019-07-01 00:00:00" + ("+00:00" if data_with_timezone else ""))
end = pd.Timestamp("2020-12-31 14:00:00" + ("Z" if data_with_timezone else ""))

Expand Down Expand Up @@ -4513,14 +4513,14 @@ def test_empty_filter_result():
)
df.set_index("my_string")
path = "/tmp/test_empty_filter_result.parquet"
df.to_parquet(path)
df.to_parquet(path, coerce_timestamps="us")
start = pd.Timestamp("2022-07-01 00:00:00")
end = pd.Timestamp("2022-12-31 14:00:00")

controller = build_flow(
[
ParquetSource(path, start_filter=start, end_filter=end, filter_column="my_time"),
ReduceToDataFrame(index=["my_string"], insert_key_column_as=["my_string"]),
ReduceToDataFrame(index="my_string", insert_key_column_as="my_string"),
]
).run()

Expand Down

0 comments on commit a6d37a1

Please sign in to comment.