Skip to content

Commit

Permalink
Merge remote-tracking branch 'mlrun/development' into ML-1325
Browse files Browse the repository at this point in the history
  • Loading branch information
Gal Topper committed Jul 12, 2023
2 parents fa9adff + 5f4b4ad commit eb0c94b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions storey/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,16 @@ def unzip_cols(columns):

_type_string_to_pyarrow_type = {
"str": pyarrow.string(),
"int8": pyarrow.int8(),
"int16": pyarrow.int16(),
"int32": pyarrow.int32(),
"int64": pyarrow.int64(),
"uint8": pyarrow.uint8(),
"uint16": pyarrow.uint16(),
"uint32": pyarrow.uint32(),
"uint64": pyarrow.uint64(),
"int": pyarrow.int64(),
"float16": pyarrow.float16(),
"float32": pyarrow.float32(),
"float": pyarrow.float64(),
"bool": pyarrow.bool_(),
Expand Down
3 changes: 2 additions & 1 deletion tests/test_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,7 @@ def test_write_to_parquet_string_as_datetime(tmpdir):
out_dir = f"{tmpdir}/test_write_to_parquet_string_to_datetime/{uuid.uuid4().hex}/"
columns = ["my_int", "my_string", "my_datetime"]
columns_with_type = [
("my_int", "int"),
("my_int", "int8"), # ML-4162
("my_string", "str"),
("my_datetime", "datetime"),
]
Expand All @@ -2506,6 +2506,7 @@ def test_write_to_parquet_string_as_datetime(tmpdir):
controller.emit([i, f"this is {i}", my_time.isoformat()])
expected.append([i, f"this is {i}", my_time.isoformat(sep=" ")])
expected_df = pd.DataFrame(expected, columns=columns)
expected_df["my_int"] = expected_df["my_int"].astype("int8")
expected_df["my_datetime"] = expected_df["my_datetime"].astype("datetime64[us]")
controller.terminate()
controller.await_termination()
Expand Down

0 comments on commit eb0c94b

Please sign in to comment.