Abacn commented on code in PR #37277:
URL: https://github.com/apache/beam/pull/37277#discussion_r2680681723


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCalcRel.java:
##########
@@ -416,6 +418,10 @@ static Object toBeamObject(Object value, FieldType 
fieldType, boolean verifyValu
         String identifier = logicalType.getIdentifier();
         if (TimeWithLocalTzType.IDENTIFIER.equals(identifier)) {
           return Instant.ofEpochMilli(((Number) value).longValue());
+        } else if (MicrosInstant.IDENTIFIER.equals(identifier)
+            || NanosInstant.IDENTIFIER.equals(identifier)) {

Review Comment:
   There is a loss of accuracy here, as micros instant and nanos instant are 
sub-millis. Also I'd need to confirm this would actually work when input Row 
has a schema that contains a MicrosInstant/NanoInstant logical type 



-- 
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]

Reply via email to