Skip to content

Commit

Permalink
Fix TimeUnit.
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkzinzow committed Feb 21, 2024
1 parent 5ead3fc commit 87221fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions daft/daft.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class ParquetSourceConfig:
"""
Configuration of a Parquet data source.
"""

coerce_int96_timestamp_unit: PyTimeUnit | None

def __init__(self, coerce_int96_timestamp_unit: PyTimeUnit | None = None): ...
Expand Down
3 changes: 2 additions & 1 deletion daft/execution/execution_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
ResourceRequest,
StorageConfig,
)
from daft.datatype import TimeUnit
from daft.expressions import Expression, ExpressionsProjection, col
from daft.logical.map_partition_ops import MapPartitionOp
from daft.logical.schema import Schema
Expand Down Expand Up @@ -409,7 +410,7 @@ def _handle_tabular_files_scan(
storage_config=self.storage_config,
read_options=read_options,
parquet_options=TableParseParquetOptions(
coerce_int96_timestamp_unit=format_config.coerce_int96_timestamp_unit,
coerce_int96_timestamp_unit=TimeUnit._from_pytimeunit(format_config.coerce_int96_timestamp_unit),
),
)
for fp in filepaths
Expand Down

0 comments on commit 87221fc

Please sign in to comment.