[JBoss JIRA] (TEIID-4650) SybaseIQ translator: week function can't be pushed directly
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4650:
----------------------------------
Summary: SybaseIQ translator: week function can't be pushed directly
Key: TEIID-4650
URL: https://issues.jboss.org/browse/TEIID-4650
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.8.6_3
Reporter: Jan Stastny
Assignee: Steven Hawkins
SybaseIQ translator pushes WEEK function calls directly to SAP IQ. SAP IQ doesn't support such function. See [Date and Time Functions docs|http://help.sap.com/saphelp_iq1611_iqrefbb/helpdata/en/a5/2b07be84f2...]
Query:
{code:sql}
SELECT WEEK(dateValue) FROM BQT1.SMALLA;
{code}
Pushed source query:
{code:sql}
[SELECT week(g_0."datevalue") FROM "bqt-server"."dvqe"."SmallA" AS g_0]
{code}
Error in logs:
{code}
08:14:15,830 WARN [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue19) Connector worker process failed for atomic-request=PYp5BTTPF3pK.8.0.2: org.teiid.translator.jdbc.JDBCExecutionException: 504 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT week(g_0."datevalue") FROM "bqt-server"."dvqe"."SmallA" AS g_0]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_71]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
at com.sun.proxy.$Proxy80.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) [rt.jar:1.7.0_71]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
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) [rt.jar:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: SQL Anywhere Error -265: Procedure 'week' not found
at com.sybase.jdbc4.tds.Tds.a(Unknown Source)
at com.sybase.jdbc4.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc4.tds.Tds.getResultSetResult(Unknown Source)
at com.sybase.jdbc4.tds.TdsCursor.open(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(Unknown Source)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
... 18 more
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (TEIID-4649) SybaseIQ translator: different order of arguments in CONVERT function
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4649:
----------------------------------
Summary: SybaseIQ translator: different order of arguments in CONVERT function
Key: TEIID-4649
URL: https://issues.jboss.org/browse/TEIID-4649
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.8.6_3
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Critical
Teiid can't push directly CONVERT function via SybaseIQ translator. Sybase/SAP IQ has different order of arguments than Teiid has. See [SAP IQ CONVERT docs|http://help.sap.com/saphelp_iq1611_iqrefbb/helpdata/en/a5/3f6efb84f2...]
Important to mention is the fact, that CONVERT function is apart from a direct call in user's query also incorporated into resulting source queries by the translator. That will cause issues in lots of queries that need for example implicit conversion to be done.
For query:
{code:sql}
SELECT BQT1.SmallA.IntKey FROM BQT1.SmallA WHERE BQT1.SmallA.CharValue >= '0' AND BQT1.SmallA.CharValue < '1' ORDER BY IntKey
{code}
this gets pushed:
{code:sql}
[SELECT g_0."intkey" AS c_0 FROM "bqt-server"."dvqe"."SmallA" AS g_0 WHERE convert(g_0."charvalue", string) >= '0' AND convert(g_0."charvalue", string) < '1' ORDER BY c_0]
{code}
Error in log:
{code}
08:05:32,921 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) Connector worker process failed for atomic-request=PYp5BTTPF3pK.6.0.0: org.teiid.translator.jdbc.JDBCExecutionException: 102 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT TOP 100 g_0."intkey" AS c_0 FROM "bqt-server"."dvqe"."SmallA" AS g_0 WHERE convert(g_0."charvalue", string) >= '0' AND convert(g_0."charvalue", string) < '1' ORDER BY c_0]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_71]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
at com.sun.proxy.$Proxy80.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) [rt.jar:1.7.0_71]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
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) [rt.jar:1.7.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: SQL Anywhere Error -131: Syntax error near 'g_0.charvalue' on line 1
at com.sybase.jdbc4.tds.Tds.a(Unknown Source)
at com.sybase.jdbc4.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc4.tds.Tds.getResultSetResult(Unknown Source)
at com.sybase.jdbc4.tds.TdsCursor.open(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(Unknown Source)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
... 18 more
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (TEIID-4648) MySQL unsigned type detection is incorrect
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4648:
-------------------------------------
Summary: MySQL unsigned type detection is incorrect
Key: TEIID-4648
URL: https://issues.jboss.org/browse/TEIID-4648
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 9.1.2, 9.2
The MySQL JDBC driver hard codes for all integral types in the DatabaseMetaData getTypeInfo call that they are unsigned - even the signed types. This causes our logic to widen types that don't need widened.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (TEIID-4623) Add support for analytic function "Lead" and "Lag" with GreenPlum Translator
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4623?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4623.
-----------------------------------
Resolution: Done
After more investigation the issue is that greenplum is/was based upon postgresql 8.2, but added extensions for window functions at least as far back as greenplum 4.1.
With the pg driver a greenplum server will advertise itself as 8.2, thus our version check for 8.4 caused analytical functions to not pushdown. Now we'll return true for elementary oldap support for greenplum.
> Add support for analytic function "Lead" and "Lag" with GreenPlum Translator
> -----------------------------------------------------------------------------
>
> Key: TEIID-4623
> URL: https://issues.jboss.org/browse/TEIID-4623
> Project: Teiid
> Issue Type: Bug
> Components: Connector API
> Affects Versions: 8.7
> Reporter: Anu Saji
> Assignee: Steven Hawkins
> Fix For: 9.2
>
> Attachments: MyVDBModel(1).zip
>
>
> Request for adding support for analytical functions Lead and Lag to GreenPlum translator out of box
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (TEIID-4646) Add engine support for lead/lag aggregate functions
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4646:
-------------------------------------
Summary: Add engine support for lead/lag aggregate functions
Key: TEIID-4646
URL: https://issues.jboss.org/browse/TEIID-4646
Project: Teiid
Issue Type: Enhancement
Components: JDBC Connector, Misc. Connectors, Query Engine
Reporter: Steven Hawkins
Fix For: 10.0
Lead/lag and first_value/last_value analytical function support should be added to the engine with appropriate pushdown support.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (TEIID-4645) Mongo translator - fail to initialize translator wiith property SupportsAggregatesCount
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4645:
-----------------------------------
Summary: Mongo translator - fail to initialize translator wiith property SupportsAggregatesCount
Key: TEIID-4645
URL: https://issues.jboss.org/browse/TEIID-4645
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.8.6_3
Reporter: Juraj Duráni
Assignee: Ramesh Reddy
If translator has *SupportsAggregatesCount* property set, initialization fails.
{code:plain|title=Exception}
08:15:26,455 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.teiid.vdb.mongo_enhancements.1: org.jboss.msc.service.StartException in service jboss.teiid.vdb.mongo_enhancements.1: TEIID50035 TEIID40028 No setSetSupportsAggregatesCount method found for translator property setSupportsAggregatesCount
at org.teiid.jboss.VDBService.createConnectorManagers(VDBService.java:299)
at org.teiid.jboss.VDBService.start(VDBService.java:129)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.6.Final-redhat-1.jar:1.1.6.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.6.Final-redhat-1.jar:1.1.6.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
Caused by: org.teiid.core.TeiidException: TEIID40028 No setSetSupportsAggregatesCount method found for translator property setSupportsAggregatesCount
at org.teiid.deployers.TranslatorUtil.getSetter(TranslatorUtil.java:207)
at org.teiid.deployers.TranslatorUtil.injectProperties(TranslatorUtil.java:167)
at org.teiid.deployers.TranslatorUtil.buildExecutionFactory(TranslatorUtil.java:123)
at org.teiid.jboss.VDBService.getExecutionFactory(VDBService.java:320)
at org.teiid.jboss.VDBService$5.getExecutionFactory(VDBService.java:292)
at org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.createConnectorManager(ConnectorManagerRepository.java:134)
at org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.createConnectorManagers(ConnectorManagerRepository.java:108)
at org.teiid.jboss.VDBService.createConnectorManagers(VDBService.java:296)
... 6 more
{code}
{code:xml|title=Translator override}
<translator name="mongodb-no-count-over" type="mongodb">
<property name="SupportsAggregatesCount" value="false"/>
</translator>
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (TEIID-4644) anonymous block dynamic issues
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4644:
-------------------------------------
Summary: anonymous block dynamic issues
Key: TEIID-4644
URL: https://issues.jboss.org/browse/TEIID-4644
Project: Teiid
Issue Type: Bug
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Using execute immediate 'begin ... end'
Has several issues. First any variable references such as rowcount will be rewritten in the outer scope and not evaluated as part of the procedure. Also the anonymous block cannot be used with targeting an into as the statement we create is insert into select ... from (begin ... end) .. - which is not valid, however the exception message does not make this clear.
So we either need to improve these issues or disallow using anonymous blocks as dynamic sql.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months