[
https://issues.apache.org/jira/browse/CALCITE-4997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiejiajun updated CALCITE-4997:
-------------------------------
Description:
{code:java}
SELECT APPROX_COUNT_DISTINCT(product_id)
FROM foodmart.product
{code}
will be
{code:java}
SELECT COUNT(DISTINCT product_id)
FROM foodmart.product
{code}
This can cause many tasks to run too slowly.
----
Some engines support this function, while others do not. So we can use the
parameter *SqlDialect#supportsApproxCountDistinct* to control whether to use
approx
was:
{code:java}
SELECT APPROX_COUNT_DISTINCT(product_id)
FROM foodmart.product
{code}
will be
{code:java}
SELECT COUNT(DISTINCT product_id)
FROM foodmart.product
{code}
This can cause many tasks to run too slowly.
----
Some engines support this function, while others do not. So,
> Keep APPROX_COUNT_DISTINCT in some SqlDialects
> ----------------------------------------------
>
> Key: CALCITE-4997
> URL: https://issues.apache.org/jira/browse/CALCITE-4997
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.29.0
> Reporter: xiejiajun
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> {code:java}
> SELECT APPROX_COUNT_DISTINCT(product_id)
> FROM foodmart.product
> {code}
> will be
> {code:java}
> SELECT COUNT(DISTINCT product_id)
> FROM foodmart.product
> {code}
> This can cause many tasks to run too slowly.
> ----
> Some engines support this function, while others do not. So we can use the
> parameter *SqlDialect#supportsApproxCountDistinct* to control whether to use
> approx
--
This message was sent by Atlassian Jira
(v8.20.1#820001)