[JBoss JIRA] (TEIID-2841) MongoDB: Wrong results returned with MERGE in ONE-1-ONE relation
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-2841?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-2841:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1064528|https://bugzilla.redhat.com/show_bug.cgi?id=1064528] from NEW to ASSIGNED
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2843) MongoDB: ClassCastException while doing JOIN based query
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-2843?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-2843:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1064528|https://bugzilla.redhat.com/show_bug.cgi?id=1064528] from NEW to ASSIGNED
> MongoDB: ClassCastException while doing JOIN based query
> --------------------------------------------------------
>
> Key: TEIID-2843
> URL: https://issues.jboss.org/browse/TEIID-2843
> 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
>
>
> With Schema like
> {code}
> CREATE FOREIGN TABLE Company (
> name varchar(50) PRIMARY KEY,
> description varchar(256)
> ) OPTIONS(UPDATABLE 'TRUE',"teiid_mongo:EMBEDDABLE" 'true');
> CREATE FOREIGN TABLE Job (
> jobId integer PRIMARY KEY,
> description varchar(256),
> companyname varchar(50),
> FOREIGN KEY (companyname) REFERENCES Company (name)
> ) OPTIONS(UPDATABLE 'TRUE', "teiid_mongo:EMBEDDABLE" 'true');
>
> CREATE FOREIGN TABLE Employee (
> ename varchar(50) PRIMARY KEY,
> jobId integer,
> FOREIGN KEY (jobId) REFERENCES Job (jobId)
> ) OPTIONS(UPDATABLE 'TRUE');
> {code}
> then doing a single JOIN Query
> {code}
> select e.ename, c.name, j.description from Employee as e JOIN Job j ON e.jobId = j.jobId JOIN Company c ON j.companyname = c.name
> {code}
> fails with
> {code}
> 14:22:05,271 ERROR [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue432) 258Se2CWMytI TEIID30019 Unexpected exception for request 258Se2CWMytI.28: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.visit(MongoDBSelectVisitor.java:419)
> at org.teiid.language.Join.acceptVisitor(Join.java:66) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.append(MongoDBSelectVisitor.java:95)
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.append(MongoDBSelectVisitor.java:106)
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.visit(MongoDBSelectVisitor.java:482)
> at org.teiid.language.Select.acceptVisitor(Select.java:103) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2830) One-2-One mapping in MongoDB should not require PK on child table
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-2830?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-2830:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1064528|https://bugzilla.redhat.com/show_bug.cgi?id=1064528] from NEW to ASSIGNED
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2841) MongoDB: Wrong results returned with MERGE in ONE-1-ONE relation
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-2841?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-2841:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1064528
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (TEIID-2843) MongoDB: ClassCastException while doing JOIN based query
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-2843?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-2843:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1064528
> MongoDB: ClassCastException while doing JOIN based query
> --------------------------------------------------------
>
> Key: TEIID-2843
> URL: https://issues.jboss.org/browse/TEIID-2843
> 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
>
>
> With Schema like
> {code}
> CREATE FOREIGN TABLE Company (
> name varchar(50) PRIMARY KEY,
> description varchar(256)
> ) OPTIONS(UPDATABLE 'TRUE',"teiid_mongo:EMBEDDABLE" 'true');
> CREATE FOREIGN TABLE Job (
> jobId integer PRIMARY KEY,
> description varchar(256),
> companyname varchar(50),
> FOREIGN KEY (companyname) REFERENCES Company (name)
> ) OPTIONS(UPDATABLE 'TRUE', "teiid_mongo:EMBEDDABLE" 'true');
>
> CREATE FOREIGN TABLE Employee (
> ename varchar(50) PRIMARY KEY,
> jobId integer,
> FOREIGN KEY (jobId) REFERENCES Job (jobId)
> ) OPTIONS(UPDATABLE 'TRUE');
> {code}
> then doing a single JOIN Query
> {code}
> select e.ename, c.name, j.description from Employee as e JOIN Job j ON e.jobId = j.jobId JOIN Company c ON j.companyname = c.name
> {code}
> fails with
> {code}
> 14:22:05,271 ERROR [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue432) 258Se2CWMytI TEIID30019 Unexpected exception for request 258Se2CWMytI.28: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.visit(MongoDBSelectVisitor.java:419)
> at org.teiid.language.Join.acceptVisitor(Join.java:66) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.append(MongoDBSelectVisitor.java:95)
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.append(MongoDBSelectVisitor.java:106)
> at org.teiid.translator.mongodb.MongoDBSelectVisitor.visit(MongoDBSelectVisitor.java:482)
> at org.teiid.language.Select.acceptVisitor(Select.java:103) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.0.Alpha3-SNAPSHOT.jar:8.7.0.Alpha3-SNAPSHOT]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months