rdblue commented on code in PR #8067: URL: https://github.com/apache/iceberg/pull/8067#discussion_r1279679757
########## python/pyiceberg/avro/reader.py: ########## @@ -153,8 +154,8 @@ def skip(self, decoder: BinaryDecoder) -> None: class DateReader(Reader): - def read(self, decoder: BinaryDecoder) -> int: - return decoder.read_int() + def read(self, decoder: BinaryDecoder) -> date: Review Comment: I don't think this should produce a `date`. Our internal representation for date/time objects are: * `int` days from epoch for `date` * `int` (`long`) micros from epoch for `timestamp` and `timestamptz` * `int` micros from midnight for `time` We do not want to use native date/time representations internally because they require a lot of extra logic to compare and work with in other ways. -- 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]
