[JBoss JIRA] (TEIID-3552) NPE on calling the native query procedure with null variable parameter
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3552?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3552:
----------------------------------
Fix Version/s: 8.12
Affects Version/s: 8.7
(was: 8.11)
Component/s: Query Engine
Yes, I can confirm there is an issue here. The nul handling is commented out in LanguageBridgeFactory, but I don't recall why.
> NPE on calling the native query procedure with null variable parameter
> ----------------------------------------------------------------------
>
> Key: TEIID-3552
> URL: https://issues.jboss.org/browse/TEIID-3552
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> Calling the native query procedure and passing null as "variable" parameter like in the following example:
> {code:sql}
> exec my.native("request" => 'Select 1', "variable" => null)
> {code}
> the following exception is thrown:
> {code:sql}
> 19:41:00,707 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue10) zC4UryNl1/3R TEIID30019 Unexpected exception for request zC4UryNl1/3R.5: java.lang.NullPointerException
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:958) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:183) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.<init>(ConnectorWorkItem.java:165) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.datamgr.ConnectorManager.registerRequest(ConnectorManager.java:203) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:966) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:179) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:475) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:248) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:136) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:231) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
> {code}
> As a workaround, the query is successfully executed if the "variable" parameter is omitted:
> {code:sql}
> exec my.native("request" => 'Select 1')
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 9 months
[JBoss JIRA] (TEIID-3552) NPE on calling the native query procedure with null variable parameter
by Salvatore R (JIRA)
Salvatore R created TEIID-3552:
----------------------------------
Summary: NPE on calling the native query procedure with null variable parameter
Key: TEIID-3552
URL: https://issues.jboss.org/browse/TEIID-3552
Project: Teiid
Issue Type: Bug
Affects Versions: 8.11
Reporter: Salvatore R
Assignee: Steven Hawkins
Calling the native query procedure and passing null as "variable" parameter like in the following example:
{code:sql}
exec my.native("request" => 'Select 1', "variable" => null)
{code}
the following exception is thrown:
{code:sql}
19:41:00,707 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue10) zC4UryNl1/3R TEIID30019 Unexpected exception for request zC4UryNl1/3R.5: java.lang.NullPointerException
at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:958) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:183) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.<init>(ConnectorWorkItem.java:165) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.datamgr.ConnectorManager.registerRequest(ConnectorManager.java:203) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:966) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:179) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:475) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:248) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:136) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:231) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.11.0.Final.jar:8.11.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
{code}
As a workaround, the query is successfully executed if the "variable" parameter is omitted:
{code:sql}
exec my.native("request" => 'Select 1')
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 9 months
[JBoss JIRA] (TEIID-2841) MongoDB: Wrong results returned with MERGE in ONE-1-ONE relation
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2841?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-2841.
---------------------------------
> MongoDB: Wrong results returned with MERGE in ONE-1-ONE relation
> ----------------------------------------------------------------
>
> Key: TEIID-2841
> URL: https://issues.jboss.org/browse/TEIID-2841
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.4
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Labels: Alpha3, mongodb
> Fix For: 8.7
>
>
> If Schema is like
> {code}
> CREATE FOREIGN TABLE Customer (
> CustomerId integer PRIMARY KEY,
> FirstName varchar(25),
> LastName varchar(25)
> ) OPTIONS(UPDATABLE 'TRUE');
>
> CREATE FOREIGN TABLE Address (
> CustomerId integer PRIMARY KEY,
> Street varchar(50),
> City varchar(25),
> State varchar(25),
> Zipcode varchar(6),
> FOREIGN KEY (CustomerId) REFERENCES Customer (CustomerId)
> ) OPTIONS(UPDATABLE 'TRUE', "teiid_mongo:MERGE" 'Customer');
> {code}
> and we did inserts like
> {code}
> insert into Customer (customerId ,firstname,lastname) values ('1002','Syed','Iqbal');
> insert into Address (customerId,street,city,state,zipcode) values ('1002','123 Main St','Chicago','IL','60659');
> insert into Customer (customerId ,firstname,lastname) values ('1000','Ramesh','Reddy');
> {code}
> the data in mongo is in form
> {code}
> {
> "Address" : {
> "Street" : "123 Main St",
> "City" : "Chicago",
> "State" : "IL",
> "Zipcode" : "60659",
> "_id" : DBRef("Customer", 1002)
> },
> "FirstName" : "Syed",
> "LastName" : "Iqbal",
> "Notes" : [ ],
> "_id" : 1002
> }
> { "_id" : 1000, "FirstName" : "Ramesh", "LastName" : "Reddy" }
> {code}
> and if you issue
> {code}
> SELECT * FROM Address
> {code}
> you will see
> ||CustomerId||Street||City||State||
> |1002|123 Main St|Chicago|IL|
> |<null>|<null>|<null>|<null>|
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 9 months
[JBoss JIRA] (TEIID-3236) Copy criteria within a left outer join removes predicates
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3236?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3236.
---------------------------------
> Copy criteria within a left outer join removes predicates
> ---------------------------------------------------------
>
> Key: TEIID-3236
> URL: https://issues.jboss.org/browse/TEIID-3236
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.10
>
>
> With a query such as:
> select bqt1.smalla.intkey from bqt1.smalla inner join (select bqt3.smalla.intkey from bqt2.smalla left outer join bqt3.smalla on bqt2.smalla.intkey = bqt3.smalla.intkey and bqt3.smalla.intkey = 1) foo on bqt1.smalla.intkey = foo.intkey
> where the left outer join is not pushed to the source, we will process it as if bqt2.smalla.intkey = bqt3.smalla.intkey doesn't exist.
> This is somewhat unlikely to occur for user queries as the join predicates are not likely to occur and could easily be simplified.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 9 months
[JBoss JIRA] (TEIID-2830) One-2-One mapping in MongoDB should not require PK on child table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2830?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-2830.
---------------------------------
> One-2-One mapping in MongoDB should not require PK on child table
> -----------------------------------------------------------------
>
> Key: TEIID-2830
> URL: https://issues.jboss.org/browse/TEIID-2830
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Labels: Alpha3, mongodb
> Fix For: 8.7
>
>
> A schema like
> {code}
> CREATE FOREIGN TABLE Customer (
> CustomerId integer PRIMARY KEY,
> FirstName varchar(25),
> LastName varchar(25),
> ) OPTIONS(UPDATABLE 'TRUE');
>
> CREATE FOREIGN TABLE Address (
> CustomerId integer,
> Street varchar(50),
> City varchar(25),
> State varchar(25),
> Zipcode varchar(6),
> FOREIGN KEY (CustomerId) REFERENCES Customer (CustomerId),
> ) OPTIONS(UPDATABLE 'TRUE', teiid_mongo:MERGE 'Customer');
> {code}
> will fail on second insert with NPE for lack of PK on the Address table
> {code}
> insert into Customer (customer_id ,first_name,last_name) values ('1002','Syed','Iqbal');
> insert into Address (customer_id,street,city,state,zipcode) values ('1002','123 Main St','Chicago','IL','60659');
> {code}
> the Exception is
> {code}
> 09:38:53,250 ERROR [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue11) 70p5084MEtHx Connector worker process failed for atomic-request=70p5084MEtHx.0.0.3: java.lang.NullPointerException
> at org.teiid.translator.mongodb.MongoDocument.buildMergeKey(MongoDocument.java:252)
> at org.teiid.translator.mongodb.MongoDocument.build(MongoDocument.java:143)
> at org.teiid.translator.mongodb.MongoDocument.<init>(MongoDocument.java:64)
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.visit(MongoDBSelectVisitor.java:400)
> at org.teiid.language.NamedTable.acceptVisitor(NamedTable.java:66) [teiid-api-8.7.0.Alpha2-SNAPSHOT.jar:8.7.0.Alpha2-SNAPSHOT]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.0.Alpha2-SNAPSHOT.jar:8.7.0.Alpha2-SNAPSHOT]
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.append(MongoDBSelectVisitor.java:95)
> at org.teiid.translator.mongodb.MongoDBUpdateVisitor.visit(MongoDBUpdateVisitor.java:59)
> at org.teiid.language.Insert.acceptVisitor(Insert.java:57) [teiid-api-8.7.0.Alpha2-SNAPSHOT.jar:8.7.0.Alpha2-SNAPSHOT]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 9 months
[JBoss JIRA] (TEIID-3040) MongoDB: Remove the IDREF fields for the FK fields
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3040?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3040.
---------------------------------
> MongoDB: Remove the IDREF fields for the FK fields
> --------------------------------------------------
>
> Key: TEIID-3040
> URL: https://issues.jboss.org/browse/TEIID-3040
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Fix For: 8.7.1, 8.9
>
>
> TEIID-2958 has been working towards removing the IDREF fields from embedded documents. I see no reason to represent FK in the parent table with IDREF either. This will make the document model representation simple and aligns with how a typical developer would design.
> If the schema looks like
> {code}
> CREATE FOREIGN TABLE Customer (
> id integer PRIMARY KEY,
> firstName string,
> lastName string,
> email_addr string,
> FORIEGN KEY (email_addr) REFERENCES Email(address)
> );
> CREATE FOREIGN TABLE Email (
> address string PRIMARY KEY,
> provider string
> ) OPTIONS ("teiid_mongo:MERGE" 'Customer');
> {code}
> Currently Teiid writes the document as
> {code}
> Customer
> {
> "_id" : 1,
> "firstName" : "Ramesh",
> "lastName" : "Reddy",
> "email_addr" : DBRef("EMail", "abc(a)abc.com"),
> "EMail" : {
> "_id": "abc(a)abc.com",
> "provider" : "Comcast"
> }
> }
> {code}
> change to:
> {code}
> customer
> {
> "_id" : 1,
> "firstName" : "Ramesh",
> "lastName" : "Reddy",
> "email_addr" : "abc(a)abc.com",
> "EMail" : {
> "provider" : "Comcast"
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 9 months