JingsongLi / paimon-trino

Apache License 2.0
21 stars 4 forks source link

TrinoException: Unhandled type for Block: map #1

Closed HeChuanXUPT closed 2 years ago

HeChuanXUPT commented 2 years ago

Hi,

trino:388

trino sql:

SELECT * FROM my_catalog.test."table1" order by push_time desc LIMIT 10

exception log:

io.trino.spi.TrinoException: Unhandled type for Block: map(varchar(2147483646),varchar(2147483646))
    at org.apache.flink.table.store.trino.TrinoPageSourceBase.writeBlock(TrinoPageSourceBase.java:258)
    at org.apache.flink.table.store.trino.TrinoPageSourceBase.appendTo(TrinoPageSourceBase.java:191)
    at org.apache.flink.table.store.trino.TrinoPageSourceBase.nextPage(TrinoPageSourceBase.java:129)
    at org.apache.flink.table.store.trino.TrinoPageSourceBase.getNextPage(TrinoPageSourceBase.java:112)
    at io.trino.operator.TableScanOperator.getOutput(TableScanOperator.java:311)
    at io.trino.operator.Driver.processInternal(Driver.java:410)
    at io.trino.operator.Driver.lambda$process$10(Driver.java:313)
    at io.trino.operator.Driver.tryWithLock(Driver.java:698)
    at io.trino.operator.Driver.process(Driver.java:305)
    at io.trino.operator.Driver.processForDuration(Driver.java:276)
    at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:740)
    at io.trino.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
    at io.trino.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:488)
    at io.trino.$gen.Trino_388____20221006_061649_2.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)

table schema like:

CREATE TABLE `my_catalog`.`test`.`table1 ` (
  `user_id` BIGINT,
  `user_education` MAP<STRING, STRING>,
  `push_time` BIGINT,
  `date` STRING
) PARTITIONED BY (`date`)
WITH (
  'bucket' = '3',
  'path' = 'hdfs://ns1/user/flink/warehouse/test.db/table1 ',
  'write-mode' = 'append-only'
)

But no exception using Flink sql-client:

SELECT * FROM my_catalog.test.table1 order by push_time desc LIMIT 10;

JingsongLi commented 2 years ago

@HeChuanXUPT sorry for the late reply, map is not supported now. I will take a look~

JingsongLi commented 2 years ago

Fixed by: 166fe0082d3ae1e4486f4db9806e67559f65a823 b358074c13625291b6ed51bc70f5e241dfc80626