diff --git a/duckdb/__init__.py b/duckdb/__init__.py index e1a4aa9a..a7370083 100644 --- a/duckdb/__init__.py +++ b/duckdb/__init__.py @@ -184,7 +184,7 @@ ShortValue, StringValue, StructValue, - TimestampMilisecondValue, + TimestampMillisecondValue, TimestampNanosecondValue, TimestampSecondValue, TimestampTimeZoneValue, @@ -270,7 +270,7 @@ "SyntaxException", "TimeTimeZoneValue", "TimeValue", - "TimestampMilisecondValue", + "TimestampMillisecondValue", "TimestampNanosecondValue", "TimestampSecondValue", "TimestampTimeZoneValue", diff --git a/duckdb/experimental/spark/sql/type_utils.py b/duckdb/experimental/spark/sql/type_utils.py index 0874f2da..15217788 100644 --- a/duckdb/experimental/spark/sql/type_utils.py +++ b/duckdb/experimental/spark/sql/type_utils.py @@ -24,7 +24,7 @@ StructField, StructType, TimeNTZType, - TimestampMilisecondNTZType, + TimestampMillisecondNTZType, TimestampNanosecondNTZType, TimestampNTZType, TimestampSecondNTZType, @@ -60,7 +60,7 @@ "timestamp": TimestampNTZType, "timestamp with time zone": TimestampType, "timestamp_ms": TimestampNanosecondNTZType, - "timestamp_ns": TimestampMilisecondNTZType, + "timestamp_ns": TimestampMillisecondNTZType, "timestamp_s": TimestampSecondNTZType, "interval": DayTimeIntervalType, "list": ArrayType, diff --git a/duckdb/experimental/spark/sql/types.py b/duckdb/experimental/spark/sql/types.py index 3213169b..2e87f9ff 100644 --- a/duckdb/experimental/spark/sql/types.py +++ b/duckdb/experimental/spark/sql/types.py @@ -53,7 +53,7 @@ "StructType", "TimeNTZType", "TimeType", - "TimestampMilisecondNTZType", + "TimestampMillisecondNTZType", "TimestampNTZType", "TimestampNanosecondNTZType", "TimestampSecondNTZType", @@ -282,8 +282,8 @@ def fromInternal(self, ts: int) -> datetime.datetime: # noqa: D102 raise ContributionsAcceptedError -class TimestampMilisecondNTZType(AtomicType, metaclass=DataTypeSingleton): - """Timestamp (datetime.datetime) data type without timezone information with milisecond precision.""" +class TimestampMillisecondNTZType(AtomicType, metaclass=DataTypeSingleton): + """Timestamp (datetime.datetime) data type without timezone information with millisecond precision.""" def __init__(self) -> None: # noqa: D107 super().__init__(DuckDBPyType("TIMESTAMP_MS")) diff --git a/duckdb/value/constant/__init__.py b/duckdb/value/constant/__init__.py index 530c6bdc..135eed4b 100644 --- a/duckdb/value/constant/__init__.py +++ b/duckdb/value/constant/__init__.py @@ -178,7 +178,7 @@ def __init__(self, object: Any) -> None: super().__init__(object, TIMESTAMP_S) -class TimestampMilisecondValue(Value): +class TimestampMillisecondValue(Value): def __init__(self, object: Any) -> None: super().__init__(object, TIMESTAMP_MS) @@ -255,7 +255,7 @@ def __init__(self, object: Any, members: dict[str, DuckDBPyType]) -> None: "StringValue", "TimeTimeZoneValue", "TimeValue", - "TimestampMilisecondValue", + "TimestampMillisecondValue", "TimestampNanosecondValue", "TimestampSecondValue", "TimestampTimeZoneValue", diff --git a/tests/fast/spark/test_spark_types.py b/tests/fast/spark/test_spark_types.py index 7e72aad6..3950ea4d 100644 --- a/tests/fast/spark/test_spark_types.py +++ b/tests/fast/spark/test_spark_types.py @@ -29,7 +29,7 @@ StructField, StructType, TimeNTZType, - TimestampMilisecondNTZType, + TimestampMillisecondNTZType, TimestampNanosecondNTZType, TimestampNTZType, TimestampSecondNTZType, @@ -85,7 +85,7 @@ def test_all_types_schema(self, spark): StructField("timestamp", TimestampNTZType(), True), StructField("timestamp_s", TimestampSecondNTZType(), True), StructField("timestamp_ms", TimestampNanosecondNTZType(), True), - StructField("timestamp_ns", TimestampMilisecondNTZType(), True), + StructField("timestamp_ns", TimestampMillisecondNTZType(), True), StructField("time_tz", TimeType(), True), StructField("timestamp_tz", TimestampType(), True), StructField("float", FloatType(), True), diff --git a/tests/fast/test_value.py b/tests/fast/test_value.py index bf66bee8..d5d794ff 100644 --- a/tests/fast/test_value.py +++ b/tests/fast/test_value.py @@ -46,7 +46,7 @@ NullValue, ShortValue, StringValue, - TimestampMilisecondValue, + TimestampMillisecondValue, TimestampNanosecondValue, TimestampSecondValue, TimestampValue, @@ -128,7 +128,7 @@ def test_float_to_decimal_prevention(self): "value", [ TimestampSecondValue(datetime.datetime(1970, 3, 21, 12, 36, 43)), - TimestampMilisecondValue(datetime.datetime(1970, 3, 21, 12, 36, 43)), + TimestampMillisecondValue(datetime.datetime(1970, 3, 21, 12, 36, 43)), TimestampNanosecondValue(datetime.datetime(1970, 3, 21, 12, 36, 43)), ], )