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



##########
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’ll check it, but I confirmed `value instanceof DynamicMessage` is 
true, and protobuf/timestamp not extends DynamicMessage, if I use `value 
instanceof Timestamp`, it seems not work




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