[ 
https://issues.apache.org/jira/browse/CALCITE-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

LakeShen updated CALCITE-5889:
------------------------------
    Description: 
There are many projects that implement optimizers based on Calcite,our 
optimizer is also based on Calcite.

Calcite has a lot of good rules in CoreRules.It has UnionToDistinctRule and 
IntersectToDistinctRule RelRule ,UnionToDistinctRule is that converts Union(all 
= false) to Union(all=true) + Aggregate,IntersectToDistinctRule is that 
converts Intersect(all=false) to Union(all=true) + Aggregate + Filter.None of 
these rules translate Minus to other RelNode combinations.

Normally, a computation engine does not have a Minus operator, so it is common 
to convert Minus to some other relational algebra combination in the 
optimizer.For example,in Presto,it has the ImplementIntersectAndExceptAsUnion

> Add the RelRule that converts Minus to into UNION ALL..GROUP BY...WHERE
> -----------------------------------------------------------------------
>
>                 Key: CALCITE-5889
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5889
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>            Reporter: LakeShen
>            Priority: Major
>             Fix For: 1.36.0
>
>
> There are many projects that implement optimizers based on Calcite,our 
> optimizer is also based on Calcite.
> Calcite has a lot of good rules in CoreRules.It has UnionToDistinctRule and 
> IntersectToDistinctRule RelRule ,UnionToDistinctRule is that converts 
> Union(all = false) to Union(all=true) + Aggregate,IntersectToDistinctRule is 
> that converts Intersect(all=false) to Union(all=true) + Aggregate + 
> Filter.None of these rules translate Minus to other RelNode combinations.
> Normally, a computation engine does not have a Minus operator, so it is 
> common to convert Minus to some other relational algebra combination in the 
> optimizer.For example,in Presto,it has the ImplementIntersectAndExceptAsUnion



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to