From 87221fcccdfdf3ceb84c603c59fa2ca477a5ad33 Mon Sep 17 00:00:00 2001 From: Clark Zinzow Date: Wed, 21 Feb 2024 01:02:48 +0000 Subject: [PATCH] Fix TimeUnit. --- daft/daft.pyi | 1 + daft/execution/execution_step.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/daft/daft.pyi b/daft/daft.pyi index b320dbc6d3..d895e067c1 100644 --- a/daft/daft.pyi +++ b/daft/daft.pyi @@ -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): ... diff --git a/daft/execution/execution_step.py b/daft/execution/execution_step.py index 35232ada34..f84499a68a 100644 --- a/daft/execution/execution_step.py +++ b/daft/execution/execution_step.py @@ -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 @@ -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