You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Andrew Tsvelodub (JIRA)" <ji...@apache.org> on 2019/01/20 15:12:00 UTC

[jira] [Updated] (CALCITE-2790) AggregateJoinTransposeRule incorrectly pushes down distinct count into join

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

Andrew Tsvelodub updated CALCITE-2790:
--------------------------------------
    Description: 
AggregateJoinTransposeRule.EXTENDED can push down aggregate functions into the join.

For Distinct Count (and other distinct aggregate functions) this should not be performed the same way as for simple count, since distinct count is not a decomposable function. [1]

While this can be done in theory, by adding the distinct column to the list of groups in below aggregate[2], I want to fix the buggy behavior first, before trying to improve the existing rule.

[1] Dynamic Programming: The Next Step, M. Eich, G. Moerkotte ([https://ub-madoc.bib.uni-mannheim.de/37228/1/main.pdf])
[2] Including Group-By in Query Optimization, S. Chaudhuri, K. Shim ([https://pdfs.semanticscholar.org/3079/5447cec18753254edbbd7839f0afa58b2a39.pdf])

  was:
AggregateJoinTransposeRule.EXTENDED can push down aggregate functions into the join.

For Distinct Count (and other distinct aggregate functions) this should not be performed the same way as for simple count, since distinct count is not a decomposable function. [1]

While this can be done in theory, by adding the distinct column to the list of groups in below aggregate[2], I want to fix the buggy behavior first, before trying to improve the existing rule.

[1] Dynamic Programming: The Next Step, M. Eich, G. Moerkotte ([https://ub-madoc.bib.uni-mannheim.de/37228/1/main.pdf)]
[2] Including Group-By in Query Optimization, S. Chaudhuri, K. Shim ([https://pdfs.semanticscholar.org/3079/5447cec18753254edbbd7839f0afa58b2a39.pdf)]


> AggregateJoinTransposeRule incorrectly pushes down distinct count into join
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-2790
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2790
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.18.0
>            Reporter: Andrew Tsvelodub
>            Assignee: Julian Hyde
>            Priority: Major
>
> AggregateJoinTransposeRule.EXTENDED can push down aggregate functions into the join.
> For Distinct Count (and other distinct aggregate functions) this should not be performed the same way as for simple count, since distinct count is not a decomposable function. [1]
> While this can be done in theory, by adding the distinct column to the list of groups in below aggregate[2], I want to fix the buggy behavior first, before trying to improve the existing rule.
> [1] Dynamic Programming: The Next Step, M. Eich, G. Moerkotte ([https://ub-madoc.bib.uni-mannheim.de/37228/1/main.pdf])
> [2] Including Group-By in Query Optimization, S. Chaudhuri, K. Shim ([https://pdfs.semanticscholar.org/3079/5447cec18753254edbbd7839f0afa58b2a39.pdf])



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)