kevinjqliu commented on code in PR #1632:
URL: https://github.com/apache/iceberg-python/pull/1632#discussion_r1999548823
##########
pyiceberg/transforms.py:
##########
Review Comment:
should we include ns support in pyiceberg_core transform as well?
##########
pyiceberg/types.py:
##########
@@ -703,6 +718,44 @@ class TimestamptzType(PrimitiveType):
root: Literal["timestamptz"] = Field(default="timestamptz")
+class TimestampNanoType(PrimitiveType):
+ """A TimestampNano data type in Iceberg can be represented using an
instance of this class.
+
+ TimestampNanos in Iceberg have nanosecond precision and include a date and
a time of day without a timezone.
+
+ Example:
+ >>> column_foo = TimestampNanoType()
+ >>> isinstance(column_foo, TimestampNanoType)
+ True
+ >>> column_foo
+ TimestampNanoType()
+ """
+
+ root: Literal["timestamp_ns"] = Field(default="timestamp_ns")
+
+ def minimum_format_version(self) -> TableVersion:
+ return TableVersion.THREE
Review Comment:
UnknownType was just added in #1681 lets make sure this is properly set
there too
##########
pyiceberg/types.py:
##########
Review Comment:
do we handle type promotion somewhere?
https://iceberg.apache.org/spec/#schema-evolution
##########
pyiceberg/types.py:
##########
@@ -62,6 +63,12 @@
FIXED_PARSER = ParseNumberFromBrackets(FIXED)
+class TableVersion(IntEnum):
+ ONE = 1
+ TWO = 2
+ THREE = 3
Review Comment:
interesting to see this, we were talking about something like this in #851
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]