sungwy commented on code in PR #1632: URL: https://github.com/apache/iceberg-python/pull/1632#discussion_r2002196096
########## 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: great suggestion @kevinjqliu thank you! -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org