[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] thx a lot for the fix! I've just checked it and now it works correctly, that is not showing the "ErrorCode: 0".
> 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
> Fix For: 11.2, 11.0.3, 11.1.2
>
> 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)
6 years, 3 months
[JBoss JIRA] (TEIID-5487) Support 3/2.5D geospatial values
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5487:
-------------------------------------
Summary: Support 3/2.5D geospatial values
Key: TEIID-5487
URL: https://issues.jboss.org/browse/TEIID-5487
Project: Teiid
Issue Type: Enhancement
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 11.x
Using 2D WKB as the storage format of geospatial destroys any z information. We should allow it to be preserved even if most of the functions operation only on 2D.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 3 months
[JBoss JIRA] (TEIID-5486) geospatial functions are not associating srid with new values
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5486?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5486:
----------------------------------
Description:
For example:
select st_srid(st_boundary(st_geomfromewkt('SRID=4326;POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))')));
should return 4326, but instead is returning 0.
was:
For example:
select st_srid(st_boundary(st_geomfromtext('SRID=4326;POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))')));
should return 4326, but instead is returning 0.
> geospatial functions are not associating srid with new values
> -------------------------------------------------------------
>
> Key: TEIID-5486
> URL: https://issues.jboss.org/browse/TEIID-5486
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.2, 11.0.3, 11.1.2
>
>
> For example:
> select st_srid(st_boundary(st_geomfromewkt('SRID=4326;POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))')));
> should return 4326, but instead is returning 0.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 3 months
[JBoss JIRA] (TEIID-5486) geospatial functions are not associating srid with new values
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5486:
-------------------------------------
Summary: geospatial functions are not associating srid with new values
Key: TEIID-5486
URL: https://issues.jboss.org/browse/TEIID-5486
Project: Teiid
Issue Type: Bug
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 11.2, 11.0.3, 11.1.2
For example:
select st_srid(st_boundary(st_geomfromtext('SRID=4326;POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))')));
should return 4326, but instead is returning 0.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 3 months
[JBoss JIRA] (TEIID-5485) JOIN of a table and sub-query containing DISTINCT and table function of a procedural call with arguments fails
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5485?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5485.
-----------------------------------
Fix Version/s: 11.2
11.0.3
10.3.5
11.1.2
Resolution: Done
The issue was with removing an "unnecessary" inline view in the source query - in this case, a distinct over a project with a constant - the inline view is needed to preserve that only a single output is needed. The simplest fix is to just preserve the view. Another approach would be to introduce a new project node above the access.
> 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
> Fix For: 11.2, 11.0.3, 10.3.5, 11.1.2
>
>
> 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)
6 years, 3 months
[JBoss JIRA] (TEIID-3722) Add an option to not widen comparisons to string
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3722?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-3722:
------------------------------------------------
Bara Ancincova <bancinco(a)redhat.com> changed the Status of [bug 1460324|https://bugzilla.redhat.com/show_bug.cgi?id=1460324] from VERIFIED to CLOSED
> Add an option to not widen comparisons to string
> ------------------------------------------------
>
> Key: TEIID-3722
> URL: https://issues.jboss.org/browse/TEIID-3722
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> Our resolving logic considers anything with an implicit conversion to string to be a valid widening conversion in a comparison. For example:
> int_col = '1a'
> will effectively become cast(int_col as string) = '1a'
> Or with timestamps:
> timestamp_col = '1970-01-01'
> becomes cast(timestamp_col as string) = '1970-01-01'
> In equality cases the optimizer will infer that the predicate is simply false, but when used with greater/less than comparison we'll still attempt the query with the widening conversion.
> This is most likely not the intent of the user. It would be best to provide an option that would allow an exception to be thrown rather than assuming a query that may not match the user's expectations.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 3 months