apilloud commented on a change in pull request #12054: URL: https://github.com/apache/beam/pull/12054#discussion_r445727018
########## File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/logicaltypes/SqlTypes.java ########## @@ -27,4 +28,7 @@ private SqlTypes() {} /** Beam LogicalType corresponding to ZetaSQL/CalciteSQL DATE type. */ public static final LogicalType<LocalDate, Long> DATE = new Date(); + + /** Beam LogicalType corresponding to ZetaSQL/CalciteSQL TIME type. */ + public static final LogicalType<LocalTime, Long> TIME = new Time(); Review comment: Great! Bitshifting for `java.time.LocalTime` is lossless and fast. Looks like the conversion to/from Long is done by `LocalTime.ofNanoOfDay` and `LocalTime.toNanoOfDay` and those do math with a few constants that is also lossless and fast. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org