docete commented on a change in pull request #10212: 
[FLINK-14806][table-planner-blink] Add setTimestamp/getTimestamp inte…
URL: https://github.com/apache/flink/pull/10212#discussion_r347293497
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryRow.java
 ##########
 @@ -304,6 +329,22 @@ public Decimal getDecimal(int pos, int precision, int 
scale) {
                return Decimal.readDecimalFieldFromSegments(segments, offset, 
offsetAndSize, precision, scale);
        }
 
+       @Override
+       public SqlTimestamp getTimestamp(int pos, int precision) {
+               assertIndexIsValid(pos);
+
+               if (SqlTimestamp.isCompact(precision)) {
+                       return 
SqlTimestamp.fromEpochMillis(segments[0].getLong(getFieldOffset(pos)));
+               }
+
+               int fieldOffset = getFieldOffset(pos);
+               final long offsetAndNanoOfMilli = 
segments[0].getLong(fieldOffset);
+               final int nanoOfMillisecond = (int) offsetAndNanoOfMilli;
 
 Review comment:
   👌

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to