RobertIndie commented on a change in pull request #13287:
URL: https://github.com/apache/pulsar/pull/13287#discussion_r774908677



##########
File path: 
pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/decoder/protobufnative/PulsarProtobufNativeColumnDecoder.java
##########
@@ -192,6 +194,12 @@ public long getLong() {
                 return floatToIntBits((Float) value);
             }
 
+            //return seconds field of protobuf/timestamp
+            if (columnType instanceof TimestampType && value instanceof 
DynamicMessage) {
+                DynamicMessage message = (DynamicMessage) value;
+                return (long) 
message.getField(message.getDescriptorForType().findFieldByName("seconds"));

Review comment:
       I think we should return time in the unit of milliseconds here.  It 
seems that we need to convert it here. And do we also need to handle 
`Timestamp.nanos` here?




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