You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "choucmei (via GitHub)" <gi...@apache.org> on 2023/09/20 14:40:31 UTC
[GitHub] [incubator-paimon-trino] choucmei commented on a diff in pull request #25: Fix bug query data type of TimeType,LocalZonedTimestampType error
choucmei commented on code in PR #25:
URL: https://github.com/apache/incubator-paimon-trino/pull/25#discussion_r1331742328
##########
paimon-trino-common/src/main/java/org/apache/paimon/trino/TrinoPageSourceBase.java:
##########
@@ -176,11 +178,17 @@ private void appendTo(Type type, DataType logicalType, Object value, BlockBuilde
BigDecimal decimal = ((Decimal) value).toBigDecimal();
type.writeLong(output, encodeShortScaledValue(decimal, decimalType.getScale()));
} else if (type.equals(TIMESTAMP_MILLIS)) {
+ // TimestampType mapped to ShortTimestampType of TIMESTAMP_MILLIS
type.writeLong(
output,
((Timestamp) value).getMillisecond() * MICROSECONDS_PER_MILLISECOND);
- } else if (type.equals(TIME_MICROS)) {
- type.writeLong(output, (int) value * MICROSECONDS_PER_MILLISECOND);
Review Comment:
https://github.com/choucmei/incubator-paimon-trino/blob/120e693d24374f42b25dabb0308bfa187d1ae6dd/paimon-trino-common/src/main/java/org/apache/paimon/trino/TrinoTypeUtils.java#L150
Because TIME_MILLIS can't be mapped.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org