[JBoss JIRA] (TEIID-4652) SybaseIQ translator: DAYOFYEAR function not pushed correctly
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4652?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4652:
----------------------------------
Fix Version/s: 9.2.1
(was: 9.2)
> SybaseIQ translator: DAYOFYEAR function not pushed correctly
> ------------------------------------------------------------
>
> Key: TEIID-4652
> URL: https://issues.jboss.org/browse/TEIID-4652
> Project: Teiid
> Issue Type: Sub-task
> Components: JDBC Connector
> Affects Versions: 8.12.8.6_3
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 9.2.1
>
>
> DAYOFYEAR function is being pushed into SAP IQ datasource causing an error. The function doesn't seem to be supported directly in SAP IQ according to [SAP IQ docs|http://help.sap.com/saphelp_iq1611_iqrefbb/helpdata/en/a5/2b07be84f2...]
> Query used:
> {code:sql}
> SELECT IntKey, datevalue, DAYOFYEAR(datevalue) AS DayFromDate FROM BQT1.SmallA ORDER BY IntKey
> {code}
> Source query pushed:
> {code:sql}
> [SELECT g_0."intkey" AS c_0, g_0."datevalue" AS c_1, {fn dayofyear(g_0."datevalue")} AS c_2 FROM "bqt-server"."dvqe"."SmallA" AS g_0 ORDER BY c_0]
> {code}
> Causing an error coming from SAP IQ:
> {code}
> 09:08:30,130 WARN [org.teiid.CONNECTOR] (Worker11_QueryProcessorQueue58) Connector worker process failed for atomic-request=PYp5BTTPF3pK.20.0.12: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0."intkey" AS c_0, g_0."datevalue" AS c_1, {fn dayofyear(g_0."datevalue")} AS c_2 FROM "bqt-server"."dvqe"."SmallA" AS g_0 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: java.sql.SQLException: JZ0SI: A static function escape dayofyear was used which is not supported by this server.
> at com.sybase.jdbc4.jdbc.ErrorMessage.raiseError(Unknown Source)
> at com.sybase.jdbc4.jdbc.SybStatement.processEscapes(Unknown Source)
> at com.sybase.jdbc4.jdbc.SybStatement.doEscapeProcessing(Unknown Source)
> at com.sybase.jdbc4.jdbc.SybPreparedStatement.<init>(Unknown Source)
> at com.sybase.jdbc4.jdbc.SybConnection.a(Unknown Source)
> at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(Unknown Source)
> at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(Unknown Source)
> at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(Unknown Source)
> at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:744)
> at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:730)
> at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:405)
> at org.teiid.translator.jdbc.JDBCBaseExecution.getPreparedStatement(JDBCBaseExecution.java:196) [translator-jdbc-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:121) [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)
7 years, 8 months
[JBoss JIRA] (TEIID-4643) Add encrypt/decrypt functions
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4643?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4643.
-----------------------------------
Resolution: Done
Merged the pull request, but simplified to the binary case and only supporting AES 128 with an explicit initialization vector. We can also address the character case if needed, but that implies choosing more details about the conversion to binary (for example convert to utf-8) and the encrypted string (presumably base64).
> Add encrypt/decrypt functions
> -----------------------------
>
> Key: TEIID-4643
> URL: https://issues.jboss.org/browse/TEIID-4643
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Kylin Soong
> Fix For: 9.2
>
>
> We should add encrypt/decrypt functions similar to the approach of the hash functions added with TEIID-4532 (explicitly named functions for algorithm and probably key length) that are nominally compatible with pgcrypto and other databases.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-3836) Create a quick start to demonstrate OData
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3836?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3836:
----------------------------------
Fix Version/s: 9.3
(was: 9.2)
> Create a quick start to demonstrate OData
> -----------------------------------------
>
> Key: TEIID-3836
> URL: https://issues.jboss.org/browse/TEIID-3836
> Project: Teiid
> Issue Type: Task
> Components: Quick Starts
> Affects Versions: 9.x
> Reporter: Kylin Soong
> Assignee: Van Halbert
> Fix For: 9.3
>
>
> Add a quick start to demonstrate OData api may helpful for users.
> After deploy portfolio-vdb.xml successful, I test with(http://localhost:8080/odata/Portfolio.1/Stocks.StockPrices) return a error:
> {code}
> TEIID16011 EntitySet "Stocks.StockPrices" is not found; Check the spelling, use modelName.tableName; The table that representing the Entity type must either have a PRIMARY KEY or UNIQUE key(s)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4427) Migration to Teiid 9.0.0 - Materialized views error: Expected integer, but was bigdecimal
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4427?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4427.
-----------------------------------
Fix Version/s: (was: 9.2)
Resolution: Incomplete Description
Since I couldn't determine a specific regression here, and the issue may be captured more specifically by another JIRA, I'm marking this as resolved. If needed it can be reopened with more information.
> Migration to Teiid 9.0.0 - Materialized views error: Expected integer, but was bigdecimal
> -----------------------------------------------------------------------------------------
>
> Key: TEIID-4427
> URL: https://issues.jboss.org/browse/TEIID-4427
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.0
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Priority: Critical
>
> After migrating to Teiid 9.0.0, we are facing issues with existing views materialized on Oracle server.
> when fetching an Oracle materialized view that contains a column using date function like : "Month" or "Year" or "TIMESTAMPDIFF", we are getting the error : Expected integer, but was bigdecimal.
> If we go back to Teiid 8.11.3, the same materialized views fetch without any problem.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4685) PrestoDB translator - IFNULL is translated as NULLIF
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4685?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4685.
-----------------------------------
Resolution: Done
Removed locate support and changed ifnull to coalesce
> PrestoDB translator - IFNULL is translated as NULLIF
> ----------------------------------------------------
>
> Key: TEIID-4685
> URL: https://issues.jboss.org/browse/TEIID-4685
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.2, 9.1.3
>
>
> Teiid translates *NULLIF* function to *nullif*. However, those functions have different functionality. Note, this is the case for *COALESCE* with two arguments as well as that function is rewritten to *IFNULL*.
> See [PrestoDB doc|https://prestodb.io/docs/current/functions/conditional.html]
> {code:sql|title=Query}
> SELECT IFNULL(intnum, intkey) FROM BQT1.SmallA
> {code}
> {code:sql|title=Source command}
> SELECT nullif(g_0.intnum, g_0.intkey) FROM smalla AS g_0
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4679) PrestoDB translator - locate function - source specific function has different order of arguments
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4679?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4679.
-----------------------------------
Resolution: Done
Removed locate support and changed ifnull to coalesce
> PrestoDB translator - locate function - source specific function has different order of arguments
> -------------------------------------------------------------------------------------------------
>
> Key: TEIID-4679
> URL: https://issues.jboss.org/browse/TEIID-4679
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.2, 9.1.3
>
>
> For PrestoDB translator, *locate(x,y)* is translated as *strpos(x,y)* - i.e. *strpos(substring, string)*, but function has different order of arguments - from [PrestoDB documentation|https://prestodb.io/docs/current/functions/string.html] - *strpos(string, substring)*
> {code:sql|title=Query}
> SELECT StringNum, LOCATE('1', StringNum) FROM BQT1.SmallA
> {code}
> {code:sql|title=Source-specific command}
> SELECT g_0.stringnum, strpos('1', g_0.stringnum) FROM smalla AS g_0
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4680) PrestoDB translator - error executing locate(string, string, int)
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4680?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4680.
-----------------------------------
Resolution: Done
Removed locate support and changed ifnull to coalesce
> PrestoDB translator - error executing locate(string, string, int)
> -----------------------------------------------------------------
>
> Key: TEIID-4680
> URL: https://issues.jboss.org/browse/TEIID-4680
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.2, 9.1.3
>
>
> Teiid translates function *locate(string, string, int)* directly to *strpos(string, string, integer)*, but there is no such function in PrestoDB (see [doc|https://prestodb.io/docs/current/functions/string.html]).
> {code:sql|title=Query}
> SELECT StringNum, LOCATE('1', StringNum, 1) FROM BQT1.SmallA
> {code}
> {code:sql|title=Source command}
> SELECT g_0.stringnum, strpos('1', g_0.stringnum, 1) FROM smalla AS g_0
> {code}
> {code:plain|title=Exception}
> 14:07:37,469 WARN [org.teiid.CONNECTOR] (Worker21_QueryProcessorQueue88) Connector worker process failed for atomic-request=A7WqBzZhsyYM.23.0.21: org.teiid.translator.jdbc.JDBCExecutionException: 1 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.stringnum, strpos('1', g_0.stringnum, 1) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) [:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.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:266) [rt.jar:1.8.0_92]
> 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:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: java.sql.SQLException: Query failed (#20170106_130737_04105_k4ss5): line 1:23: Unexpected parameters (varchar(1), varchar(10), integer) for function strpos. Expected: strpos(varchar, varchar)
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 17 more
> Caused by: com.facebook.presto.sql.analyzer.SemanticException: line 1:23: Unexpected parameters (varchar(1), varchar(10), integer) for function strpos. Expected: strpos(varchar, varchar)
> at com.facebook.presto.sql.analyzer.ExpressionAnalyzer$Visitor.visitFunctionCall(ExpressionAnalyzer.java:823)
> at com.facebook.presto.sql.analyzer.ExpressionAnalyzer$Visitor.visitFunctionCall(ExpressionAnalyzer.java:254)
> at com.facebook.presto.sql.tree.FunctionCall.accept(FunctionCall.java:109)
> at com.facebook.presto.sql.tree.StackableAstVisitor.process(StackableAstVisitor.java:26)
> at com.facebook.presto.sql.analyzer.ExpressionAnalyzer$Visitor.process(ExpressionAnalyzer.java:273)
> at com.facebook.presto.sql.analyzer.ExpressionAnalyzer.analyze(ExpressionAnalyzer.java:230)
> at com.facebook.presto.sql.analyzer.ExpressionAnalyzer.analyzeExpression(ExpressionAnalyzer.java:1416)
> at com.facebook.presto.sql.analyzer.StatementAnalyzer.analyzeExpression(StatementAnalyzer.java:1791)
> at com.facebook.presto.sql.analyzer.StatementAnalyzer.analyzeSelect(StatementAnalyzer.java:1613)
> at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuerySpecification(StatementAnalyzer.java:785)
> at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuerySpecification(StatementAnalyzer.java:187)
> at com.facebook.presto.sql.tree.QuerySpecification.accept(QuerySpecification.java:125)
> at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)
> at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuery(StatementAnalyzer.java:549)
> at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuery(StatementAnalyzer.java:187)
> at com.facebook.presto.sql.tree.Query.accept(Query.java:92)
> at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:27)
> at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:67)
> at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:59)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:285)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months