[JBoss JIRA] (TEIID-4298) Support in Odata4 for the Partner NavigationProperty attribute
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4298?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-4298.
---------------------------------
Fix Version/s: 9.2
(was: 9.1)
Resolution: Done
Labels: alpha2 (was: )
Previous fix was not complete. While in one-2-one situations it was fine, but not in many-2-one situation, where in this example
product -> category (many-to-one) but navigation is one product to one category
category to product (one-2-many) navigation one category to many products.
so as long as navigation with out key construct is not set a collection type, you can keep of walking the tree.
BTW, your last URL is wrong too, Teiid always uses the FK name for the navigation. Check the metadata for its name.
> Support in Odata4 for the Partner NavigationProperty attribute
> --------------------------------------------------------------
>
> Key: TEIID-4298
> URL: https://issues.jboss.org/browse/TEIID-4298
> Project: Teiid
> Issue Type: Enhancement
> Components: OData
> Affects Versions: 9.0
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Labels: alpha2
> Fix For: 9.2
>
>
> in Teiid 9.0 it would be useful to create a bidirectional link between tables, like in odata2
> for example:
> <EntityType Name="Product">
> <Key>
> <PropertyRef Name="ProductID"/>
> </Key>
> <Property Name="ProductID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity"/>
> <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40"/>
> <Property Name="SupplierID" Type="Edm.Int32"/>
> <Property Name="CategoryID" Type="Edm.Int32"/>
> <Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20"/>
> <Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4"/>
> <Property Name="UnitsInStock" Type="Edm.Int16"/>
> <Property Name="UnitsOnOrder" Type="Edm.Int16"/><Property Name="ReorderLevel" Type="Edm.Int16"/>
> <Property Name="Discontinued" Type="Edm.Boolean" Nullable="false"/>
> <NavigationProperty Name="Category" Type="NorthwindModel.Category" Partner="Products">
> <ReferentialConstraint Property="CategoryID" ReferencedProperty="CategoryID"/>
> </NavigationProperty>
> <NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Product"/>
> <NavigationProperty Name="Supplier" Type="NorthwindModel.Supplier" Partner="Products">
> <ReferentialConstraint Property="SupplierID" ReferencedProperty="SupplierID"/>
> </NavigationProperty>
> </EntityType>
> <EntityType Name="Category">
> <Key>
> <PropertyRef Name="CategoryID"/>
> </Key>
> <Property Name="CategoryID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity"/>
> <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15"/>
> <Property Name="Description" Type="Edm.String" MaxLength="max"/>
> <Property Name="Picture" Type="Edm.Binary" MaxLength="max"/>
> <NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Category"/>
> </EntityType>
> It seems that the two tables are related through NavigationProperty and Partner
> In fact I can see all the Categories of a certain Product
> http://services.odata.org/V4/Northwind/Northwind.svc/Products(10)/Category
> or viceversa the products of a certain Category
> http://services.odata.org/V4/Northwind/Northwind.svc/Categories(8)/Products
> While in Teiid using odata2 this works just by creating a FK from one table to the other one, with odata4 this does not happen
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4607) Postgresql translator - unable to insert NULL value to column of type Object
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4607?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4607.
-----------------------------------
Resolution: Done
The change will check for null blobs and use the varbinary sql type instead.
This issue can also be addressed by using the varbinary type for the source table rather than blob.
There doesn't seem to be a similar issue with using a clob source type.
> 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
> Components: JDBC Connector
> Affects Versions: 8.12.5
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.2
>
>
> 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
[JBoss JIRA] (TEIID-4607) Postgresql translator - unable to insert NULL value to column of type Object
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4607?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4607:
----------------------------------
Component/s: JDBC Connector
Fix Version/s: 9.2
> 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
> Components: JDBC Connector
> Affects Versions: 8.12.5
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.2
>
>
> 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
[JBoss JIRA] (TEIID-4598) Source function for Greenplum data source doesn't get pushdown
by Anu Saji (JIRA)
[ https://issues.jboss.org/browse/TEIID-4598?page=com.atlassian.jira.plugin... ]
Anu Saji updated TEIID-4598:
----------------------------
Attachment: jdv_error(1).txt
server.log
> Source function for Greenplum data source doesn't get pushdown
> --------------------------------------------------------------
>
> Key: TEIID-4598
> URL: https://issues.jboss.org/browse/TEIID-4598
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x
> Reporter: Anu Saji
> Assignee: Steven Hawkins
> Fix For: 8.12
>
> Attachments: jdv_error(1).txt, server.log
>
>
> In customers exact words
> when executing the following
> ~~~
> USER COMMAND:
> SELECT GPDBDEV.kr_cust_team_target.team, LAG(ALL convert(GPDBDEV.kr_cust_team_target.target_amount, string)) OVER (PARTITION BY GPDBDEV.kr_cust_team_target.team ORDER BY GPDBDEV.kr_cust_team_target."year", GPDBDEV.kr_cust_team_target."month") FROM GPDBDEV.kr_cust_team_target
> ~~~
> Gives NPE
> 11:59:38,611 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue3) TEIID30019 Unexpected exception for request BWIVpfi0IyEK.0: java.lang.NullPointerException
> at org.teiid.query.function.FunctionDescriptor.newInstance(FunctionDescriptor.java:91) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.function.aggregate.UserDefined.<init>(UserDefined.java:44) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.GroupingNode.initAccumulator(GroupingNode.java:291) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.WindowFunctionProjectNode.initializeAccumulators(WindowFunctionProjectNode.java:414) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.WindowFunctionProjectNode.buildResults(WindowFunctionProjectNode.java:339) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.WindowFunctionProjectNode.nextBatchDirect(WindowFunctionProjectNode.java:232) [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.ProjectNode.nextBatchDirect(ProjectNode.java:150) [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_91]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_91]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_91]
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4605) SqlServer translator - insert/update statements - timestamp is cast to datetime
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4605?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4605:
----------------------------------
Component/s: JDBC Connector
Fix Version/s: 9.2
9.1.2
Yes, the translator is not fully aware of the datetime2 type, which was added for SQL Server 2008.
> SqlServer translator - insert/update statements - timestamp is cast to datetime
> -------------------------------------------------------------------------------
>
> Key: TEIID-4605
> URL: https://issues.jboss.org/browse/TEIID-4605
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.5
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.2, 9.1.2
>
>
> For update statements (insert, update), *timestamp* values are cast to *datatime* type. In MSSQL, this type's range start from year 1753 (1753\-01\-01...). However, there is *datetime2* type, which start from 0001\-01\-01.
> This default cast to *datetime* prevents user from inserting value before year 1753 even if column in MSSQL is defined as datetime2.
> Note: Specifying column option NATIVE_TYPE has no effect on this issue.
> {code:plain|title=Stacktrace}
> Connector worker process failed for atomic-request=7owuBqBS/Vow.1.0.3: org.teiid.translator.jdbc.JDBCExecutionException: 242 TEIID11013:TEIID11004 Error executing statement(s): [SQL: UPDATE SmallA SET TimestampValue = CAST('0100-02-03 04:05:06.0' AS DATETIME)]
> 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.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar: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.microsoft.sqlserver.jdbc.SQLServerException: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
> at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:254)
> at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:84)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1510)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:792)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:689)
> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:642)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:375)
> at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:207) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 20 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[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:
---------------------------------
Attachment: server.log
> 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
> Attachments: server.log
>
>
> Impala regexp_replace function appears to collide with prepared values only when attemping to replace apostrophe.
> 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
> Error:
> {noformat}
> 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'] SQL: SELECT regexp_replace(g_0.`string_column`, '\'', ''') FROM some_impala_table g_0 WHERE g_0.`process_date_key` = ? AND g_0.`customer_id` = 112]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4614) statement executeOlapQuery quietly fails
by Johnathon Lee (JIRA)
Johnathon Lee created TEIID-4614:
------------------------------------
Summary: statement executeOlapQuery quietly fails
Key: TEIID-4614
URL: https://issues.jboss.org/browse/TEIID-4614
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.7.9.6_2, 9.x
Reporter: Johnathon Lee
Assignee: Steven Hawkins
cellSet = stmt.executeOlapQuery(mdxQuery) in OlapQueryExecution is quietly failing.
modify execute method to add Exception catch and printStackTrace
{code:java}
// Some comments here
public void execute() throws TranslatorException {
try {
stmt = this.connection.createStatement();
cellSet = stmt.executeOlapQuery(mdxQuery);
CellSetAxis rowAxis = this.cellSet.getAxes().get(Axis.ROWS.axisOrdinal());
rowPositionIterator = rowAxis.iterator();
columnsAxis = cellSet.getAxes().get(Axis.COLUMNS.axisOrdinal());
colWidth = rowAxis.getAxisMetaData().getHierarchies().size() + this.columnsAxis.getPositions().size();
} catch (SQLException e) {
throw new TranslatorException(e);
} catch (Exception e) {
e.printStackTrace();
} finally {
System.out.println("in finally block");
}
}
{code}
run existing tests to see (not catching the exception has all tests passing)
{code:java}
Running org.teiid.translator.olap.TestOlapTranslator
org.teiid.core.TeiidRuntimeException
at org.teiid.translator.olap.OlapQueryExecution.execute(OlapQueryExecution.java:100)
at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:67)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
in finally block
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.541 sec <<< FAILURE! - in org.teiid.translator.olap.TestOlapTranslator
testCannedProcedure(org.teiid.translator.olap.TestOlapTranslator) Time elapsed: 0.54 sec <<< FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.fail(Assert.java:95)
at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:68)
Results :
Failed tests:
TestOlapTranslator.testCannedProcedure:68 null
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4611) Infinispan DSL translator - error deleting rows from table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4611?page=com.atlassian.jira.plugin... ]
Steven Hawkins reassigned TEIID-4611:
-------------------------------------
Assignee: Van Halbert (was: Steven Hawkins)
> Infinispan DSL translator - error deleting rows from table
> ----------------------------------------------------------
>
> Key: TEIID-4611
> URL: https://issues.jboss.org/browse/TEIID-4611
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Van Halbert
> Priority: Blocker
>
> DSL translator is not able to delete rows from table:
> {code:sql|title=Example queries}
> insert into smalla (intkey, stringkey) values (1, '1');
> insert into smalla (intkey, stringkey) values (2, '2');
> delete from smalla
> {code}
> Teiid seems to try to delete record repeatedly:
> {code:plain|title=Exception}
> 14:05:20,351 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue37) TEIID21013 ObjectUpdateExecution: Warning - The object does not exist when trying to delete from table SmallA with key 2
> 14:05:20,352 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue37) Connector worker process failed for atomic-request=IuoK2RpItaN2.13.0.6: org.teiid.translator.TranslatorException: TEIID21012 Processing error: Unable to delete the object in table SmallA with key 2
> at org.teiid.translator.object.ObjectUpdateExecution.handleDelete(ObjectUpdateExecution.java:385) [translator-object-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:137) [translator-object-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) [translator-object-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar: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.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> 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.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
> Moreover, Teiid removes only one row (I will log this issue separately):
> *Data in table before delete:*
> |IntKey|StringKey|...|
> |1|1|...|
> |2|2|...|
> *Data in table after delete:*
> |IntKey|StringKey|...|
> |2|2|...|
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4612) Infinistpa DSL translator - table names are case sensitive
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4612?page=com.atlassian.jira.plugin... ]
Steven Hawkins reassigned TEIID-4612:
-------------------------------------
Assignee: Van Halbert (was: Steven Hawkins)
Case sensitivity may be required, but you would expect that the name in source option would work.
> Infinistpa DSL translator - table names are case sensitive
> ----------------------------------------------------------
>
> Key: TEIID-4612
> URL: https://issues.jboss.org/browse/TEIID-4612
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Van Halbert
>
> Table names defined in DDL metadata are case sensitive.
> Example:
> This table name has exact name as object in JDG cache
> {code:sql|title=DDL metadata}
> CREATE FOREIGN TABLE SmallA (intKey integer PRIMARY KEY,...
> {code}
> This query executes correctly:
> {code:sql|title=Query}
> insert into smalla (intkey, stringkey) values (1, '1');
> {code}
> However, changing metadata to this:
> {code:sql|title=Updated DDL metadata}
> CREATE FOREIGN TABLE SMALLA (intKey integer PRIMARY KEY,...
> {code}
> Ends with error:
> {code:plain}
> 14:58:31,509 WARN [org.teiid.CONNECTOR] (Worker17_QueryProcessorQueue224) Connector worker process failed for atomic-request=sUTIOW6woCs0.0.0.57: org.teiid.translator.TranslatorException: TEIID21005 Registered Class not found for table reference SMALLA, check table name or nameInSouce to ensure one matches a registered class in the resource adapter
> at org.teiid.translator.object.util.ObjectUtil.getRegisteredClass(ObjectUtil.java:106) [translator-object-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:121) [translator-object-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) [translator-object-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at sun.reflect.GeneratedMethodAccessor90.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.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> 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.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
> The error happens even with specified NAMEINSOURCE for the table:
> {code:sql|title=DDL metadata}
> CREATE FOREIGN TABLE SmallA (intKey integer PRIMARY KEY,...
> OPTIONS (NAMEINSOURCE 'SmallA', ...)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4598) Source function for Greenplum data source doesn't get pushdown
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4598?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4598:
---------------------------------------
The exception is indicative of the logic expecting a user defined aggregate function that is defined by a class. A couple of things - how were the source functions defined (what is the metadata including extension properties used) and what is the full query plan? As we need to confirm that no other constructs are preventing pushdown which would require the engine to evaluate the window functions - although we need to make sure that a better error is presented.
> Source function for Greenplum data source doesn't get pushdown
> --------------------------------------------------------------
>
> Key: TEIID-4598
> URL: https://issues.jboss.org/browse/TEIID-4598
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x
> Reporter: Anu Saji
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> In customers exact words
> when executing the following
> ~~~
> USER COMMAND:
> SELECT GPDBDEV.kr_cust_team_target.team, LAG(ALL convert(GPDBDEV.kr_cust_team_target.target_amount, string)) OVER (PARTITION BY GPDBDEV.kr_cust_team_target.team ORDER BY GPDBDEV.kr_cust_team_target."year", GPDBDEV.kr_cust_team_target."month") FROM GPDBDEV.kr_cust_team_target
> ~~~
> Gives NPE
> 11:59:38,611 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue3) TEIID30019 Unexpected exception for request BWIVpfi0IyEK.0: java.lang.NullPointerException
> at org.teiid.query.function.FunctionDescriptor.newInstance(FunctionDescriptor.java:91) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.function.aggregate.UserDefined.<init>(UserDefined.java:44) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.GroupingNode.initAccumulator(GroupingNode.java:291) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.WindowFunctionProjectNode.initializeAccumulators(WindowFunctionProjectNode.java:414) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.WindowFunctionProjectNode.buildResults(WindowFunctionProjectNode.java:339) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.WindowFunctionProjectNode.nextBatchDirect(WindowFunctionProjectNode.java:232) [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.ProjectNode.nextBatchDirect(ProjectNode.java:150) [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_91]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_91]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_91]
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years