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

Pengcheng Xiong updated CALCITE-1447:
-------------------------------------
    Description: 
Interesect distinct will be rewritten as 
{code}
Rewrite: (GB-Union All-GB)-GB-UDTF (on all attributes) 
    Example: R1 Intersect All R2
    R3 = GB(R1 on all attributes + count() as c) union all GB(R2 on all 
attributes + count() as c)
    R4 = GB(R3 on all attributes + count(c) as cnt)
    R5 = Fil ( cnt == #branch )
    R6 = Proj(R5 on all attributes)
{code}

> Support INTERSECT DISTINCT
> --------------------------
>
>                 Key: CALCITE-1447
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1447
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Pengcheng Xiong
>            Assignee: Pengcheng Xiong
>
> Interesect distinct will be rewritten as 
> {code}
> Rewrite: (GB-Union All-GB)-GB-UDTF (on all attributes) 
>     Example: R1 Intersect All R2
>     R3 = GB(R1 on all attributes + count() as c) union all GB(R2 on all 
> attributes + count() as c)
>     R4 = GB(R3 on all attributes + count(c) as cnt)
>     R5 = Fil ( cnt == #branch )
>     R6 = Proj(R5 on all attributes)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to