Skip to content

Check for Unsupported Aggregation with Distinct when useApproxCountDistinct is enabled#16770

Merged
asdf2014 merged 9 commits intoapache:masterfrom
sreemanamala:approx-count
Jul 24, 2024
Merged

Check for Unsupported Aggregation with Distinct when useApproxCountDistinct is enabled#16770
asdf2014 merged 9 commits intoapache:masterfrom
sreemanamala:approx-count

Conversation

@sreemanamala
Copy link
Copy Markdown
Contributor

Description

Checks and throws an actionable error in case we encounter any aggregator using distinct which does not support it as mentioned in this issue


Key changed/added classes in this PR
  • NativelySupportsDistinct
  • DruidSqlValidator
  • GroupByRules

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Comment thread sql/src/main/java/org/apache/druid/sql/calcite/rule/GroupByRules.java Outdated
Comment thread sql/src/test/java/org/apache/druid/sql/calcite/DrillWindowQueryTest.java Outdated
@asdf2014 asdf2014 merged commit 3f4d66c into apache:master Jul 24, 2024
@sreemanamala sreemanamala deleted the approx-count branch July 24, 2024 04:20
sreemanamala added a commit to sreemanamala/druid that referenced this pull request Aug 6, 2024
…stinct is enabled (apache#16770)

* init

* add NativelySupportsDistinct

* refactor

* javadoc

* refactor

* fix tests

* fix drill tests

* comments

* Update sql/src/test/java/org/apache/druid/sql/calcite/DrillWindowQueryTest.java

---------

Co-authored-by: Benedict Jin <asdf2014@apache.org>
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants