Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions duckdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
ShortValue,
StringValue,
StructValue,
TimestampMilisecondValue,
TimestampMillisecondValue,
TimestampNanosecondValue,
TimestampSecondValue,
TimestampTimeZoneValue,
Expand Down Expand Up @@ -270,7 +270,7 @@
"SyntaxException",
"TimeTimeZoneValue",
"TimeValue",
"TimestampMilisecondValue",
"TimestampMillisecondValue",
"TimestampNanosecondValue",
"TimestampSecondValue",
"TimestampTimeZoneValue",
Expand Down
4 changes: 2 additions & 2 deletions duckdb/experimental/spark/sql/type_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
StructField,
StructType,
TimeNTZType,
TimestampMilisecondNTZType,
TimestampMillisecondNTZType,
TimestampNanosecondNTZType,
TimestampNTZType,
TimestampSecondNTZType,
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions duckdb/experimental/spark/sql/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"StructType",
"TimeNTZType",
"TimeType",
"TimestampMilisecondNTZType",
"TimestampMillisecondNTZType",
"TimestampNTZType",
"TimestampNanosecondNTZType",
"TimestampSecondNTZType",
Expand Down Expand Up @@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions duckdb/value/constant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -255,7 +255,7 @@ def __init__(self, object: Any, members: dict[str, DuckDBPyType]) -> None:
"StringValue",
"TimeTimeZoneValue",
"TimeValue",
"TimestampMilisecondValue",
"TimestampMillisecondValue",
"TimestampNanosecondValue",
"TimestampSecondValue",
"TimestampTimeZoneValue",
Expand Down
4 changes: 2 additions & 2 deletions tests/fast/spark/test_spark_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
StructField,
StructType,
TimeNTZType,
TimestampMilisecondNTZType,
TimestampMillisecondNTZType,
TimestampNanosecondNTZType,
TimestampNTZType,
TimestampSecondNTZType,
Expand Down Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions tests/fast/test_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
NullValue,
ShortValue,
StringValue,
TimestampMilisecondValue,
TimestampMillisecondValue,
TimestampNanosecondValue,
TimestampSecondValue,
TimestampValue,
Expand Down Expand Up @@ -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)),
],
)
Expand Down
Loading