You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vxquery.apache.org by Eldon Carman <ec...@ucr.edu> on 2013/10/24 01:10:13 UTC

Rewrite Rules for Implementing Join

I have added the following rules to create cross product of each data
source up to the select operator in the query plan.

SimpleUnnestToProductRule
PushAssignDownThroughProductRule
PushUnnestDownThroughProductRule (new)
PushSubplanWithAggregateDownThroughProductRule

It appears that algebricks do not have a rule to take a select operator and
move it into a join operator that is a cross product as the join condition.
I found a rule that pushes a select down through the product rule, but I
want to change the join condition to eliminate the select.

Just want to confirm this before I write this new rewrite rule.

Preston

Re: Rewrite Rules for Implementing Join

Posted by Eldon Carman <ec...@ucr.edu>.
At first I though the PushSelectIntoJoinRule rule only pushed selects that
were independent on to one side of the join operator. Once I realized it
added the select condition to the join, I was able to trace down the issue
in the query plan that stopped this rewrite rule from working properly.

Thanks


On Wed, Oct 23, 2013 at 4:35 PM, Vinayak Borkar <vi...@gmail.com> wrote:

> Have you looked at edu.uci.ics.hyracks.**algebricks.rewriter.rules.**
> PushSelectIntoJoinRule?
>
>
>
> On 10/23/13 4:10 PM, Eldon Carman wrote:
>
>> I have added the following rules to create cross product of each data
>> source up to the select operator in the query plan.
>>
>> SimpleUnnestToProductRule
>> PushAssignDownThroughProductRu**le
>> PushUnnestDownThroughProductRu**le (new)
>> PushSubplanWithAggregateDownTh**roughProductRule
>>
>> It appears that algebricks do not have a rule to take a select operator
>> and
>> move it into a join operator that is a cross product as the join
>> condition.
>> I found a rule that pushes a select down through the product rule, but I
>> want to change the join condition to eliminate the select.
>>
>> Just want to confirm this before I write this new rewrite rule.
>>
>> Preston
>>
>>
>

Re: Rewrite Rules for Implementing Join

Posted by Vinayak Borkar <vi...@gmail.com>.
Have you looked at 
edu.uci.ics.hyracks.algebricks.rewriter.rules.PushSelectIntoJoinRule?


On 10/23/13 4:10 PM, Eldon Carman wrote:
> I have added the following rules to create cross product of each data
> source up to the select operator in the query plan.
>
> SimpleUnnestToProductRule
> PushAssignDownThroughProductRule
> PushUnnestDownThroughProductRule (new)
> PushSubplanWithAggregateDownThroughProductRule
>
> It appears that algebricks do not have a rule to take a select operator and
> move it into a join operator that is a cross product as the join condition.
> I found a rule that pushes a select down through the product rule, but I
> want to change the join condition to eliminate the select.
>
> Just want to confirm this before I write this new rewrite rule.
>
> Preston
>