[
https://issues.apache.org/jira/browse/CALCITE-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17942342#comment-17942342
]
Yu Xu commented on CALCITE-6943:
--------------------------------
[~julianhyde] Thanks for your guidance!Had changed summary to "Calcite JDBC
adapter for Hive should translate APPROX_COUNT_DISTINCT to COUNT DISTINCT".
> Calcite JDBC adapter for Hive should translate APPROX_COUNT_DISTINCT to COUNT
> DISTINCT
> --------------------------------------------------------------------------------------
>
> Key: CALCITE-6943
> URL: https://issues.apache.org/jira/browse/CALCITE-6943
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.39.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.40.0
>
>
> Hive had not supported approx_count_distinct or apporx_count function yet, so
> we should keep the default way convert approx_count_distinct to count
> distinct.
>
> *test from Hive 1.x to Hive 4.x in beeline:*
> select approx_count_distinct(agg) from test.db01;
> *>FAILED: SemanticException [Error 10011]: Invalid function
> approx_count_distinct*
>
> select approx_distinct(agg) from test.db01;
> *>FAILED: SemanticException [Error 10011]: Invalid function approx_distinct*
>
> we can refer to:
> [https://hive.apache.org/docs/latest/hive-udfs_282102277/#mathematical-functions]
> currently not support such function.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)