[JBoss JIRA] (TEIID-5482) Dynamic SQL: Executing Dynamic SQL Throws an Error
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5482?page=com.atlassian.jira.plugin... ]
dalex dalex edited comment on TEIID-5482 at 9/25/18 12:29 PM:
--------------------------------------------------------------
[~shawkins] very sorry for the late reply but I have only stacktrace which I can see in debug mode
!TEIID_5482_stacktrace.jpg|thumbnail!
when running the:
{code:xml}
BEGIN
declare clob sql_query = 'select 1';
execute immediate sql_query;
END ;;
{code}
via SQuirrel. You can see that resultMode has EITHER value. I suspicious that it's set via either StatementImpl.submitExecute or StatementImpl.execute methods in JDBC driver.
was (Author: dalex005):
[~shawkins] very sorry for the late reply but I have only stacktrace which I can see in debug mode ( !TEIID_5482_stacktrace.jpg|thumbnail! ) when running the:
{code:xml}
BEGIN
declare clob sql_query = 'select 1';
execute immediate sql_query;
END ;;
{code}
via SQuirrel. You can see that resultMode has EITHER value. I suspicious that it's set via either StatementImpl.submitExecute or StatementImpl.execute methods in JDBC driver.
> Dynamic SQL: Executing Dynamic SQL Throws an Error
> --------------------------------------------------
>
> Key: TEIID-5482
> URL: https://issues.jboss.org/browse/TEIID-5482
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Attachments: TEIID_5482_stacktrace.jpg
>
>
> When running the following query:
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query;
> END ;;
> {code}
> in result set can see only:
> {code:noformat}
> Error: 0
> SQLState: 38000
> ErrorCode: 0
> {code}
> but running the following query just adding the "as cnt string":
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query as cnt string;
> END ;;
> {code}
> can see correct "1" in result set. I don't know if it's a correct behavior, maybe it's related to how SQuirrel handles result set.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5482) Dynamic SQL: Executing Dynamic SQL Throws an Error
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5482?page=com.atlassian.jira.plugin... ]
dalex dalex edited comment on TEIID-5482 at 9/25/18 12:29 PM:
--------------------------------------------------------------
[~shawkins] very sorry for the late reply but I have only stacktrace which I can see in debug mode
!TEIID_5482_stacktrace.jpg|thumbnail!
when running the:
{code:sql}
BEGIN
declare clob sql_query = 'select 1';
execute immediate sql_query;
END ;;
{code}
via SQuirrel. You can see that resultMode has EITHER value. I suspicious that it's set via either StatementImpl.submitExecute or StatementImpl.execute methods in JDBC driver.
was (Author: dalex005):
[~shawkins] very sorry for the late reply but I have only stacktrace which I can see in debug mode
!TEIID_5482_stacktrace.jpg|thumbnail!
when running the:
{code:xml}
BEGIN
declare clob sql_query = 'select 1';
execute immediate sql_query;
END ;;
{code}
via SQuirrel. You can see that resultMode has EITHER value. I suspicious that it's set via either StatementImpl.submitExecute or StatementImpl.execute methods in JDBC driver.
> Dynamic SQL: Executing Dynamic SQL Throws an Error
> --------------------------------------------------
>
> Key: TEIID-5482
> URL: https://issues.jboss.org/browse/TEIID-5482
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Attachments: TEIID_5482_stacktrace.jpg
>
>
> When running the following query:
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query;
> END ;;
> {code}
> in result set can see only:
> {code:noformat}
> Error: 0
> SQLState: 38000
> ErrorCode: 0
> {code}
> but running the following query just adding the "as cnt string":
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query as cnt string;
> END ;;
> {code}
> can see correct "1" in result set. I don't know if it's a correct behavior, maybe it's related to how SQuirrel handles result set.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5482) Dynamic SQL: Executing Dynamic SQL Throws an Error
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5482?page=com.atlassian.jira.plugin... ]
dalex dalex updated TEIID-5482:
-------------------------------
Attachment: TEIID_5482_stacktrace.jpg
> Dynamic SQL: Executing Dynamic SQL Throws an Error
> --------------------------------------------------
>
> Key: TEIID-5482
> URL: https://issues.jboss.org/browse/TEIID-5482
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Attachments: TEIID_5482_stacktrace.jpg
>
>
> When running the following query:
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query;
> END ;;
> {code}
> in result set can see only:
> {code:noformat}
> Error: 0
> SQLState: 38000
> ErrorCode: 0
> {code}
> but running the following query just adding the "as cnt string":
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query as cnt string;
> END ;;
> {code}
> can see correct "1" in result set. I don't know if it's a correct behavior, maybe it's related to how SQuirrel handles result set.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5485) JOIN of a table and sub-query containing DISTINCT and table function of a procedural call with arguments fails
by dalex dalex (JIRA)
dalex dalex created TEIID-5485:
----------------------------------
Summary: JOIN of a table and sub-query containing DISTINCT and table function of a procedural call with arguments fails
Key: TEIID-5485
URL: https://issues.jboss.org/browse/TEIID-5485
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 11.1
Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
Reporter: dalex dalex
Assignee: Steven Hawkins
Priority: Blocker
JOIN of a table and sub-query containing DISTINCT and table function of a procedural call with arguments, like:
{code:sql}
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 ;;
{code}
fails with the following stack trace:
{code:noformat}
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
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5482) Dynamic SQL: Executing Dynamic SQL Throws an Error
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5482?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5482:
---------------------------------------
Can you provide a full stack trace?
I'm not following where the exception is originating from.
> Dynamic SQL: Executing Dynamic SQL Throws an Error
> --------------------------------------------------
>
> Key: TEIID-5482
> URL: https://issues.jboss.org/browse/TEIID-5482
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
>
> When running the following query:
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query;
> END ;;
> {code}
> in result set can see only:
> {code:noformat}
> Error: 0
> SQLState: 38000
> ErrorCode: 0
> {code}
> but running the following query just adding the "as cnt string":
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query as cnt string;
> END ;;
> {code}
> can see correct "1" in result set. I don't know if it's a correct behavior, maybe it's related to how SQuirrel handles result set.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5482) Dynamic SQL: Executing Dynamic SQL Throws an Error
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5482?page=com.atlassian.jira.plugin... ]
dalex dalex edited comment on TEIID-5482 at 9/24/18 5:05 AM:
-------------------------------------------------------------
[~shawkins] such question though the issue is already marked as solved: in case of this.requestMsg.getResultsMode() = ResultsMode.EITHER (working via SQuirrel) I can see the:
{code:noformat}
Error: 0
SQLState: 38000
ErrorCode: 0
{code}
and at the same time no error messages like TEIID30490 in teiid server logs. Is it correct behavior?
was (Author: dalex005):
[~shawkins] such question though the issue is already marked as solved: in case of this.requestMsg.getResultsMode() = ResultsMode.EITHER (working via SQuirrel) I can see the:
{code:noformat}
Error: 0
SQLState: 38000
ErrorCode: 0
{code}
and at the same time no error messages like TEIID30490 in teiid server logs.
> Dynamic SQL: Executing Dynamic SQL Throws an Error
> --------------------------------------------------
>
> Key: TEIID-5482
> URL: https://issues.jboss.org/browse/TEIID-5482
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
>
> When running the following query:
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query;
> END ;;
> {code}
> in result set can see only:
> {code:noformat}
> Error: 0
> SQLState: 38000
> ErrorCode: 0
> {code}
> but running the following query just adding the "as cnt string":
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query as cnt string;
> END ;;
> {code}
> can see correct "1" in result set. I don't know if it's a correct behavior, maybe it's related to how SQuirrel handles result set.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5482) Dynamic SQL: Executing Dynamic SQL Throws an Error
by dalex dalex (JIRA)
[ https://issues.jboss.org/browse/TEIID-5482?page=com.atlassian.jira.plugin... ]
dalex dalex commented on TEIID-5482:
------------------------------------
[~shawkins] such question though the issue is already marked as solved: in case of this.requestMsg.getResultsMode() = ResultsMode.EITHER (working via SQuirrel) I can see the:
{code:noformat}
Error: 0
SQLState: 38000
ErrorCode: 0
{code}
and at the same time no error messages like TEIID30490 in teiid server logs.
> Dynamic SQL: Executing Dynamic SQL Throws an Error
> --------------------------------------------------
>
> Key: TEIID-5482
> URL: https://issues.jboss.org/browse/TEIID-5482
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 11.1
> Environment: teiid-11.1.0 (from 01.09.2018) on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
>
> When running the following query:
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query;
> END ;;
> {code}
> in result set can see only:
> {code:noformat}
> Error: 0
> SQLState: 38000
> ErrorCode: 0
> {code}
> but running the following query just adding the "as cnt string":
> {code:sql}
> BEGIN
> declare clob sql_query = 'select 1';
> execute immediate sql_query as cnt string;
> END ;;
> {code}
> can see correct "1" in result set. I don't know if it's a correct behavior, maybe it's related to how SQuirrel handles result set.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (TEIID-5483) OData polygon wkt is reversed from jts
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5483?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5483.
-----------------------------------
Resolution: Done
Corrected the polygon output and removed additional whitespace not allowed by odata/olingo.
> OData polygon wkt is reversed from jts
> --------------------------------------
>
> Key: TEIID-5483
> URL: https://issues.jboss.org/browse/TEIID-5483
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 11.2
>
>
> The bnf for odata states:
> "In order of traversal, points to the left side of the ring are interpreted as being in the polygon"
> Which implies that the ring(s) on the left side of the definition are the holes, vs. jts which lists the exterior ring first.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month