[JBoss JIRA] (TEIID-4116) XMLTABLE empty element parsed as integer causes invalid format
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4116:
----------------------------------
Summary: XMLTABLE empty element parsed as integer causes invalid format
Key: TEIID-4116
URL: https://issues.jboss.org/browse/TEIID-4116
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.5
Reporter: Jan Stastny
Assignee: Steven Hawkins
Function XMLTABLE provides ability to create a relational table from xml document, it also supports parsing various datatypes.
When the xml element is parsed as integer, and the matched element is empty, invalid format error occurs.
Invocation of XMLTABLE:
{code:sql}
CREATE VIEW EMPTY_ELEMENT_INTEGER_NO_PATH(x integer) AS select * from xmltable('/a' passing convert('<a><b></b></a>', xml) columns b integer) as x;
{code}
Exception occured:
{code:plain}
org.teiid.jdbc.TeiidSQLException: TEIID10072 Invalid integer format in String:
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:703)
at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:542)
at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268)
at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
at com.sun.proxy.$Proxy6.read(Unknown Source)
at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:551)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:404)
at org.teiid.jdbc.StatementImpl.executeQuery(StatementImpl.java:338)
at org.jboss.qe.functions.xml.XmlTableTest.testXmlTableEmptyElementIntegerNoPath(XmlTableTest.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Caused by: org.teiid.core.types.TransformationException: TEIID10072 Invalid integer format in String:
at org.teiid.core.types.basic.StringToIntegerTransform.transformDirect(StringToIntegerTransform.java:43)
at org.teiid.core.types.Transform.transform(Transform.java:47)
at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:942)
at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:928)
at org.teiid.query.function.FunctionDescriptor.importValue(FunctionDescriptor.java:322)
at org.teiid.query.processor.relational.XMLTableNode.getValue(XMLTableNode.java:376)
at org.teiid.query.processor.relational.XMLTableNode.processRow(XMLTableNode.java:341)
at org.teiid.query.processor.relational.XMLTableNode.nextBatchDirect(XMLTableNode.java:225)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:470)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
The problem applies also for invocation with path expression specified like this:
{code:sql}
CREATE VIEW EMPTY_ELEMENT_INTEGER(x integer) AS select * from xmltable('/a' passing convert('<a><b></b></a>', xml) columns x integer path 'b') as x;
{code}
But not for an invocation, where the xpath is specified as 'b/text()':
{code:sql}
CREATE VIEW EMPTY_ELEMENT_INTEGER(b integer) AS select * from xmltable('/a' passing convert('<a><b></b></a>', xml) columns b integer path 'b/text()') as x;
{code}
Root of this issue is in different string result of XMLTABLE invocation with 'b' vs. 'b/text()' paths.
For empty element <b></b>:
* XMLTABLE(.... columns x string PATH 'b') returns empty string ''
* XMLTABLE(.... columns x string PATH 'b/text()') returns null
I think Teiid should be able to handle casting value of an empty element to any type without any extra precaution required. The contents retreived from an xml element can't be agnostic of the fact, that Teiid parses them as String first and then tries to cast them to appropriate type.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4105) ODATA: Duplicate NavigationProperty name
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4105?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4105:
-------------------------------------
Right now it is in 9.0, but if we have another build of 8.13.x we can pull into that *if* needed
> ODATA: Duplicate NavigationProperty name
> ----------------------------------------
>
> Key: TEIID-4105
> URL: https://issues.jboss.org/browse/TEIID-4105
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.3
> Reporter: Ivan Lucas Vargas
> Assignee: Ramesh Reddy
> Labels: Beta3
> Fix For: 9.0, 8.12.5
>
>
> Entity 1: TransferRule
> Entity 2: FinancialAccount
> TransferRule
> - sourceAccount : FinancialAccount
> - destination : FinancialAccount
> - other attributes
> the mapping to this for odata resolves to
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_destinationfinancial_account_id_fk" FromRole="transferrule" ToRole="financialaccount" />
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_sourcefinancial_account_id_fk" FromRole="transferrule"
> ToRole="financialaccount" />
> The navigation property name is duplicated with in transfer rule entity.
> Hence some of the Odata client see it as ambiguous element
> Is there a way to customise the Name to
> Name="src_financialaccount" and
> Name="dest_financialaccount"
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4113) Impala translator - Incorrect aggregate replacement in query
by Don Krapohl (JIRA)
[ https://issues.jboss.org/browse/TEIID-4113?page=com.atlassian.jira.plugin... ]
Don Krapohl edited comment on TEIID-4113 at 4/5/16 8:56 AM:
------------------------------------------------------------
Tried but with set showplan debug and the following query I just get the error that follows:
set showplan debug;
SELECT trans_year,
cast(sum(num_items_net) / count(distinct case when order_pub_comm_base >= 0 then orderid end) as double) as net_items_per_order,
PARSETIMESTAMP(trans_date_key, 'yyyy-MM-dd')
FROM ActivityAdvertiserTransDate WHERE trans_date_key>='2015-01-01' AND trans_date_key<='2015-01-02'
AND advertiser_key=111 GROUP BY trans_year, trans_date_key
limit 1;
show plan;
set showplan off;
org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 fact_activity_advertiser_trans_date: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_1.year_name AS c_0, cast((anon_grp0.agg0 / cast(anon_grp0.agg1 AS bigint)) AS double) AS c_1, g_0.trans_date_key AS c_2 FROM mart.fact_activity_advertiser_trans_date g_0 JOIN shared.dim_date g_1 ON g_0.trans_date_key = g_1.date_key WHERE g_0.trans_date_key >= '2015-01-01' AND g_0.trans_date_key <= '2015-01-02' AND g_0.advertiser_key = 111 AND g_1.date_key >= '2015-01-01' AND g_1.date_key <= '2015-01-02' GROUP BY g_1.year_name, g_0.trans_date_key LIMIT 1]
------------------
I've attached the plan without the parsetimestamp, which is what appears to be causing the issue.
was (Author: don.krapohl):
Was trying that but with set showplan debug and the query:
We get this error and no plan, perhaps because the compile goes wrong:
set showplan debug;
SELECT trans_year,
cast(sum(num_items_net) / count(distinct case when order_pub_comm_base >= 0 then orderid end) as double) as net_items_per_order,
PARSETIMESTAMP(trans_date_key, 'yyyy-MM-dd')
FROM ActivityAdvertiserTransDate WHERE trans_date_key>='2015-01-01' AND trans_date_key<='2015-01-02'
AND advertiser_key=111 GROUP BY trans_year, trans_date_key
limit 1;
show plan;
set showplan off;
org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 fact_activity_advertiser_trans_date: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_1.year_name AS c_0, cast((anon_grp0.agg0 / cast(anon_grp0.agg1 AS bigint)) AS double) AS c_1, g_0.trans_date_key AS c_2 FROM mart.fact_activity_advertiser_trans_date g_0 JOIN shared.dim_date g_1 ON g_0.trans_date_key = g_1.date_key WHERE g_0.trans_date_key >= '2015-01-01' AND g_0.trans_date_key <= '2015-01-02' AND g_0.advertiser_key = 111 AND g_1.date_key >= '2015-01-01' AND g_1.date_key <= '2015-01-02' GROUP BY g_1.year_name, g_0.trans_date_key LIMIT 1]
------------------
I've attached the plan without the parsetimestamp, which is what appears to be causing the issue.
> Impala translator - Incorrect aggregate replacement in query
> ------------------------------------------------------------
>
> Key: TEIID-4113
> URL: https://issues.jboss.org/browse/TEIID-4113
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.13.3
> Environment: Ubuntu Trusty
> Reporter: Don Krapohl
> Assignee: Steven Hawkins
> Labels: Impala_Translator
> Attachments: parsetimestamp-plan.txt
>
>
> When PARSETIMESTAMP is included in a query aggregates in other columns may not be written correctly. Example is as below, sum(first_metric) is rewritten to anon_grp0.agg0 in the query sent to Impala.
> Given the schema:
> //source
> SourceTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> //view
> VirtualTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> // Teiid query
> SELECT the_attribute,
> cast(
> sum(
> first_metric
> )
> /
> count(
> distinct case when second_metric >= 0 then second_metric end
> ) as double
> ) as some_alias,
> PARSETIMESTAMP(another_attribute, 'yyyy-MM-dd') as somedate
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY the_attribute, another_attribute
> //Query sent to impala
> SELECT g_0.the_attribute AS c_0,
> cast(
> (
> anon_grp0.agg0
> /
> cast(
> anon_grp0.agg1 AS bigint
> )
> ) AS double
> ) AS c_1,
> g_0.another_attribute AS c_2
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY g_0.the_attribute, g_0.another_attribute
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4113) Impala translator - Incorrect aggregate replacement in query
by Don Krapohl (JIRA)
[ https://issues.jboss.org/browse/TEIID-4113?page=com.atlassian.jira.plugin... ]
Don Krapohl updated TEIID-4113:
-------------------------------
Attachment: parsetimestamp-plan.txt
Showplan without the parsetimestamp. I can't get a plan WITH parsetimestamp as the statement just errors.
> Impala translator - Incorrect aggregate replacement in query
> ------------------------------------------------------------
>
> Key: TEIID-4113
> URL: https://issues.jboss.org/browse/TEIID-4113
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.13.3
> Environment: Ubuntu Trusty
> Reporter: Don Krapohl
> Assignee: Steven Hawkins
> Labels: Impala_Translator
> Attachments: parsetimestamp-plan.txt
>
>
> When PARSETIMESTAMP is included in a query aggregates in other columns may not be written correctly. Example is as below, sum(first_metric) is rewritten to anon_grp0.agg0 in the query sent to Impala.
> Given the schema:
> //source
> SourceTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> //view
> VirtualTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> // Teiid query
> SELECT the_attribute,
> cast(
> sum(
> first_metric
> )
> /
> count(
> distinct case when second_metric >= 0 then second_metric end
> ) as double
> ) as some_alias,
> PARSETIMESTAMP(another_attribute, 'yyyy-MM-dd') as somedate
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY the_attribute, another_attribute
> //Query sent to impala
> SELECT g_0.the_attribute AS c_0,
> cast(
> (
> anon_grp0.agg0
> /
> cast(
> anon_grp0.agg1 AS bigint
> )
> ) AS double
> ) AS c_1,
> g_0.another_attribute AS c_2
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY g_0.the_attribute, g_0.another_attribute
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4113) Impala translator - Incorrect aggregate replacement in query
by Don Krapohl (JIRA)
[ https://issues.jboss.org/browse/TEIID-4113?page=com.atlassian.jira.plugin... ]
Don Krapohl commented on TEIID-4113:
------------------------------------
Was trying that but with set showplan debug and the query:
We get this error and no plan, perhaps because the compile goes wrong:
set showplan debug;
SELECT trans_year,
cast(sum(num_items_net) / count(distinct case when order_pub_comm_base >= 0 then orderid end) as double) as net_items_per_order,
PARSETIMESTAMP(trans_date_key, 'yyyy-MM-dd')
FROM ActivityAdvertiserTransDate WHERE trans_date_key>='2015-01-01' AND trans_date_key<='2015-01-02'
AND advertiser_key=111 GROUP BY trans_year, trans_date_key
limit 1;
show plan;
set showplan off;
org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 fact_activity_advertiser_trans_date: 500051 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_1.year_name AS c_0, cast((anon_grp0.agg0 / cast(anon_grp0.agg1 AS bigint)) AS double) AS c_1, g_0.trans_date_key AS c_2 FROM mart.fact_activity_advertiser_trans_date g_0 JOIN shared.dim_date g_1 ON g_0.trans_date_key = g_1.date_key WHERE g_0.trans_date_key >= '2015-01-01' AND g_0.trans_date_key <= '2015-01-02' AND g_0.advertiser_key = 111 AND g_1.date_key >= '2015-01-01' AND g_1.date_key <= '2015-01-02' GROUP BY g_1.year_name, g_0.trans_date_key LIMIT 1]
------------------
I've attached the plan without the parsetimestamp, which is what appears to be causing the issue.
> Impala translator - Incorrect aggregate replacement in query
> ------------------------------------------------------------
>
> Key: TEIID-4113
> URL: https://issues.jboss.org/browse/TEIID-4113
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.13.3
> Environment: Ubuntu Trusty
> Reporter: Don Krapohl
> Assignee: Steven Hawkins
> Labels: Impala_Translator
>
> When PARSETIMESTAMP is included in a query aggregates in other columns may not be written correctly. Example is as below, sum(first_metric) is rewritten to anon_grp0.agg0 in the query sent to Impala.
> Given the schema:
> //source
> SourceTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> //view
> VirtualTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> // Teiid query
> SELECT the_attribute,
> cast(
> sum(
> first_metric
> )
> /
> count(
> distinct case when second_metric >= 0 then second_metric end
> ) as double
> ) as some_alias,
> PARSETIMESTAMP(another_attribute, 'yyyy-MM-dd') as somedate
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY the_attribute, another_attribute
> //Query sent to impala
> SELECT g_0.the_attribute AS c_0,
> cast(
> (
> anon_grp0.agg0
> /
> cast(
> anon_grp0.agg1 AS bigint
> )
> ) AS double
> ) AS c_1,
> g_0.another_attribute AS c_2
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY g_0.the_attribute, g_0.another_attribute
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-3978) Remove AddressWrapper
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3978?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-3978:
------------------------------------------------
Juraj Duráni <jdurani(a)redhat.com> changed the Status of [bug 1308959|https://bugzilla.redhat.com/show_bug.cgi?id=1308959] from ON_QA to VERIFIED
> Remove AddressWrapper
> ---------------------
>
> Key: TEIID-3978
> URL: https://issues.jboss.org/browse/TEIID-3978
> Project: Teiid
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 9.0, 8.12.5, 8.13.2, 8.7.5.6_2
>
>
> AddressWrapper was introduced to handle an earlier jgroups version where address objects were not directly serializable. However the deserialization code is using the thread context class loader which is not guaranteed to have the JGroups classes in the classpath. The resulting exception (where the original exception is simply swallowed) looks like:
> {code}
> 2016-02-16 08:45:30,140 ERROR [Incoming-1,shared=tcp-teiid-1] org.teiid.replication.jgroups.JGroupsObjectReplicator$ReplicatorRpcDispatcher - exception marshalling object
> java.lang.IllegalStateException: unread block data
> at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2421)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1382)
> at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1706)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1344)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at org.jgroups.blocks.MethodCall.readExternal(MethodCall.java:430)
> at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1837)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> at org.teiid.replication.jgroups.JGroupsObjectReplicator$ContextAwareMarshaller.objectFromBuffer(JGroupsObjectReplicator.java:611)
> at org.teiid.replication.jgroups.JGroupsObjectReplicator$ReplicatorRpcDispatcher.handle(JGroupsObjectReplicator.java:106)
> at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:484)
> at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:391)
> at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:249)
> at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:600)
> at org.jgroups.JChannel.up(JChannel.java:707)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4115) XMLTABLE single element in sequence invalid conversion
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4115?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-4115:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1323996
Bugzilla Update: Perform
> XMLTABLE single element in sequence invalid conversion
> ------------------------------------------------------
>
> Key: TEIID-4115
> URL: https://issues.jboss.org/browse/TEIID-4115
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> There is a possibility to handle xml element sequences as arrays when using XMLTABLE function.
> When there's only one element in the sequence, an exception is thrown:
> {code:plain}
> org.teiid.jdbc.TeiidSQLException: TEIID10076 Invalid conversion from type class java.lang.String with value 'first' to type class [Ljava.lang.String;
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:703)
> at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
> at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:542)
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
> at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268)
> at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
> at com.sun.proxy.$Proxy6.read(Unknown Source)
> at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:551)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:404)
> at org.teiid.jdbc.StatementImpl.executeQuery(StatementImpl.java:338)
> at org.jboss.qe.functions.xml.XmlTableTest.testXmlTableSequenceArrayOneElement(XmlTableTest.java:74)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
> at org.testng.SuiteRunner.run(SuiteRunner.java:240)
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
> at org.testng.TestNG.run(TestNG.java:1031)
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
> at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
> at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
> Caused by: org.teiid.core.types.TransformationException: TEIID10076 Invalid conversion from type class java.lang.String with value 'first' to type class [Ljava.lang.String;
> at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:940)
> at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:928)
> at org.teiid.query.function.FunctionDescriptor.importValue(FunctionDescriptor.java:322)
> at org.teiid.query.processor.relational.XMLTableNode.getValue(XMLTableNode.java:376)
> at org.teiid.query.processor.relational.XMLTableNode.processRow(XMLTableNode.java:341)
> at org.teiid.query.processor.relational.XMLTableNode.nextBatchDirect(XMLTableNode.java:225)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:470)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> The invocation of XMLTABLE function is as follows:
> {code:sql}
> CREATE VIEW SEQUENCE_AS_ARRAY_ONE_ELEMENT(x string[]) AS select * from xmltable('/a' passing convert('<a><b>first</b></a>', xml) columns x string[] path 'b') as x;
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4115) XMLTABLE single element in sequence invalid conversion
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4115:
----------------------------------
Summary: XMLTABLE single element in sequence invalid conversion
Key: TEIID-4115
URL: https://issues.jboss.org/browse/TEIID-4115
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.5
Reporter: Jan Stastny
Assignee: Steven Hawkins
There is a possibility to handle xml element sequences as arrays when using XMLTABLE function.
When there's only one element in the sequence, an exception is thrown:
{code:plain}
org.teiid.jdbc.TeiidSQLException: TEIID10076 Invalid conversion from type class java.lang.String with value 'first' to type class [Ljava.lang.String;
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:703)
at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:542)
at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268)
at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
at com.sun.proxy.$Proxy6.read(Unknown Source)
at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:551)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:404)
at org.teiid.jdbc.StatementImpl.executeQuery(StatementImpl.java:338)
at org.jboss.qe.functions.xml.XmlTableTest.testXmlTableSequenceArrayOneElement(XmlTableTest.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Caused by: org.teiid.core.types.TransformationException: TEIID10076 Invalid conversion from type class java.lang.String with value 'first' to type class [Ljava.lang.String;
at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:940)
at org.teiid.core.types.DataTypeManager.transformValue(DataTypeManager.java:928)
at org.teiid.query.function.FunctionDescriptor.importValue(FunctionDescriptor.java:322)
at org.teiid.query.processor.relational.XMLTableNode.getValue(XMLTableNode.java:376)
at org.teiid.query.processor.relational.XMLTableNode.processRow(XMLTableNode.java:341)
at org.teiid.query.processor.relational.XMLTableNode.nextBatchDirect(XMLTableNode.java:225)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:470)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
The invocation of XMLTABLE function is as follows:
{code:sql}
CREATE VIEW SEQUENCE_AS_ARRAY_ONE_ELEMENT(x string[]) AS select * from xmltable('/a' passing convert('<a><b>first</b></a>', xml) columns x string[] path 'b') as x;
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4105) ODATA: Duplicate NavigationProperty name
by Ivan Lucas Vargas (JIRA)
[ https://issues.jboss.org/browse/TEIID-4105?page=com.atlassian.jira.plugin... ]
Ivan Lucas Vargas commented on TEIID-4105:
------------------------------------------
Hi,
Thanks a lot for the prompt response. I'm confused about the release version for this update. It shouldn't be 8.13.2+ and 9.0, instead of 8.12.5?
> ODATA: Duplicate NavigationProperty name
> ----------------------------------------
>
> Key: TEIID-4105
> URL: https://issues.jboss.org/browse/TEIID-4105
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.3
> Reporter: Ivan Lucas Vargas
> Assignee: Ramesh Reddy
> Labels: Beta3
> Fix For: 9.0, 8.12.5
>
>
> Entity 1: TransferRule
> Entity 2: FinancialAccount
> TransferRule
> - sourceAccount : FinancialAccount
> - destination : FinancialAccount
> - other attributes
> the mapping to this for odata resolves to
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_destinationfinancial_account_id_fk" FromRole="transferrule" ToRole="financialaccount" />
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_sourcefinancial_account_id_fk" FromRole="transferrule"
> ToRole="financialaccount" />
> The navigation property name is duplicated with in transfer rule entity.
> Hence some of the Odata client see it as ambiguous element
> Is there a way to customise the Name to
> Name="src_financialaccount" and
> Name="dest_financialaccount"
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month
[JBoss JIRA] (TEIID-4113) Impala translator - Incorrect aggregate replacement in query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4113?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4113:
---------------------------------------
The query plan debug log from "set showplan debug" can also be useful as that will show what the engine is trying to do.
> Impala translator - Incorrect aggregate replacement in query
> ------------------------------------------------------------
>
> Key: TEIID-4113
> URL: https://issues.jboss.org/browse/TEIID-4113
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.13.3
> Environment: Ubuntu Trusty
> Reporter: Don Krapohl
> Assignee: Steven Hawkins
> Labels: Impala_Translator
>
> When PARSETIMESTAMP is included in a query aggregates in other columns may not be written correctly. Example is as below, sum(first_metric) is rewritten to anon_grp0.agg0 in the query sent to Impala.
> Given the schema:
> //source
> SourceTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> //view
> VirtualTable
> the_attribute string(255),
> first_metric long,
> second_metric bigdecimal
> another_attribute String(255)
> // Teiid query
> SELECT the_attribute,
> cast(
> sum(
> first_metric
> )
> /
> count(
> distinct case when second_metric >= 0 then second_metric end
> ) as double
> ) as some_alias,
> PARSETIMESTAMP(another_attribute, 'yyyy-MM-dd') as somedate
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY the_attribute, another_attribute
> //Query sent to impala
> SELECT g_0.the_attribute AS c_0,
> cast(
> (
> anon_grp0.agg0
> /
> cast(
> anon_grp0.agg1 AS bigint
> )
> ) AS double
> ) AS c_1,
> g_0.another_attribute AS c_2
> FROM VirtualTable
> WHERE a_filter_val=111
> GROUP BY g_0.the_attribute, g_0.another_attribute
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 1 month