robinyqiu commented on a change in pull request #12054: URL: https://github.com/apache/beam/pull/12054#discussion_r445279103
########## 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: Now the internal build passes. Thanks for the question. Conversion is lossless. Actually it is done by calling ZetaSQL code: `CivilTimeEncoder.decodePacked64TimeNanosAsJavaTime()` and `encodePacked64TimeNanos()`. See conversion code in `ZetaSqlBeamTranslationUtils.java`. I looked at the code and it seems to be purely bit manipulation, so I guess it's not very expensive. ---------------------------------------------------------------- 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