KurtYoung commented on a change in pull request #10105:
[Flink-14599][table-planner-blink] Support precision of TimestampType in blink
planner
URL: https://github.com/apache/flink/pull/10105#discussion_r344433455
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryArray.java
##########
@@ -191,6 +191,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(getElementOffset(pos, 8)));
Review comment:
I think always reading from `segments[0]` is wrong
----------------------------------------------------------------
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