[JBoss JIRA] (TEIID-4471) Assertion error with temp table delete
by Miroslava Voglova (JIRA)
[ https://issues.jboss.org/browse/TEIID-4471?page=com.atlassian.jira.plugin... ]
Miroslava Voglova edited comment on TEIID-4471 at 11/30/16 5:16 AM:
--------------------------------------------------------------------
We don't have enough information to reproduce this bug. While attempting to reproduce, exception org.teiid.jdbc.TeiidSQLException: Batch not found in storage 1 is thrown, when executing delete from temp table. Probably related to TEIID-4324.
was (Author: mvoglova):
We don't have enough information to reproduce this bug. While attempting to reproduce, exceptionorg.teiid.jdbc.TeiidSQLException: Batch not found in storage 1 is thrown, when executing delete from temp table. Probably related to TEIID-4324.
> Assertion error with temp table delete
> --------------------------------------
>
> Key: TEIID-4471
> URL: https://issues.jboss.org/browse/TEIID-4471
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.1, 8.13.7, 9.0.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.13.7, 9.0.5, 8.12.8.6_3
>
>
> Related to TEIID-4405 there are circumstances where a temp table deletion results in an assertion error of "delete failed". A possible scenario (that is dependent upon a number of factors, including batch sizes and garbage collection) requires the values stored by the tuple browser to get out of sync with what is stored by the page such that a delete is attempted twice.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4471) Assertion error with temp table delete
by Miroslava Voglova (JIRA)
[ https://issues.jboss.org/browse/TEIID-4471?page=com.atlassian.jira.plugin... ]
Miroslava Voglova reopened TEIID-4471:
--------------------------------------
We don't have enough information to reproduce this bug. While attempting to reproduce, exceptionorg.teiid.jdbc.TeiidSQLException: Batch not found in storage 1 is thrown, when executing delete from temp table. Probably related to TEIID-4324.
> Assertion error with temp table delete
> --------------------------------------
>
> Key: TEIID-4471
> URL: https://issues.jboss.org/browse/TEIID-4471
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.1, 8.13.7, 9.0.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.13.7, 9.0.5, 8.12.8.6_3
>
>
> Related to TEIID-4405 there are circumstances where a temp table deletion results in an assertion error of "delete failed". A possible scenario (that is dependent upon a number of factors, including batch sizes and garbage collection) requires the values stored by the tuple browser to get out of sync with what is stored by the page such that a delete is attempted twice.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4610) Impala regexp_replace function colliding with prepared values
by Scott Wallace (JIRA)
[ https://issues.jboss.org/browse/TEIID-4610?page=com.atlassian.jira.plugin... ]
Scott Wallace updated TEIID-4610:
---------------------------------
Description:
Impala regexp_replace function appears to collide with prepared values only when attemping to replace apostrophe.
Error:
{{org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 warehouse: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: ['2016-01-01 00:00:00.0'] SQL: SELECT regexp_replace(g_0.`string_column`, '\'', ''') FROM some_impala_table g_0 WHERE g_0.`date_key` = ? AND g_0.`customer_id` = 112]}}
was:
Impala regexp_replace function appears to collide with prepared values only when attemping to replace apostrophe.
Error:
{{org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 warehouse: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: ['2016-01-01 00:00:00.0'] SQL: SELECT regexp_replace(g_0.`product_name`, '\'', ''') FROM warehouse.fact_transaction_process_date_detail g_0 WHERE g_0.`process_date_key` = ? AND g_0.`publisher_key` = 112]}}
> Impala regexp_replace function colliding with prepared values
> -------------------------------------------------------------
>
> Key: TEIID-4610
> URL: https://issues.jboss.org/browse/TEIID-4610
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.13.3
> Reporter: Scott Wallace
> Assignee: Steven Hawkins
>
> Impala regexp_replace function appears to collide with prepared values only when attemping to replace apostrophe.
> Error:
> {{org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 warehouse: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: ['2016-01-01 00:00:00.0'] SQL: SELECT regexp_replace(g_0.`string_column`, '\'', ''') FROM some_impala_table g_0 WHERE g_0.`date_key` = ? AND g_0.`customer_id` = 112]}}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4610) Impala regexp_replace function colliding with prepared values
by Scott Wallace (JIRA)
[ https://issues.jboss.org/browse/TEIID-4610?page=com.atlassian.jira.plugin... ]
Scott Wallace updated TEIID-4610:
---------------------------------
Steps to Reproduce:
Tested scenarios below:
Query 1 - apostrophe replacement - succeeds:
{{select impala.regexp_replace(string_column,char(39),concat('&apos',char(59)))
from some_impala_table
where date_key = '2016-01-01'
and customer_id = 112;}}
Query 2: apostrophe replacement w/prepared values - fails:
{{select impala.regexp_replace(string_column,char(39),concat('&apos',char(59)))
from some_impala_table
where date_key = concat(substring('2016-01-15',1,7),'-01')
and customer_id = 112;}}
Query 3: quote replacement w/prepared values - succeeds:
{{select impala.regexp_replace(string_column,char(34),concat('"',char(59)))
from some_impala_table
where date_key = concat(substring('2016-01-15',1,7),'-01')
and customer_id = 112;}}
was:
Tested scenarios below:
Query 1 - apostrophe replacement - succeeds:
{{select impala.regexp_replace(product_name,char(39),concat('&apos',char(59)))
from warehouse.fact_transaction_process_date_detail
where process_date_key = '2016-01-01'
and publisher_key = 112;}}
Query 2: apostrophe replacement w/prepared values - fails:
{{select impala.regexp_replace(product_name,char(39),concat('&apos',char(59)))
from warehouse.fact_transaction_process_date_detail
where process_date_key = concat(substring('2016-01-15',1,7),'-01')
and publisher_key = 112;}}
Query 3: quote replacement w/prepared values - succeeds:
{{select impala.regexp_replace(product_name,char(34),concat('"',char(59)))
from warehouse.fact_transaction_process_date_detail
where process_date_key = concat(substring('2016-01-15',1,7),'-01')
and publisher_key = 112;}}
> Impala regexp_replace function colliding with prepared values
> -------------------------------------------------------------
>
> Key: TEIID-4610
> URL: https://issues.jboss.org/browse/TEIID-4610
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.13.3
> Reporter: Scott Wallace
> Assignee: Steven Hawkins
>
> Impala regexp_replace function appears to collide with prepared values only when attemping to replace apostrophe.
> Error:
> {{org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 warehouse: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: ['2016-01-01 00:00:00.0'] SQL: SELECT regexp_replace(g_0.`product_name`, '\'', ''') FROM warehouse.fact_transaction_process_date_detail g_0 WHERE g_0.`process_date_key` = ? AND g_0.`publisher_key` = 112]}}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4610) Impala regexp_replace function colliding with prepared values
by Scott Wallace (JIRA)
Scott Wallace created TEIID-4610:
------------------------------------
Summary: Impala regexp_replace function colliding with prepared values
Key: TEIID-4610
URL: https://issues.jboss.org/browse/TEIID-4610
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.13.3
Reporter: Scott Wallace
Assignee: Steven Hawkins
Impala regexp_replace function appears to collide with prepared values only when attemping to replace apostrophe.
Error:
{{org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 warehouse: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: ['2016-01-01 00:00:00.0'] SQL: SELECT regexp_replace(g_0.`product_name`, '\'', ''') FROM warehouse.fact_transaction_process_date_detail g_0 WHERE g_0.`process_date_key` = ? AND g_0.`publisher_key` = 112]}}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4609) Sap-hana translator - unsupported cast to data type bintext
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4609:
-----------------------------------
Summary: Sap-hana translator - unsupported cast to data type bintext
Key: TEIID-4609
URL: https://issues.jboss.org/browse/TEIID-4609
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.5
Reporter: Juraj Duráni
Assignee: Steven Hawkins
In some cases, Teiid uses for pushing queries to Sap-Hanadata type bintext. More precisely, uses cast(... as bintext). However, this type is supported only in column tables not in row tables. Moreover, cast to bintext seems to be unsupported by Sap-Hana - see \[1\] and [doc|https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/db6dd4751910...]
{code:plain|title=\[1\] Server log}
16:02:36,318 DEBUG [org.teiid.TRANSPORT] (New I/O worker #1) processing message:MessageHolder: key=819 contents=Invoke interface org.teiid.client.security.ILogon.ping
16:02:36,318 DEBUG [org.teiid.TRANSPORT] (New I/O worker #1) send message: MessageHolder: key=819 contents=null
16:02:36,319 DEBUG [org.teiid.TRANSPORT] (New I/O worker #1) processing message:MessageHolder: key=820 contents=Invoke interface org.teiid.client.security.ILogon.ping
16:02:36,319 DEBUG [org.teiid.SECURITY] (New I/O worker #1) Keep-alive ping received for session: wmQvWWaxavzo
16:02:36,319 DEBUG [org.teiid.TRANSPORT] (New I/O worker #1) send message: MessageHolder: key=820 contents=null
16:02:36,435 DEBUG [org.teiid.TRANSPORT] (New I/O worker #3) processing message:MessageHolder: key=821 contents=Invoke interface org.teiid.client.DQP.executeRequest
16:02:36,436 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue103) Request Thread wmQvWWaxavzo.18 with state NEW
16:02:36,437 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue103) wmQvWWaxavzo.18 Command has no cache hint and result set cache mode is not on.
16:02:36,437 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue103) wmQvWWaxavzo.18 executing select * from crud.smalla
16:02:36,439 DEBUG [org.teiid.PLANNER] (Worker12_QueryProcessorQueue103) [LOW [Relational Planner] limit not supported by source Source - limit node not pushed TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=null}, LOW [Relational Planner] limit not supported by source Source - limit node not pushed TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=[IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, convert(ByteNum, byte), DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, convert(BigIntegerValue, biginteger), BigDecimalValue, convert(ObjectValue, object)]}]
16:02:36,439 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue103) ProcessTree for wmQvWWaxavzo.18 LimitNode(0) output=[IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, convert(ByteNum, byte), DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, convert(BigIntegerValue, biginteger), BigDecimalValue, convert(ObjectValue, object)] limit 100
AccessNode(1) output=[IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, convert(ByteNum, byte), DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, convert(BigIntegerValue, biginteger), BigDecimalValue, convert(ObjectValue, object)] SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, convert(g_0.ByteNum, byte), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, convert(g_0.BigIntegerValue, biginteger), g_0.BigDecimalValue, convert(g_0.ObjectValue, object) FROM Source.smalla AS g_0
16:02:36,439 DEBUG [org.teiid.TXN_LOG] (Worker12_QueryProcessorQueue103) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@1cc9d855(wmQvWWaxavzo)
16:02:36,440 DEBUG [org.teiid.TXN_LOG] (Worker12_QueryProcessorQueue103) after getOrCreateTransactionContext : wmQvWWaxavzo NONE ID:NONE
16:02:36,440 DEBUG [org.teiid.BUFFER_MGR] (Worker12_QueryProcessorQueue103) Creating TupleBuffer: 39 [CRUD.SmallA.IntKey, CRUD.SmallA.StringKey, CRUD.SmallA.IntNum, CRUD.SmallA.StringNum, CRUD.SmallA.FloatNum, CRUD.SmallA.LongNum, CRUD.SmallA.DoubleNum, CRUD.SmallA.ByteNum, CRUD.SmallA.DateValue, CRUD.SmallA.TimeValue, CRUD.SmallA.TimestampValue, CRUD.SmallA.BooleanValue, CRUD.SmallA.CharValue, CRUD.SmallA.ShortValue, CRUD.SmallA.BigIntegerValue, CRUD.SmallA.BigDecimalValue, CRUD.SmallA.ObjectValue] [class java.lang.Integer, class java.lang.String, class java.lang.Integer, class java.lang.String, class java.lang.Float, class java.lang.Long, class java.lang.Double, class java.lang.Byte, class java.sql.Date, class java.sql.Time, class java.sql.Timestamp, class java.lang.Boolean, class java.lang.Character, class java.lang.Short, class java.math.BigInteger, class java.math.BigDecimal, class java.lang.Object] batch size 256 of type PROCESSOR
16:02:36,440 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue103) wmQvWWaxavzo.18.1.24 Create State
16:02:36,440 DEBUG [org.teiid.BUFFER_MGR] (Worker12_QueryProcessorQueue103) wmQvWWaxavzo.18.1.24 Blocking on source query wmQvWWaxavzo.18.1.24
16:02:36,441 DEBUG [org.teiid.BUFFER_MGR] (Worker12_QueryProcessorQueue103) wmQvWWaxavzo.18 Blocking on source request(s).
16:02:36,441 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue103) Request Thread wmQvWWaxavzo.18 - processor blocked
16:02:36,441 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue104) Running task for parent thread Worker12_QueryProcessorQueue103
16:02:36,441 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue104) wmQvWWaxavzo.18.1.24 Processing NEW request: SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, convert(g_0.ByteNum, byte), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, convert(g_0.BigIntegerValue, biginteger), g_0.BigDecimalValue, convert(g_0.ObjectValue, object) FROM Source.smalla AS g_0
16:02:36,444 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue104) wmQvWWaxavzo.18.1.24 Obtained execution
16:02:36,444 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue104) Source-specific command: SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, cast(g_0.ByteNum AS tinyint), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, cast(g_0.BigIntegerValue AS bigint), g_0.BigDecimalValue, cast(g_0.ObjectValue AS bintext) FROM NULL_NULL_CRUDsmalla AS g_0
16:02:36,922 WARN [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue104) Connector worker process failed for atomic-request=wmQvWWaxavzo.18.1.24: org.teiid.translator.jdbc.JDBCExecutionException: 257 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, cast(g_0.ByteNum AS tinyint), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, cast(g_0.BigIntegerValue AS bigint), g_0.BigDecimalValue, cast(g_0.ObjectValue AS bintext) FROM NULL_NULL_CRUDsmalla 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.GeneratedMethodAccessor95.invoke(Unknown Source) [:1.8.0-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
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-internal]
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-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: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "bintext": line 1 col 315 (at pos 315)
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:345)
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185)
at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:100)
at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1130)
at com.sap.db.jdbc.CallableStatementSapDB.sendCommand(CallableStatementSapDB.java:1810)
at com.sap.db.jdbc.StatementSapDB.sendSQL(StatementSapDB.java:981)
at com.sap.db.jdbc.CallableStatementSapDB.doParse(CallableStatementSapDB.java:183)
at com.sap.db.jdbc.CallableStatementSapDB.constructor(CallableStatementSapDB.java:142)
at com.sap.db.jdbc.CallableStatementSapDB.<init>(CallableStatementSapDB.java:87)
at com.sap.db.jdbc.CallableStatementSapDBFinalize.<init>(CallableStatementSapDBFinalize.java:31)
at com.sap.db.jdbc.ConnectionSapDB.prepareStatement(ConnectionSapDB.java:1379)
at com.sap.db.jdbc.trace.Connection.prepareStatement(Connection.java:347)
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.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:121) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 17 more
16:02:36,926 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue105) Request Thread wmQvWWaxavzo.18 with state PROCESSING
16:02:36,926 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue105) wmQvWWaxavzo.18.1.24 Remove State
16:02:36,926 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue105) wmQvWWaxavzo.18.1.24 Processing Close : SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, convert(g_0.ByteNum, byte), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, convert(g_0.BigIntegerValue, biginteger), g_0.BigDecimalValue, convert(g_0.ObjectValue, object) FROM Source.smalla AS g_0
16:02:36,926 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue105) wmQvWWaxavzo.18.1.24 Closed execution
16:02:36,926 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue105) wmQvWWaxavzo.18.1.24 Closed connection
16:02:36,927 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue105) QueryProcessor: closing processor
16:02:36,927 WARN [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue105) TEIID30020 Processing exception for request wmQvWWaxavzo.18 'TEIID30504 Source: 257 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, cast(g_0.ByteNum AS tinyint), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, cast(g_0.BigIntegerValue AS bigint), g_0.BigDecimalValue, cast(g_0.ObjectValue AS bintext) FROM NULL_NULL_CRUDsmalla AS g_0]'. Originally TeiidProcessingException 'SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "bintext": line 1 col 315 (at pos 315)' SQLExceptionSapDB.java:345.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 257 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, cast(g_0.ByteNum AS tinyint), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, cast(g_0.BigIntegerValue AS bigint), g_0.BigDecimalValue, cast(g_0.ObjectValue AS bintext) FROM NULL_NULL_CRUDsmalla AS g_0]
at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
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.translator.jdbc.JDBCExecutionException: 257 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, cast(g_0.ByteNum AS tinyint), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, cast(g_0.BigIntegerValue AS bigint), g_0.BigDecimalValue, cast(g_0.ObjectValue AS bintext) FROM NULL_NULL_CRUDsmalla AS g_0]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source) [:1.8.0-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at com.sun.proxy.$Proxy48.execute(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0-internal]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 6 more
Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "bintext": line 1 col 315 (at pos 315)
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:345)
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185)
at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:100)
at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1130)
at com.sap.db.jdbc.CallableStatementSapDB.sendCommand(CallableStatementSapDB.java:1810)
at com.sap.db.jdbc.StatementSapDB.sendSQL(StatementSapDB.java:981)
at com.sap.db.jdbc.CallableStatementSapDB.doParse(CallableStatementSapDB.java:183)
at com.sap.db.jdbc.CallableStatementSapDB.constructor(CallableStatementSapDB.java:142)
at com.sap.db.jdbc.CallableStatementSapDB.<init>(CallableStatementSapDB.java:87)
at com.sap.db.jdbc.CallableStatementSapDBFinalize.<init>(CallableStatementSapDBFinalize.java:31)
at com.sap.db.jdbc.ConnectionSapDB.prepareStatement(ConnectionSapDB.java:1379)
at com.sap.db.jdbc.trace.Connection.prepareStatement(Connection.java:347)
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)
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:121)
... 17 more
16:02:36,930 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue105) Removing tuplesource for the request wmQvWWaxavzo.18
16:02:36,930 DEBUG [org.teiid.BUFFER_MGR] (Worker12_QueryProcessorQueue105) Removing TupleBuffer: 39
16:02:36,930 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue105) wmQvWWaxavzo.18 Finished Processing
16:02:36,930 DEBUG [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue105) org.teiid.core.TeiidProcessingException: TEIID30504 Source: 257 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.IntKey, g_0.StringKey, g_0.IntNum, g_0.StringNum, g_0.FloatNum, g_0.LongNum, g_0.DoubleNum, cast(g_0.ByteNum AS tinyint), g_0.DateValue, g_0.TimeValue, g_0.TimestampValue, g_0.BooleanValue, g_0.CharValue, g_0.ShortValue, cast(g_0.BigIntegerValue AS bigint), g_0.BigDecimalValue, cast(g_0.ObjectValue AS bintext) FROM NULL_NULL_CRUDsmalla AS g_0] Sending error to client wmQvWWaxavzo.18
16:02:36,930 DEBUG [org.teiid.TRANSPORT] (Worker12_QueryProcessorQueue105) send message: MessageHolder: key=821 contents=ResultsMessage rowCount=0 finalRow=-1
{code}
{code:sql|title=sap-hana create table command - column or row}
create (column) table NULL_NULL_CRUDSmallA (IntKey integer not null, StringNum varchar(255), CharValue varchar(1), ObjectValue blob, DoubleNum double, BigIntegerValue numeric(19,2), ShortValue smallint, FloatNum float(19), IntNum integer, BigDecimalValue numeric(19,2), LongNum bigint, BooleanValue boolean, TimestampValue timestamp, ByteNum smallint, StringKey varchar(255), TimeValue time, DateValue date, primary key (IntKey))
{code}
{code:sql|title=DDL metadata}
CREATE FOREIGN TABLE smalla (IntKey integer PRIMARY KEY,
StringKey string,
IntNum integer,
StringNum string,
FloatNum float,
LongNum bigint,
DoubleNum double,
ByteNum smallint,
DateValue date,
TimeValue time,
TimestampValue timestamp,
BooleanValue boolean,
CharValue char(1),
ShortValue smallint,
BigIntegerValue decimal,
BigDecimalValue decimal,
ObjectValue varbinary)
OPTIONS (UPDATABLE 'TRUE', ...);
CREATE VIEW SmallA (IntKey integer PRIMARY KEY,
StringKey string,
IntNum integer,
StringNum string,
FloatNum float,
LongNum long,
DoubleNum double,
ByteNum byte,
DateValue date,
TimeValue time,
TimestampValue timestamp,
BooleanValue boolean,
CharValue char,
ShortValue short,
BigIntegerValue biginteger,
BigDecimalValue bigdecimal,
ObjectValue object)
OPTIONS (UPDATABLE 'TRUE')
AS
SELECT IntKey, StringKey, IntNum,
StringNum, FloatNum, LongNum, DoubleNum,
convert(ByteNum, byte) AS ByteNum, DateValue, TimeValue, TimestampValue,
BooleanValue, CharValue, ShortValue,
convert(BigIntegerValue, biginteger) AS BigIntegerValue, BigDecimalValue,
convert(ObjectValue, object) AS ObjectValue
FROM Source.smalla;
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4608) Insert statement - multi-value insert into view - incorrect type resolution if first tuple contains NULL
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4608:
-----------------------------------
Summary: Insert statement - multi-value insert into view - incorrect type resolution if first tuple contains NULL
Key: TEIID-4608
URL: https://issues.jboss.org/browse/TEIID-4608
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.5
Reporter: Juraj Duráni
Assignee: Steven Hawkins
If first tuple of multi-value insert contains NULL value (regular statement, not prepared statement), Teiid is not able to resolve types properly.
*Example 1:*
IntKey - primary key, type integer
IntNum - regular column, type integer
{code:sql}
INSERT INTO tablea (IntKey, IntNum) VALUES (1, null), (2, 2);
{code}
This query ends with ClassCastException:
{code:plain}
14:24:39,133 ERROR [org.teiid.CONNECTOR] (Worker8_QueryProcessorQueue105) Connector worker process failed for atomic-request=8V7FTKxvQ5zY.14.0.34: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Float
at org.teiid.translator.jdbc.JDBCExecutionFactory.bindValue(JDBCExecutionFactory.java:957) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.jdbc.sybase.BaseSybaseExecutionFactory.bindValue(BaseSybaseExecutionFactory.java:147) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.jdbc.JDBCBaseExecution.bind(JDBCBaseExecution.java:107) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:243) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.8.0-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
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.nextTuple(DataTierTupleSource.java:142)
at org.teiid.query.processor.relational.ProjectIntoNode.checkExitConditions(ProjectIntoNode.java:257)
at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:228)
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:472)
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) [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]
14:24:39,136 ERROR [org.teiid.PROCESSOR] (Worker8_QueryProcessorQueue105) TEIID30019 Unexpected exception for request 8V7FTKxvQ5zY.14: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Float
at org.teiid.translator.jdbc.JDBCExecutionFactory.bindValue(JDBCExecutionFactory.java:957)
at org.teiid.translator.jdbc.sybase.BaseSybaseExecutionFactory.bindValue(BaseSybaseExecutionFactory.java:147)
at org.teiid.translator.jdbc.JDBCBaseExecution.bind(JDBCBaseExecution.java:107)
at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:243)
at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.8.0-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at com.sun.proxy.$Proxy48.execute(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:142) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.ProjectIntoNode.checkExitConditions(ProjectIntoNode.java:257) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:228) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
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]
{code}
If I switch tuples, no exception occurs and insert finishes successfully.
{code:sql}
INSERT INTO tablea (IntKey, IntNum) VALUES (2, 2), (1, null);
{code}
*Example 2*
IntKey - primary key, type integer
CharValue - regular column, type char
{code:sql}
INSERT INTO tablea (IntKey, CharValue) VALUES (1, null), (2, convert('+', char));
{code}
This query ends with TEIID30328 Unable to evaluate convert(X.expr2, short):...
{code:plain}
14:41:35,053 WARN [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue136) TEIID30020 Processing exception for request 8V7FTKxvQ5zY.30 'TEIID30328 Unable to evaluate convert(X.expr2, short): TEIID30384 Error while evaluating function convert'. Originally ExpressionEvaluationException 'TEIID10076 Invalid conversion from type class java.lang.Character with value '+' to type class java.lang.Short' DataTypeManager.java:940. Enable more detailed logging to see the entire stacktrace.
{code}
Again, switching tuples resolves the issue.
{code:sql}
INSERT INTO tablea (IntKey, CharValue) VALUES (2, convert('+', char)), (1, null);
{code}
This occurs only in case of view with defined _trigger instead of insert_. Here is my VDB for MSSQL, but I can see same behavior for MySql and PostgreSQL
{code:xml}
<metadata type="DDL">
CREATE FOREIGN TABLE SmallA (IntKey integer PRIMARY KEY,
StringKey string,
IntNum integer,
StringNum string,
FloatNum float,
LongNum bigint,
DoubleNum double,
ByteNum smallint,
DateValue date,
TimeValue time,
TimestampValue timestamp,
BooleanValue boolean,
CharValue char(1),
ShortValue smallint,
BigIntegerValue decimal,
BigDecimalValue decimal,
ObjectValue blob)
OPTIONS (UPDATABLE 'TRUE');
</metadata>
...
<metadata type="DDL"><
CREATE VIEW SmallA (IntKey integer PRIMARY KEY,
StringKey string,
IntNum integer,
StringNum string,
FloatNum float,
LongNum long,
DoubleNum double,
ByteNum byte,
DateValue date,
TimeValue time,
TimestampValue timestamp,
BooleanValue boolean,
CharValue char,
ShortValue short,
BigIntegerValue biginteger,
BigDecimalValue bigdecimal,
ObjectValue object)
OPTIONS (UPDATABLE 'TRUE')
AS
SELECT IntKey, StringKey, IntNum,
StringNum, FloatNum, LongNum, DoubleNum,
convert(ByteNum, byte) AS ByteNum, DateValue, TimeValue, TimestampValue,
BooleanValue, CharValue, ShortValue,
convert(BigIntegerValue, biginteger) AS BigIntegerValue, BigDecimalValue,
convert(ObjectValue, object) AS ObjectValue
FROM Source.SmallA;
CREATE TRIGGER ON SmallA INSTEAD OF INSERT AS FOR EACH ROW
BEGIN ATOMIC
INSERT INTO Source.smalla (IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, ByteNum, DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, BigIntegerValue, BigDecimalValue, ObjectValue) VALUES
(NEW.IntKey, NEW.StringKey, NEW.IntNum, NEW.StringNum, NEW.FloatNum, NEW.LongNum, NEW.DoubleNum, NEW.ByteNum, NEW.DateValue, NEW.TimeValue, NEW.TimestampValue,
NEW.BooleanValue, NEW.CharValue, NEW.ShortValue, NEW.BigIntegerValue, NEW.BigDecimalValue, to_bytes(convert(NEW.ObjectValue, string), 'UTF-8'));
END;
</metadata>
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4607) Postgresql translator - unable to insert NULL value to column of type Object
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4607?page=com.atlassian.jira.plugin... ]
Juraj Duráni commented on TEIID-4607:
-------------------------------------
This is clone of TEIID-4606. I am not able to display that issue (there is invalid \{code\} section in description). Still getting timeout from JIRA. I have created this issue in case some else has same issue.
> Postgresql translator - unable to insert NULL value to column of type Object
> ----------------------------------------------------------------------------
>
> Key: TEIID-4607
> URL: https://issues.jboss.org/browse/TEIID-4607
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.5
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> I have source table (in PostgreSQL) with column of type *bytea*. That table/column is in source model (in Teiid) defined as *blob*. Further, I have one view which casts this column to type *object* (column name is _val_). In order to be able to insert in such view, I have defined INSTEAD OF TRIGGER (see \[2\]).
> Now I try to insert values into view \[1\]. If val is defined in insert statement, everything is OK. However, if val is not defined, insert ends with exception \[3\].
> {code:sql|title=Insert}
> insert into a (id) values (1)
> {code}
> {code:xml|title=\[2\] VDB}
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE a (id integer PRIMARY KEY, val blob) OPTIONS (UPDATABLE 'TRUE');
> ]]>
> </metadata>
> <metadata type="DDL"><![CDATA[
> CREATE VIEW a (id integer PRIMARY KEY, val object) OPTIONS (UPDATABLE 'TRUE') AS SELECT id, convert(val, object) as val FROM Source.a;
> CREATE TRIGGER ON a INSTEAD OF INSERT AS FOR EACH ROW
> BEGIN ATOMIC
> INSERT INTO Source.a (id, val) VALUES
> (NEW.id, to_bytes(convert(NEW.val, string), 'UTF-8'));
> END;]]>
> </metadata>
> {code}
> {code:plain|title=\[3\] Exception}
> 13:53:53,359 WARN [org.teiid.CONNECTOR] (Worker7_QueryProcessorQueue51) Connector worker process failed for atomic-request=b1oXc1KKl6IJ.5.0.17: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [NULL] SQL: INSERT INTO a (id, val) VALUES (1, ?)]
> at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:293) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> 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-internal]
> 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-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.postgresql.util.PSQLException: ERROR: column "val" is of type bytea but expression is of type oid
> Hint: You will need to rewrite or cast the expression.
> Position: 36
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
> at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:263) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 19 more
> 13:53:53,363 WARN [org.teiid.PROCESSOR] (Worker6_QueryProcessorQueue52) TEIID30020 Processing exception for request b1oXc1KKl6IJ.5 'TEIID30504 Source: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [NULL] SQL: INSERT INTO a (id, val) VALUES (1, ?)]'. Originally TeiidProcessingException 'ERROR: column "val" is of type bytea but expression is of type oid
> Hint: You will need to rewrite or cast the expression.
> Position: 36' QueryExecutorImpl.java:2157. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4607) Postgresql translator - unable to insert NULL value to column of type Object
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4607:
-----------------------------------
Summary: Postgresql translator - unable to insert NULL value to column of type Object
Key: TEIID-4607
URL: https://issues.jboss.org/browse/TEIID-4607
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.5
Reporter: Juraj Duráni
Assignee: Steven Hawkins
I have source table (in PostgreSQL) with column of type *bytea*. That table/column is in source model (in Teiid) defined as *blob*. Further, I have one view which casts this column to type *object* (column name is _val_). In order to be able to insert in such view, I have defined INSTEAD OF TRIGGER (see \[2\]).
Now I try to insert values into view \[1\]. If val is defined in insert statement, everything is OK. However, if val is not defined, insert ends with exception \[3\].
{code:sql|title=Insert}
insert into a (id) values (1)
{code}
{code:xml|title=\[2\] VDB}
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE a (id integer PRIMARY KEY, val blob) OPTIONS (UPDATABLE 'TRUE');
]]>
</metadata>
<metadata type="DDL"><![CDATA[
CREATE VIEW a (id integer PRIMARY KEY, val object) OPTIONS (UPDATABLE 'TRUE') AS SELECT id, convert(val, object) as val FROM Source.a;
CREATE TRIGGER ON a INSTEAD OF INSERT AS FOR EACH ROW
BEGIN ATOMIC
INSERT INTO Source.a (id, val) VALUES
(NEW.id, to_bytes(convert(NEW.val, string), 'UTF-8'));
END;]]>
</metadata>
{code}
{code:plain|title=\[3\] Exception}
13:53:53,359 WARN [org.teiid.CONNECTOR] (Worker7_QueryProcessorQueue51) Connector worker process failed for atomic-request=b1oXc1KKl6IJ.5.0.17: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [NULL] SQL: INSERT INTO a (id, val) VALUES (1, ?)]
at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:293) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.8.0-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
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-internal]
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-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.postgresql.util.PSQLException: ERROR: column "val" is of type bytea but expression is of type oid
Hint: You will need to rewrite or cast the expression.
Position: 36
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:263) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 19 more
13:53:53,363 WARN [org.teiid.PROCESSOR] (Worker6_QueryProcessorQueue52) TEIID30020 Processing exception for request b1oXc1KKl6IJ.5 'TEIID30504 Source: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [NULL] SQL: INSERT INTO a (id, val) VALUES (1, ?)]'. Originally TeiidProcessingException 'ERROR: column "val" is of type bytea but expression is of type oid
Hint: You will need to rewrite or cast the expression.
Position: 36' QueryExecutorImpl.java:2157. Enable more detailed logging to see the entire stacktrace.
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4606) Postgresql translator - unable to insert NULL value to column of type Object
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-4606:
-----------------------------------
Summary: Postgresql translator - unable to insert NULL value to column of type Object
Key: TEIID-4606
URL: https://issues.jboss.org/browse/TEIID-4606
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.5
Reporter: Juraj Duráni
Assignee: Steven Hawkins
I have source table (in PostgreSQL) with column of type *bytea*. That table/column is in source model (in Teiid) defined as *blob*. Further, I have one view which casts this column to type *object* (column name is _col1_). In order to be able to insert in such view, I have defined INSTEAD OF TRIGGER (see \[2\]).
Now I try to insert values into view \[1\]. If col1 is defined in insert statement, everything is OK. However, if col1 is not defined, insert ends with exception \[3\].
{code:sql|title=Insert}
insert into a (id) values (1)
{code}
{code:xml|title=\[2\] VDB}
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE a (id integer PRIMARY KEY, val blob) OPTIONS (UPDATABLE 'TRUE');
]]>
</metadata>
<metadata type="DDL"><![CDATA[
CREATE VIEW a (id integer PRIMARY KEY, val object) OPTIONS (UPDATABLE 'TRUE') AS SELECT id, convert(val, object) as val FROM Source.a;
CREATE TRIGGER ON a INSTEAD OF INSERT AS FOR EACH ROW
BEGIN ATOMIC
INSERT INTO Source.a (id, val) VALUES
(NEW.id, to_bytes(convert(NEW.val, string), 'UTF-8'));
END;
</metadata>
{code}
{code:plain|Title=\[3\] Exception}
13:53:53,359 WARN [org.teiid.CONNECTOR] (Worker7_QueryProcessorQueue51) Connector worker process failed for atomic-request=b1oXc1KKl6IJ.5.0.17: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [NULL] SQL: INSERT INTO a (id, val) VALUES (1, ?)]
at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:293) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.8.0-internal]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
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-internal]
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-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.postgresql.util.PSQLException: ERROR: column "val" is of type bytea but expression is of type oid
Hint: You will need to rewrite or cast the expression.
Position: 36
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:263) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 19 more
13:53:53,363 WARN [org.teiid.PROCESSOR] (Worker6_QueryProcessorQueue52) TEIID30020 Processing exception for request b1oXc1KKl6IJ.5 'TEIID30504 Source: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [NULL] SQL: INSERT INTO a (id, val) VALUES (1, ?)]'. Originally TeiidProcessingException 'ERROR: column "val" is of type bytea but expression is of type oid
Hint: You will need to rewrite or cast the expression.
Position: 36' QueryExecutorImpl.java:2157. Enable more detailed logging to see the entire stacktrace.
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month