-
Bug
-
Resolution: Done
-
Blocker
-
11.1
-
None
JOIN of a table and sub-query containing DISTINCT and table function of a procedural call with arguments, like:
SELECT t2.i FROM ( SELECT DISTINCT 1 a, b from test_tables_pg.test_x) t1, table(CALL "views.pr"(arg => t1.a) ) sub JOIN test_tables_pg.test_y t2 ON true ;;
fails with the following stack trace:
Unable to find source-code formatter for language: noformat. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
2018-09-25 17:47:15,024 ERROR [org.teiid.TRANSPORT] (NIO1) TEIID40113 Unhandled exception, aborting operation: org.teiid.transport.ObjectEncoder$FailedWriteException: org.teiid.core .TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.Boolean". Please ensure that the column's modeled datatype matc hes the expected data. at org.teiid.transport.ObjectEncoder.write(ObjectEncoder.java:132) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:106) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38) at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1089) at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1078) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at java.lang.Thread.run(Thread.java:745) Caused by: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.Boolean". Please ensure that the colum n's modeled datatype matches the expected data. at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:874) at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:315) at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at org.teiid.net.socket.Message.writeExternal(Message.java:57) at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at org.teiid.transport.ObjectEncoder.write(ObjectEncoder.java:112) ... 15 more Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.Integer at org.teiid.client.BatchSerializer$IntColumnSerializer.writeObject(BatchSerializer.java:559) at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:530) at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:863) ... 26 more