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


##########
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:
   Yes nice catch but I think this is because calcite itself is limited to 
milliseconds ([reference](https://issues.apache.org/jira/browse/CALCITE-5266)) 
and the sub-millis are lost in the Beam -> Calcite -> Beam round-trip. Can u 
confirm if there is a different fix for this? 
    



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