[JBoss JIRA] (TEIID-4215) Clean up typos in error messages
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4215?page=com.atlassian.jira.plugin... ]
Steven Hawkins reassigned TEIID-4215:
-------------------------------------
Component/s: Query Engine
(was: Grammar)
Fix Version/s: 9.0
8.12.5
Affects Version/s: 8.12
Assignee: Steven Hawkins (was: Barry LaFond)
Thanks Steve. Pulled the commit.
[~blafond] This didn't need to be assigned to you, but some of the message changes are applicable to forked engine code.
> Clean up typos in error messages
> --------------------------------
>
> Key: TEIID-4215
> URL: https://issues.jboss.org/browse/TEIID-4215
> Project: Teiid
> Issue Type: Bug
> Components: Documentation, Query Engine
> Affects Versions: 8.12
> Environment: All
> Reporter: Steve Tran
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 9.0, 8.12.5
>
>
> The error messages in i18n.properties have a few typos that are visible to end-users. We should clean that up.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3600) DB2 - error getting substring if "from position" is out of range
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3600?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-3600:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1248489|https://bugzilla.redhat.com/show_bug.cgi?id=1248489] from ASSIGNED to MODIFIED
> DB2 - error getting substring if "from position" is out of range
> ----------------------------------------------------------------
>
> Key: TEIID-3600
> URL: https://issues.jboss.org/browse/TEIID-3600
> Project: Teiid
> Issue Type: Quality Risk
> Components: Misc. Connectors
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> If second argument of a SUBSTRING(x,y,z) function is out of range of first argument an exception is thrown [1]. Source-specific command [2].
> [1]
> Caused by: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-138, SQLSTATE=22011, SQLERRMC=null, DRIVER=4.12.55
> at com.ibm.db2.jcc.am.hd.a(hd.java:668)
> at com.ibm.db2.jcc.am.hd.a(hd.java:60)
> ...
> [2]
> SELECT substr(varchar(g_0.TimestampValue), 40, CASE WHEN 0 > (length(varchar(g_0.TimestampValue)) - (40 - 1)) THEN (length(varchar(g_0.TimestampValue)) - (40 - 1)) ELSE 0 END) FROM SmallA AS g_0 WHERE g_0.IntKey = 1
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4120) Teiid on Oracle Spatial generates incorrect SQL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4120?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4120:
---------------------------------------
Tom,
Are you involved at all in the Teiid Designer community? They are looking to expand that project into more robust open shift tooling.
> Teiid on Oracle Spatial generates incorrect SQL
> -----------------------------------------------
>
> Key: TEIID-4120
> URL: https://issues.jboss.org/browse/TEIID-4120
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Driver
> Affects Versions: 8.13.3
> Reporter: Mike Houwers
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.4
>
>
> Attempting to run a spatial query using SDO_RELATE in Teiid against an Oracle database seems to generate incorrect SQL. The query in "Steps to Reproduce" results in the following SQL being generated by Teiid:
> {code}
> SELECT c_0 FROM (SELECT g_0."ID" AS c_0 FROM "FOO" g_0 WHERE SDO_RELATE(g_0."FOOTPRINT", g_0."FOOTPRINT", 'mask=contains') = 1) WHERE ROWNUM <= 100
> {code}
> Note the test for the return from SDO_RELATE = 1. This should be a boolean function, so the test for =1 is incorrect, and should be ='TRUE'. The following warning is in the Teiid log:
> {code}
> 14:37:11,934 WARN [org.teiid.CONNECTOR] (Worker5_QueryProcessorQueue17) YRwvNQVeMEzW Connector worker process failed for atomic-request=YRwvNQVeMEzW.5.0.3: org.teiid.translator.jdbc.JDBCExecutionException: 1722 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT c_0 FROM (SELECT g_0."ID" AS c_0 FROM "FOO" g_0 WHERE SDO_RELATE(g_0."FOOTPRINT", g_0."FOOTPRINT", 'mask=contains') = 1) WHERE ROWNUM <= 100]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy56.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
> at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
> at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
> at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
> at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
> at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
> at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
> at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
> at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
> at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
> at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
> at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
> at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
> at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 18 more
> {code}
> Running the generated SQL in SQLDeveloper results in the error:
> {code}
> ORA-01722: invalid number
> 01722. 00000 - "invalid number"
> *Cause:
> *Action:
> {code}
> Altering the generated SQL in SQLDeveloper to be:
> {code}
> SELECT g_0."ID" AS c_0 FROM "FOO" g_0 WHERE SDO_RELATE(g_0."FOOTPRINT", g_0.footprint, 'mask=contains') = 'TRUE';
> {code}
> returns the expected results.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3600) DB2 - error getting substring if "from position" is out of range
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3600?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3600.
-----------------------------------
Fix Version/s: 9.0
8.12.5
8.13.5
(was: 8.12)
Resolution: Done
Corrected the from expression which was incorrectly comparing against the to expression - not the expression length.
The previous comments still hold - we won't be able to have the source function be fully compatible and may need to prevent pushdown in all but limited circumstances (such as only having literal argument values so that we can directly account for possible scenarios and have simplified expressions).
> DB2 - error getting substring if "from position" is out of range
> ----------------------------------------------------------------
>
> Key: TEIID-3600
> URL: https://issues.jboss.org/browse/TEIID-3600
> Project: Teiid
> Issue Type: Quality Risk
> Components: Misc. Connectors
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> If second argument of a SUBSTRING(x,y,z) function is out of range of first argument an exception is thrown [1]. Source-specific command [2].
> [1]
> Caused by: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-138, SQLSTATE=22011, SQLERRMC=null, DRIVER=4.12.55
> at com.ibm.db2.jcc.am.hd.a(hd.java:668)
> at com.ibm.db2.jcc.am.hd.a(hd.java:60)
> ...
> [2]
> SELECT substr(varchar(g_0.TimestampValue), 40, CASE WHEN 0 > (length(varchar(g_0.TimestampValue)) - (40 - 1)) THEN (length(varchar(g_0.TimestampValue)) - (40 - 1)) ELSE 0 END) FROM SmallA AS g_0 WHERE g_0.IntKey = 1
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3802) HANA translator modifies boolean to tinyint in type conversion
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3802?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-3802:
------------------------------------------------
Jan Stastny <jstastny(a)redhat.com> changed the Status of [bug 1278409|https://bugzilla.redhat.com/show_bug.cgi?id=1278409] from ON_QA to VERIFIED
> HANA translator modifies boolean to tinyint in type conversion
> --------------------------------------------------------------
>
> Key: TEIID-3802
> URL: https://issues.jboss.org/browse/TEIID-3802
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7.1.6_2
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 8.12.2, 8.13
>
>
> Teiid modifies boolean data type to tinyint before pushing the query down to the HANA instance.
> This brings following issue while having a query similar to this one:
> {code:sql}
> SELECT BQT1.SMallA.BooleanValue,cast(BQT2.SmallB.CharValue as boolean) FROM BQT1.SmallA,BQT2.SmallB WHERE BQT1.SmallA.BooleanValue = cast(BQT2.SmallB.CharValue as boolean)
> {code}
> which Teiid modifies to:
> {code:sql}
> SELECT g_0."BOOLEANVALUE", cast(g_1."CHARVALUE" AS tinyint) FROM "BQT1"."SMALLA" AS g_0, "BQT2"."SMALLB" AS g_1 WHERE g_0."BOOLEANVALUE" = cast(g_1."CHARVALUE" AS tinyint)
> {code}
> But the problem is not present for:
> {code:sql}
> SELECT BQT1.SMallA.BooleanValue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = cast(BQT1.SmallA.CharValue as boolean)
> {code}
> It seems that the Cartesian product and comparing values from different sources are the cause of the issue. But HANA has internal type BOOLEAN, so there might be no point at modifying the type to TINYINT after all. I also checked, that the pushed query (which causes the issue) with the casting altered to BOOLEAN runs well on HANA. The following query returns expected results when pushed directly to HANA instance:
> {code:sql}
> SELECT g_0."BOOLEANVALUE", cast(g_1."CHARVALUE" AS boolean) FROM "BQT1"."SMALLA" AS g_0, "BQT2"."SMALLB" AS g_1 WHERE g_0."BOOLEANVALUE" = cast(g_1."CHARVALUE" AS boolean)
> {code}
> NOTE: The CharValue columns are modelled as VARCHAR/string in fact. Thus the cast is a valid operation.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months