[JBoss JIRA] (TEIID-3888) Redshift - there is not function SUBSTR (RS uses SUBSTRING)
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3888?page=com.atlassian.jira.plugin... ]
Steven Hawkins edited comment on TEIID-3888 at 5/10/16 8:44 AM:
----------------------------------------------------------------
Marking the original as resolved as direct usage of substring is correct - however the postgres logic hardcodes the use usage of substr in the locate handling, so that will be a new issue TEIID-4199.
was (Author: shawkins):
Marking the original as resolved as direct usage of substring is correct - however the postgres logic hardcodes the use usage of substr in the locate handling, so that will be a new issue.
> Redshift - there is not function SUBSTR (RS uses SUBSTRING)
> -----------------------------------------------------------
>
> Key: TEIID-3888
> URL: https://issues.jboss.org/browse/TEIID-3888
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.3
> Environment: driver - PostgreSQL 9.2
> translator - postgresql
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.13, 8.12.4
>
>
> Postgresql translator uses SUBSTR function to get substring of string (e.g. function LEFT(x,y)), but Redshift does not support function SUBSTR. It support SUBSTRING function instead.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4199) Redshift fails locate pushdown
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4199:
-------------------------------------
Summary: Redshift fails locate pushdown
Key: TEIID-4199
URL: https://issues.jboss.org/browse/TEIID-4199
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Affects Versions: 8.12
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 9.0, 8.12.5
The LOCATE(x,y,z) function translates incorrectly:
Query: SELECT INTKEY, STRINGKEY FROM Source.SmallA WHERE LOCATE('1', STRINGKEY, 2) IN (1, 2)
Source-specific command: SELECT g_0.intkey, g_0.stringkey FROM smalla AS g_0 WHERE (position('1' in substr(g_0.stringkey, 2)) + 1) IN (1, 2)
Root exception message: Caused by: org.postgresql.util.PSQLException: ERROR: function SUBSTR does not exist (Hint: use SUBSTRING instead)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3888) Redshift - there is not function SUBSTR (RS uses SUBSTRING)
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3888?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3888.
-----------------------------------
Resolution: Done
Marking the original as resolved as direct usage of substring is correct - however the postgres logic hardcodes the use usage of substr in the locate handling, so that will be a new issue.
> Redshift - there is not function SUBSTR (RS uses SUBSTRING)
> -----------------------------------------------------------
>
> Key: TEIID-3888
> URL: https://issues.jboss.org/browse/TEIID-3888
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.3
> Environment: driver - PostgreSQL 9.2
> translator - postgresql
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.12.4, 8.13
>
>
> Postgresql translator uses SUBSTR function to get substring of string (e.g. function LEFT(x,y)), but Redshift does not support function SUBSTR. It support SUBSTRING function instead.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4115) XMLTABLE single element in sequence invalid conversion
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4115?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4115:
------------------------------------------------
Jan Stastny <jstastny(a)redhat.com> changed the Status of [bug 1323996|https://bugzilla.redhat.com/show_bug.cgi?id=1323996] from ON_QA to VERIFIED
> XMLTABLE single element in sequence invalid conversion
> ------------------------------------------------------
>
> Key: TEIID-4115
> URL: https://issues.jboss.org/browse/TEIID-4115
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.4
>
>
> There is a possibility to handle xml element sequences as arrays when using XMLTABLE function.
> When there's only one element in the sequence, an exception is thrown:
> {code:plain}
> org.teiid.jdbc.TeiidSQLException: TEIID10076 Invalid conversion from type class java.lang.String with value 'first' to type class [Ljava.lang.String;
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:703)
> at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
> at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:542)
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
> at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268)
> at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
> at com.sun.proxy.$Proxy6.read(Unknown Source)
> at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:551)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:404)
> at org.teiid.jdbc.StatementImpl.executeQuery(StatementImpl.java:338)
> at org.jboss.qe.functions.xml.XmlTableTest.testXmlTableSequenceArrayOneElement(XmlTableTest.java:74)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
> at org.testng.SuiteRunner.run(SuiteRunner.java:240)
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
> at org.testng.TestNG.run(TestNG.java:1031)
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
> at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
> at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
> Caused by: org.teiid.core.types.TransformationException: TEIID10076 Invalid conversion from type class java.lang.String with value 'first' to type class [Ljava.lang.String;
> at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:940)
> at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:928)
> at org.teiid.query.function.FunctionDescriptor.importValue(FunctionDescriptor.java:322)
> at org.teiid.query.processor.relational.XMLTableNode.getValue(XMLTableNode.java:376)
> at org.teiid.query.processor.relational.XMLTableNode.processRow(XMLTableNode.java:341)
> at org.teiid.query.processor.relational.XMLTableNode.nextBatchDirect(XMLTableNode.java:225)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:470)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> 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:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> The invocation of XMLTABLE function is as follows:
> {code:sql}
> CREATE VIEW SEQUENCE_AS_ARRAY_ONE_ELEMENT(x string[]) AS select * from xmltable('/a' passing convert('<a><b>first</b></a>', xml) columns x string[] path 'b') as x;
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4150) Infinispan dsl resource-adapter has not valid module.xml
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4150?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4150:
------------------------------------------------
Jan Stastny <jstastny(a)redhat.com> changed the Status of [bug 1328436|https://bugzilla.redhat.com/show_bug.cgi?id=1328436] from ON_QA to VERIFIED
> Infinispan dsl resource-adapter has not valid module.xml
> --------------------------------------------------------
>
> Key: TEIID-4150
> URL: https://issues.jboss.org/browse/TEIID-4150
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 9.0, 8.12.5
>
>
> There is a problem in mentioned module when server attempts to load it:
> {code:plain}
> [standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=infinispandsl:add(module=org.jboss.teiid.resource-adapter.infinispan.dsl)
> {
> "outcome" => "failed",
> "failure-description" => "JBAS010473: Failed to load module for RA [org.jboss.teiid.resource-adapter.infinispan.dsl]",
> "rolled-back" => true
> }
> {code}
> It is not valid module according to the 'urn:jboss:module:1.1' schema.
> Problematic fragment:
> {code:xml}
> <dependencies>
> ...
> <module name="org.infinispan.query" slot="jdg-6.6" optional="true" export="true" services="true" />
> ...
> </dependencies>
> {code}
> According to the mentioned schema the attribute 'services' can have only values:
> * none
> * import
> * export
> This issue prevents a user from using the adapter.
> Furthermore I am not sure that name 'org.infinispan.query' of the dependency module is correct. I haven't found such module in jdg client libs, there are two possible candidates though:
> * org.infinispan.query.dsl
> * org.infinispan.query.remote.client
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4197) Redshift - some comparison conditions are not supported with ANY, SOME and ALL
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4197?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-4197:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1334306
Bugzilla Update: Perform
> Redshift - some comparison conditions are not supported with ANY, SOME and ALL
> ------------------------------------------------------------------------------
>
> Key: TEIID-4197
> URL: https://issues.jboss.org/browse/TEIID-4197
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> Some comparison conditions are not supported in Redshift with ANY, SOME and ALL.
> *ALL:*
> _Query:_ SELECT INTKEY FROM Source.SMALLA WHERE INTKEY > ALL (SELECT INTKEY FROM Source.SMALLA WHERE INTKEY < 45)
> _Exception message:_ Caused by: org.postgresql.util.PSQLException: ERROR: ALL with <, >, <=, >=, or = comparison condition is not supported
> *ANY:*
> _Query:_ SELECT INTKEY FROM Source.SMALLA WHERE INTKEY > ANY (SELECT INTKEY FROM Source.SMALLA WHERE INTKEY < 45)
> _Exception message:_ Caused by: org.postgresql.util.PSQLException: ERROR: ANY or SOME with <, >, <=, >=, <>, or != comparison condition is not supported
--
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:
------------------------------------------------
Juraj Duráni <jdurani(a)redhat.com> changed the Status of [bug 1248489|https://bugzilla.redhat.com/show_bug.cgi?id=1248489] from ON_QA to ASSIGNED
> 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: 8.12
>
>
> 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