[teiid-issues] [JBoss JIRA] (TEIID-2870) Expand "allow-join" extension property on Foreign Key

Ramesh Reddy (JIRA) issues at jboss.org
Thu Feb 27 11:01:50 EST 2014


    [ https://issues.jboss.org/browse/TEIID-2870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12948709#comment-12948709 ] 

Ramesh Reddy edited comment on TEIID-2870 at 2/27/14 11:01 AM:
---------------------------------------------------------------

I can't for sure say I follow your question completely above. Let me see you are saying same.

The document model can be like below. See the "Categories" table and "Products" table. Both documents exist, but Products also "embeds" "Categories" based on the metadata an relationship.

{code}
>db.Categories.find().pretty()
{
	"_id" : 1,
	"CategoryName" : "Beverages",
	"Description" : "Soft drinks, coffees, teas, beers, and ales",
}
{
	"_id" : 7,
	"CategoryName" : "Produce",
	"Description" : "Dried fruit and bean curd",
}
{
	"_id" : 8,
	"CategoryName" : "Seafood",
	"Description" : "Seaweed and fish",
}
{
	"_id" : 6,
	"CategoryName" : "Meat/Poultry",
	"Description" : "Prepared meats",
}


> db.Products.findOne()
{
	"_id" : 1,
	"ProductName" : "Chai",
	"SupplierID" : DBRef("Suppliers", 1),
	"CategoryID" : DBRef("Categories", 1),
	"QuantityPerUnit" : "10 boxes x 20 bags",
	"UnitPrice" : 0,
	"UnitsInStock" : 39,
	"UnitsOnOrder" : 0,
	"ReorderLevel" : 10,
	"Discontinued" : 0,
	"Categories" : {
		"_id" : 1,
		"CategoryName" : "Beverages",
		"Description" : "Soft drinks, coffees, teas, beers, and ales",
	},
}
{code}

BTW, I am not expecting to detect this parent-child embedded situation in the engine. Engine can still convert RIGHT OUTER to LEFT OUTER by flipping the JOINs as it does currently. What I am asking is the "allow-join" metadata does not contain "RIGHT OUTER" then treat it as if there is no JOIN support between two tables.

                
      was (Author: rareddy):
    I can't for sure say I follow your question completely above. Let me see you are saying same.

The document model can be like below. See the "Categories" table and "Products" table. Both documents exist, but Products also "embeds" "Categories" based on the metadata an relationship.

{code}
>db.Categories.find().pretty()
{
	"_id" : 7,
	"CategoryName" : "Produce",
	"Description" : "Dried fruit and bean curd",
}
{
	"_id" : 8,
	"CategoryName" : "Seafood",
	"Description" : "Seaweed and fish",
}
{
	"_id" : 6,
	"CategoryName" : "Meat/Poultry",
	"Description" : "Prepared meats",
}


> db.Products.findOne()
{
	"_id" : 1,
	"ProductName" : "Chai",
	"SupplierID" : DBRef("Suppliers", 1),
	"CategoryID" : DBRef("Categories", 1),
	"QuantityPerUnit" : "10 boxes x 20 bags",
	"UnitPrice" : 0,
	"UnitsInStock" : 39,
	"UnitsOnOrder" : 0,
	"ReorderLevel" : 10,
	"Discontinued" : 0,
	"Categories" : {
		"_id" : 1,
		"CategoryName" : "Beverages",
		"Description" : "Soft drinks, coffees, teas, beers, and ales",
	},
}
{code}

BTW, I am not expecting to detect this parent-child embedded situation in the engine. Engine can still convert RIGHT OUTER to LEFT OUTER by flipping the JOINs as it does currently. What I am asking is the "allow-join" metadata does not contain "RIGHT OUTER" then treat it as if there is no JOIN support between two tables.

                  
> Expand "allow-join" extension property on Foreign Key
> -----------------------------------------------------
>
>                 Key: TEIID-2870
>                 URL: https://issues.jboss.org/browse/TEIID-2870
>             Project: Teiid
>          Issue Type: Enhancement
>          Components: Query Engine
>    Affects Versions: 8.7
>            Reporter: Ramesh Reddy
>            Assignee: Steven Hawkins
>
> Currently "allow-join" property on a Foreign Key, defines if the joins based on that Foreign Key that are valid to push to the source or not, when JOIN capability is turned on at translator level. This feature is used in the MongoDB translator to allow JOINS to pushed to source.
> What I have seen is "allow-join" is blanket capability that says it supports all LEFT, RIGHT, INNER and CROSS JOINS.  It is useful to define this capability in fine grained manner to allow each kind of JOIN explicitly to control the JOIN behavior.
> The need came from MongoDB translator, where INNER,LEFT are possible but CROSS and RIGHT are not.

--
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


More information about the teiid-issues mailing list