[ 
https://issues.apache.org/jira/browse/CALCITE-1447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15596141#comment-15596141
 ] 

Julian Hyde edited comment on CALCITE-1447 at 10/21/16 7:45 PM:
----------------------------------------------------------------

* Please add necessary markup around javadoc so that it stays formatted when 
converted to html
* Remove the deprecated constructor - this is a new class
* Add a \@see  in {{UnionToDistinctRule}}
* Can you inline your calls to {{makeBigintLiteral}}. (We ought to have 
deprecated that method, but let's not start using it.) 
* I think you should change {{count(1)}} to {{count\(*)}}. It's the same 
(because 1 is not null) but doesn't entail a project. Then, I don't think the 
lower Aggregate calls need a count at all.
* Make {{relBuilder}} final. It's safe to re-use the RelBuilder.
* Sorry to be pedantic, but can you rename {{numBranches}} to {{inputCount}}? 
Consistent with terminology and naming elsewhere.
* Can you enable {{JdbcFrontLinqBackTest.testIntersect}}. With your changes, I 
think it should pass!


was (Author: julianhyde):
* Please add necessary markup around javadoc so that it stays formatted when 
converted to html
* Remove the deprecated constructor - this is a new class
* Add a \@see  in UnionToDistinctRule
* Can you inline your call to makeBigintLiteral. (We ought to have deprecated 
that method.) 
* I think you should change {{count(1)}} to {{count(*)}}. It's the same 
(because 1 is not null) but doesn't entail a project. Then, I don't think the 
lower Aggregate calls need a count at all.
* Make relBuilder final. You can re-use the same relBuilder.
* Sorry to be pedantic, but can you rename {{numBranches}} to {{inputCount}}? 
Consistent with terminology and naming elsewhere.
* Can you enable JdbcFrontLinqBackTest.testIntersect. With your changes, I 
think it should pass!

> 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
>         Attachments: CALCITE-1447.01.patch
>
>
> Interesect distinct will be rewritten as 
> {code}
> Rewrite: (GB-Union All-GB)-GB-FIL-Proj
>     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