hzjhjjyy opened a new issue, #16:
URL: https://github.com/apache/incubator-paimon-trino/issues/16

   As mentioned in the title, after MySQL CDC, I encountered the following 
error when querying a field of float type:
   
   io.trino.spi.TrinoException: Unhandled type for long: real
           at 
org.apache.paimon.trino.TrinoPageSourceBase.appendTo(TrinoPageSourceBase.java:182)
           at 
org.apache.paimon.trino.TrinoPageSourceBase.nextPage(TrinoPageSourceBase.java:135)
           at 
org.apache.paimon.trino.TrinoPageSourceBase.lambda$getNextPage$0(TrinoPageSourceBase.java:116)
           at 
org.apache.paimon.trino.ClassLoaderUtils.runWithContextClassLoader(ClassLoaderUtils.java:30)
           at 
org.apache.paimon.trino.TrinoPageSourceBase.getNextPage(TrinoPageSourceBase.java:113)
           at 
io.trino.operator.TableScanOperator.getOutput(TableScanOperator.java:300)
           at io.trino.operator.Driver.processInternal(Driver.java:396)
           at io.trino.operator.Driver.lambda$process$8(Driver.java:299)
           at io.trino.operator.Driver.tryWithLock(Driver.java:695)
           at io.trino.operator.Driver.process(Driver.java:291)
           at io.trino.operator.Driver.processForDuration(Driver.java:262)
           at 
io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:888)
           at 
io.trino.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:187)
           at 
io.trino.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:556)
           at io.trino.$gen.Trino_420____20230626_051456_2.run(Unknown Source)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
           at java.base/java.lang.Thread.run(Thread.java:833)
   
   After investigating the error, it was found that the RealType#getJavaType in 
Trino actually returns long.class. This caused a missing check for RealType in 
TrinoPageSourceBase#appendTo, resulting in this error. Referring to other 
database handling methods, I added type.writeLong(output, 
floatToIntBits(((Number) value).floatValue())); to resolve this issue.


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to