-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi guys,
By testing random QL queries, I'm facing with strange errors:
I would like to execute a join between two entities stored in different containers (one in MariaDB and the other one in MongoDB) but it returns an error...
This is my (reduced) schema:
entity "User" {
"id" : string[32]
"name" : string[32]
"paymentsDetails" : string
"comments" -> "Comment"[0..*]
"address" -> "UserAddress"[0..1]
}
entity UserAddress {
streetName: string[32]
streetNumber: bigint
zipcode: string[32]
city: string[32]
country: string[32]
user -> "User"."User.address"[0..1]
}
relationaldb RelationalDatabase {
tables {
table {
"User" : "User"
}
}
}
documentdb DocumentDatabase{
collections{
UserAddress : UserAddress
}
}
This is my query:
from User u, UserAddress ua
select u.id
where u.address == ua
And this is the returned error:
typhonql-server_1 | REQ: from User u, UserAddress ua
typhonql-server_1 | select u.id
typhonql-server_1 | where u.address == ua
typhonql-server_1 | NORMALIZED: from User u, UserAddress ua select u.id where u.address == ua
typhonql-server_1 | ORDER: [<mongodb(),"DocumentDatabase">,<sql(),"RelationalDatabase">]
typhonql-server_1 | PLACEMENTS: {<<mongodb(),"DocumentDatabase">,"UserAddress">,<<mongodb(),"DocumentDatabase">,"User">,<<mongodb(),"DocumentDatabase">,"Comment">,<<sql(),"RelationalDatabase">,"Products">,<<sql(),"RelationalDatabase">,"Suppliers">,<<sql(),"RelationalDatabase">,"CustomerDemographics">,<<sql(),"RelationalDatabase">,"Order_Details">,<<sql(),"RelationalDatabase">,"Shippers">,<<sql(),"RelationalDatabase">,"Region">,<<sql(),"RelationalDatabase">,"Customers">,<<sql(),"RelationalDatabase">,"Territories">,<<sql(),"RelationalDatabase">,"Categories">,<<sql(),"RelationalDatabase">,"Orders">,<<sql(),"RelationalDatabase">,"Employees">}
typhonql-server_1 | Warning: calling function with extra unknown keyword argument: log
typhonql-server_1 | COMPILING2Mongo: from User u, UserAddress ua select u.id where u.address == ua
typhonql-server_1 | 16:31:21.201 [qtp402405659-12] ERROR engineering.swat.typhonql.server.QLRestServer - Failed to handle response
typhonql-server_1 | org.rascalmpl.interpreter.control_exceptions.Throw: |lib://typhonql/src/lang/typhonql/mongodb/Query2Mongo.rsc|:468,81: "Only dynamic parameters can be used as expressions in query docs, not ua.@id"
typhonql-server_1 | at org.rascalmpl.interpreter.control_exceptions.ControlException.reallyFillInStackTrace(ControlException.java:42) ~[rascal-0.18.2.jar:?]
typhonql-server_1 | at org.rascalmpl.interpreter.control_exceptions.Throw.fillInStackTrace(Throw.java:138) ~[rascal-0.18.2.jar:?]
typhonql-server_1 | at java.lang.Throwable.<init>(Throwable.java:266) ~[?:1.8.0_275]
typhonql-server_1 | at java.lang.Exception.<init>(Exception.java:66) ~[?:1.8.0_275]
Did I miss something? Thanks in advance
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working