yiguolei commented on code in PR #2687:
URL: https://github.com/apache/doris-website/pull/2687#discussion_r2247144019


##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/approx-count-distinct.md:
##########
@@ -30,13 +30,63 @@ APPROX_COUNT_DISTINCT(<expr>)
 ## 举例
 
 ```sql
-select approx_count_distinct(query_id) from log_statis group by datetime;
+-- setup
+create table t1(
+        k1 int,
+        k2 varchar(100)
+) distributed by hash (k1) buckets 1
+properties ("replication_num"="1");
+insert into t1 values 
+    (1, 'apple'),
+    (1, 'banana'),
+    (1, 'apple'),
+    (2, 'orange'),
+    (2, 'orange'),
+    (2, 'grape'),
+    (3, 'cherry'),
+    (3, null);
 ```
 
+```sql
+select approx_count_distinct(k2) from t1;
+```

Review Comment:
   如果这个列的值都是null,我们是返回0 还是 1 还是null? 把这些补充到测试case里



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to