apache / paimon-trino

Trino Connector for Apache Paimon.
https://paimon.apache.org/
Apache License 2.0
25 stars 27 forks source link

can not order by timestamp column in trino version 447/448 #72 #74

Open macdoor opened 3 months ago

macdoor commented 3 months ago

Paimon Version paimon-trino-432-0.8-SNAPSHOT-plugin.tar.gz

Trino Verion

Trino 447/448
java version "22.0.1" 2024-04-16
Java(TM) SE Runtime Environment Oracle GraalVM 22.0.1+8.1 (build 22.0.1+8-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 22.0.1+8.1 (build 22.0.1+8-jvmci-b01, mixed mode, sharing)

schema

CREATE TABLE apisix_log (
  id               string,
  upstream         string,
  start_time       timestamp(3),
  client_ip        string,
  service_id       string,
  route_id         string,
  request          row<
    url            string,
    headers        string,
    body           string,
    size           bigint,
    querystring    string,
    uri            string,
    `method`       string
  >,
  response         row<
    status         bigint,
    headers        string,
    body           string,
    size           bigint
  >,
  server           row<
    hostname       string,
    version        string
  >,
  latency          double,
  apisix_latency   double,
  upstream_latency double,
  dt               string,
  WATERMARK FOR start_time AS start_time
)  comment 'APISIX kafka-logger 原始日志数据' PARTITIONED BY (dt) with (
  'bucket' = '6'
);

query with order by returns exception

SELECT t.*
FROM raw_log.apisix_log t
WHERE dt='2024-05-21'
ORDER BY start_time

client exception

[2024-05-17 20:35:22] [65536] Query failed (#20240521_045409_01038_3pyv6): readNanos is negative (-9275621)
[2024-05-17 20:35:22] java.lang.IllegalArgumentException: readNanos is negative (-9275621)

sever log server-448.log

macdoor commented 3 weeks ago

timestamp(3) column triggered this exception with orc file format, and there is no exception with the parquet file