[JBoss JIRA] (TEIID-5398) Sybase translator error caused by change in ASCII function pushdown
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5398?page=com.atlassian.jira.plugin... ]
Jan Stastny updated TEIID-5398:
-------------------------------
Description:
There's a regression caused by TEIID-5313 change:
{code:java}
registerFunctionModifier(SourceSystemFunctions.ASCII, new AliasModifier("unicode")); //$NON-NLS-1$
{code}
Following query:
{code:sql}
SELECT INTKEY, ASCII(INTKEY) FROM BQT1.SmallA
{code}
being resolved to following src command:
{code:sql}
SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
{code}
results in following error:
{code:title=server.log}
12:42:04,102 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue18) Connector worker process failed for atomic-request=reZs6o4Ybhhc.8.0.1: org.teiid.translator.jdbc.JDBCExecutionException: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
at com.sun.proxy.$Proxy79.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_151]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
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:1149) [rt.jar:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(SybStatement.java:2408)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2394)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:257)
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.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
... 18 more
12:42:04,118 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue19) TEIID30020 Processing exception for request reZs6o4Ybhhc.8 'TEIID30504 Source: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]'. Originally TeiidProcessingException 'Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
' Tds.java:4003. Enable more detailed logging to see the entire stacktrace.
{code}
SRC Command in previous version:
{code:sql}
SELECT g_0.intkey, ascii(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
{code}
NOTE: the issue is not caused by casting int to varchar, happens also when calling ASCII function on string directly.
was:
Following query:
{code:sql}
SELECT INTKEY, ASCII(INTKEY) FROM BQT1.SmallA
{code}
being resolved to following src command:
{code:sql}
SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
{code}
results in following error:
{code:title=server.log}
12:42:04,102 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue18) Connector worker process failed for atomic-request=reZs6o4Ybhhc.8.0.1: org.teiid.translator.jdbc.JDBCExecutionException: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
at com.sun.proxy.$Proxy79.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_151]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
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:1149) [rt.jar:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(SybStatement.java:2408)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2394)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:257)
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.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
... 18 more
12:42:04,118 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue19) TEIID30020 Processing exception for request reZs6o4Ybhhc.8 'TEIID30504 Source: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]'. Originally TeiidProcessingException 'Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
' Tds.java:4003. Enable more detailed logging to see the entire stacktrace.
{code}
SRC Command in previous version:
{code:sql}
SELECT g_0.intkey, ascii(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
{code}
NOTE: the issue is not caused by casting int to varchar, happens also when calling ASCII function on string directly.
> Sybase translator error caused by change in ASCII function pushdown
> -------------------------------------------------------------------
>
> Key: TEIID-5398
> URL: https://issues.jboss.org/browse/TEIID-5398
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.14.6_4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
>
> There's a regression caused by TEIID-5313 change:
> {code:java}
> registerFunctionModifier(SourceSystemFunctions.ASCII, new AliasModifier("unicode")); //$NON-NLS-1$
> {code}
> Following query:
> {code:sql}
> SELECT INTKEY, ASCII(INTKEY) FROM BQT1.SmallA
> {code}
> being resolved to following src command:
> {code:sql}
> SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
> {code}
> results in following error:
> {code:title=server.log}
> 12:42:04,102 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue18) Connector worker process failed for atomic-request=reZs6o4Ybhhc.8.0.1: org.teiid.translator.jdbc.JDBCExecutionException: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:361)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_151]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_151]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_151]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy79.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_151]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
> 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:1149) [rt.jar:1.8.0_151]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_151]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
> Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
> at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
> at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
> at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
> at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
> at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
> at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(SybStatement.java:2408)
> at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2394)
> at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:257)
> 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.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
> ... 18 more
> 12:42:04,118 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue19) TEIID30020 Processing exception for request reZs6o4Ybhhc.8 'TEIID30504 Source: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]'. Originally TeiidProcessingException 'Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
> ' Tds.java:4003. Enable more detailed logging to see the entire stacktrace.
> {code}
> SRC Command in previous version:
> {code:sql}
> SELECT g_0.intkey, ascii(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
> {code}
> NOTE: the issue is not caused by casting int to varchar, happens also when calling ASCII function on string directly.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5398) Sybase translator error caused by change in ASCII function pushdown
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5398:
----------------------------------
Summary: Sybase translator error caused by change in ASCII function pushdown
Key: TEIID-5398
URL: https://issues.jboss.org/browse/TEIID-5398
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.14.6_4
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Critical
Following query:
{code:sql}
SELECT INTKEY, ASCII(INTKEY) FROM BQT1.SmallA
{code}
being resolved to following src command:
{code:sql}
SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
{code}
results in following error:
{code:title=server.log}
12:42:04,102 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue18) Connector worker process failed for atomic-request=reZs6o4Ybhhc.8.0.1: org.teiid.translator.jdbc.JDBCExecutionException: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
at com.sun.proxy.$Proxy79.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_151]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
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:1149) [rt.jar:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(SybStatement.java:2408)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2394)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:257)
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.14.6_4-redhat-64-2.jar:8.12.14.6_4-redhat-64-2]
... 18 more
12:42:04,118 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue19) TEIID30020 Processing exception for request reZs6o4Ybhhc.8 'TEIID30504 Source: 14216 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey, unicode(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0]'. Originally TeiidProcessingException 'Function 'unicode' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists (sp_help may produce a large amount of output).
' Tds.java:4003. Enable more detailed logging to see the entire stacktrace.
{code}
SRC Command in previous version:
{code:sql}
SELECT g_0.intkey, ascii(cast(g_0.intkey AS varchar(4000))) FROM smalla g_0
{code}
NOTE: the issue is not caused by casting int to varchar, happens also when calling ASCII function on string directly.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5397) RETURN_GENERATED_KEYS not working
by Lukáš Svačina (JIRA)
Lukáš Svačina created TEIID-5397:
------------------------------------
Summary: RETURN_GENERATED_KEYS not working
Key: TEIID-5397
URL: https://issues.jboss.org/browse/TEIID-5397
Project: Teiid
Issue Type: Bug
Affects Versions: 10.2.1
Reporter: Lukáš Svačina
Assignee: Steven Hawkins
*+VDB:+*
<vdb name="_GENERATED_form_shoes" version="2"><model name="_INTERNAL_internalModel" type="PHYSICAL"><source name="internal_postgresql" translator-name="postgresql" connection-jndi-name="java:/internal"/></model><model name="GEN_view" type="VIRTUAL"><metadata type="DDL"><![CDATA[ CREATE VIEW "_view_workflow_data" OPTIONS (UPDATABLE 'true') AS SELECT "public"."form_shoes_2"."size" AS "size", "public"."form_shoes_2"."model" AS "model", "public"."form_shoes_2"."id" AS "id" FROM "public"."form_shoes_2" ]]></metadata></model></vdb>
*+TABLE:+*
name: form_shoes_2
columns: id (SERIAL) | size (INTEGER *NULLABLE*) | model (VARCHAR *NULLABLE*)
*+PROBLEM:+*
Connected into VDB using JDBC like:
{code:java}
final PreparedStatement statement = c.prepareStatement(...INSERT..., Statement.RETURN_GENERATED_KEYS);
statement.executeUpdate();
final ResultSet generatedKeys = statement.getGeneratedKeys();
{code}
*generatedKeys is empty if:*
# INSERT INTO "form_shoes_2" ( "model" ) VALUES ( 'adidas x1' ) ...... e.g. not all columns are enumerated ... if so, you can provide NULL values to optional columns and generated keys WORK!
# INSERT INTO "_view_workflow_data" (id, name, size) VALUES (42, 'adidas x2', 12 ) ....... e.g. insering into view (1:1, no joins involved) even when all columns ARE enumerated ... probably no way how to get generated keys here?
*+QUESTIONS:+*
# How to get last_insert_id() when inserting into foreign table/views (with/without joins)?
# How to get updated rows (UPDATE ... RETURNING *)? At least primary keys of affected rows?
Thanks for fixing/adding this functionality.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5396) Querying SQL Server variant type for a string fails
by Andrej Šmigala (JIRA)
Andrej Šmigala created TEIID-5396:
-------------------------------------
Summary: Querying SQL Server variant type for a string fails
Key: TEIID-5396
URL: https://issues.jboss.org/browse/TEIID-5396
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Affects Versions: 8.12.14.6_4
Reporter: Andrej Šmigala
Assignee: Steven Hawkins
Priority: Critical
Table on SQL Server source created as
{code:sql}CREATE TABLE table_with_variant(id INT, var SQL_VARIANT){code}
and loaded with int, float and string data.
Running the following query against a dynamic VDB with metadata import
{code:sql}SELECT cast(var AS string) FROM table_with_variant WHERE id = 1{code}
fails with
{noformat}java.sql.SQLException: Remote com.microsoft.sqlserver.jdbc.SQLServerException: The "variant" data type is not supported.{noformat}
This query used to work with DV 6.4.2, it appears it is a further regression from TEIID-5313 . Querying rows with non-string data works as expected.
SOURCE SRC command with 6.4.2 (working):
{code:sql}SELECT cast(g_0."var" AS varchar(4000)) FROM "dballo05"."dbo"."table_with_variant" g_0 WHERE g_0."id" = 1{code}
SOURCE SRC command with 6.4.3 (not working), note missing cast to varchar:
{code:sql}SELECT g_0."var" FROM "dballo06"."dbo"."table_with_variant" g_0 WHERE g_0."id" = 1{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5395) Improvement of JPA translator join behavior
by Harold Campbell (JIRA)
Harold Campbell created TEIID-5395:
--------------------------------------
Summary: Improvement of JPA translator join behavior
Key: TEIID-5395
URL: https://issues.jboss.org/browse/TEIID-5395
Project: Teiid
Issue Type: Enhancement
Components: Misc. Connectors
Affects Versions: 10.2.1
Reporter: Harold Campbell
Assignee: Steven Hawkins
Priority: Minor
The behavior of the JPA connector has a number of issues regarding entity relationships.
* Implicit joins (those needed to get child entity id's) are made INNER JOINS, preventing getting any rows where the value would be null.
* Something odd is done with *ToMany relationships which blows up the size of resultsets.
* If a parent entity and a child entity use the same name for their id property, only one gets mapped.
* It's not possible to join the same entity more than once.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5386) Wrong procedure import from MS SQL Server
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5386?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5386.
-----------------------------------
Fix Version/s: 11.0
Resolution: Done
Added a new method to the metadata processor to alter the procedure name in source and added an override for sql server.
> Wrong procedure import from MS SQL Server
> -----------------------------------------
>
> Key: TEIID-5386
> URL: https://issues.jboss.org/browse/TEIID-5386
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.13.6_4
> Reporter: Jan Martiska
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> When using automatic procedure import from SQL Server (I used 2016) with a model like this:
> {noformat}
> <model name="mymodel">
> <property name="importer.useFullSchemaName" value="false"/>
> <property name="importer.UseQualifiedName" value="false" />
> <property name="importer.procedureNamePattern" value="echo%"/>
> <property name="importer.importProcedures" value="true" />
> <source connection-jndi-name="java:/mssql2016"
> name="mySource" translator-name="sqlserver" />
> </model>
> {noformat}
> There is a procedure named {{echo}} in SQL server. It is imported into the VDB as {{"mymodel"."echo;1"}} (not sure why the ;1). When I afterwards try to execute it using
> {noformat}
> EXEC "mymodel"."echo;1"();
> {noformat}, I will get this exception from SQL server which suggests that Teiid mapped the procedure to the wrong name in the source database:
> {noformat}
> com.microsoft.sqlserver.jdbc.SQLServerException: Could not find stored procedure 'echo;1'.
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5386) Wrong procedure import from MS SQL Server
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5386?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5386:
---------------------------------------
The proposed solution will be to simply remove ;number - but we run the risk that it actually was part of the name. That should be a narrow case though that we can address later.
> Wrong procedure import from MS SQL Server
> -----------------------------------------
>
> Key: TEIID-5386
> URL: https://issues.jboss.org/browse/TEIID-5386
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.13.6_4
> Reporter: Jan Martiska
> Assignee: Steven Hawkins
>
> When using automatic procedure import from SQL Server (I used 2016) with a model like this:
> {noformat}
> <model name="mymodel">
> <property name="importer.useFullSchemaName" value="false"/>
> <property name="importer.UseQualifiedName" value="false" />
> <property name="importer.procedureNamePattern" value="echo%"/>
> <property name="importer.importProcedures" value="true" />
> <source connection-jndi-name="java:/mssql2016"
> name="mySource" translator-name="sqlserver" />
> </model>
> {noformat}
> There is a procedure named {{echo}} in SQL server. It is imported into the VDB as {{"mymodel"."echo;1"}} (not sure why the ;1). When I afterwards try to execute it using
> {noformat}
> EXEC "mymodel"."echo;1"();
> {noformat}, I will get this exception from SQL server which suggests that Teiid mapped the procedure to the wrong name in the source database:
> {noformat}
> com.microsoft.sqlserver.jdbc.SQLServerException: Could not find stored procedure 'echo;1'.
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5372) Enhance docker support
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5372?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5372:
-------------------------------------
> Option 2 isn't any different than what our existing docs describe - it's just running in docker vs. standalone.
Sure, if you externalized the volume mount for configuration, that is the simplest route. Same could be said for modules.
> I was trying to be consistent with the previous comments of promoting full openshift over just docker.
Agree, it is just who do we target? Just the OpenShift deployment, or possibly little wider audience. But here for me, the effort seems progressive so not much more.
> Enhance docker support
> ----------------------
>
> Key: TEIID-5372
> URL: https://issues.jboss.org/browse/TEIID-5372
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Rafal Korytkowski
> Assignee: Rafal Korytkowski
> Priority: Optional
>
> Currently there's limited support for docker in Teiid, which can be enabled by adding -Ddocker=true to the build command. The generated image is based on CentOS and running standalone on the Wildfly server. Latest builds are pushed to https://hub.docker.com/r/jboss/teiid/, but versions are not tagged automatically with releases. Development with Docker is not supported.
> Proposed changes:
> 1. Produce docker image based on Alpine, which is better suited for microservices, in addition to CentOS.
> 2. Automatically tag versions in Docker when doing releases.
> 3. Support development by providing a docker-compose file with the possibility to start server in a debug mode and enabled auto-redeployment of code changes.
> 4. Optionally provide a Docker image for building code using maven in Docker. Having Docker as the only prerequisite is convenient for CI environments and makes the build environment agnostic.
> [~shawkins], [~rareddy], thoughts?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5372) Enhance docker support
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5372?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5372:
---------------------------------------
> For a developer, they need to go through a special setup to configure a data source, which is error prone will take a lot of our time to invest in good documents.
Option 2 isn't any different than what our existing docs describe - it's just running in docker vs. standalone.
> On "Throntail" and "SpringBoot", I would extend to both "Docker" and "OpenShift", as one build over another.
I was trying to be consistent with the previous comments of promoting full openshift over just docker.
> Enhance docker support
> ----------------------
>
> Key: TEIID-5372
> URL: https://issues.jboss.org/browse/TEIID-5372
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Rafal Korytkowski
> Assignee: Rafal Korytkowski
> Priority: Optional
>
> Currently there's limited support for docker in Teiid, which can be enabled by adding -Ddocker=true to the build command. The generated image is based on CentOS and running standalone on the Wildfly server. Latest builds are pushed to https://hub.docker.com/r/jboss/teiid/, but versions are not tagged automatically with releases. Development with Docker is not supported.
> Proposed changes:
> 1. Produce docker image based on Alpine, which is better suited for microservices, in addition to CentOS.
> 2. Automatically tag versions in Docker when doing releases.
> 3. Support development by providing a docker-compose file with the possibility to start server in a debug mode and enabled auto-redeployment of code changes.
> 4. Optionally provide a Docker image for building code using maven in Docker. Having Docker as the only prerequisite is convenient for CI environments and makes the build environment agnostic.
> [~shawkins], [~rareddy], thoughts?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (TEIID-5372) Enhance docker support
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5372?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5372:
-------------------------------------
IMO, we should not invest any more time in "WildFly: docker" at all, for me just configuration issues makes me discouraged. For a developer, they need to go through a special setup to configure a data source, which is error prone will take a lot of our time to invest in good documents. Here I do not agree with the argument that it is a quick and easy way to test for non-developers. I feel it is not. Also, when we spin images we should keep the immutability at the core, we are asking for trouble later if we are not.
On "Throntail" and "SpringBoot", I would extend to both "Docker" and "OpenShift", as one build over another. Both of these are similar development paradigms like using maven, and environment and property files for configuration. If we have time, I would say we should spend on build tools like Gradle and Docker Compose for these to help wider developer audience.
> Enhance docker support
> ----------------------
>
> Key: TEIID-5372
> URL: https://issues.jboss.org/browse/TEIID-5372
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Rafal Korytkowski
> Assignee: Rafal Korytkowski
> Priority: Optional
>
> Currently there's limited support for docker in Teiid, which can be enabled by adding -Ddocker=true to the build command. The generated image is based on CentOS and running standalone on the Wildfly server. Latest builds are pushed to https://hub.docker.com/r/jboss/teiid/, but versions are not tagged automatically with releases. Development with Docker is not supported.
> Proposed changes:
> 1. Produce docker image based on Alpine, which is better suited for microservices, in addition to CentOS.
> 2. Automatically tag versions in Docker when doing releases.
> 3. Support development by providing a docker-compose file with the possibility to start server in a debug mode and enabled auto-redeployment of code changes.
> 4. Optionally provide a Docker image for building code using maven in Docker. Having Docker as the only prerequisite is convenient for CI environments and makes the build environment agnostic.
> [~shawkins], [~rareddy], thoughts?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months