Weijun-H commented on code in PR #15200:
URL: https://github.com/apache/datafusion/pull/15200#discussion_r1993680911


##########
datafusion/functions-aggregate/src/approx_distinct.rs:
##########
@@ -126,6 +126,28 @@ where
     }
 }
 
+#[derive(Debug)]
+struct StringViewHLLAccumulator<T>
+where
+    T: OffsetSizeTrait,
+{
+    hll: HyperLogLog<String>,
+    phantom_data: PhantomData<T>,
+}
+
+impl<T> StringViewHLLAccumulator<T>
+where
+    T: OffsetSizeTrait,
+{
+    /// new approx_distinct accumulator

Review Comment:
   I understand you follow the previous pattern, but the comment seems unclear 
vague
   ```suggestion
   ```



##########
datafusion/sqllogictest/test_files/aggregate_skip_partial.slt:
##########
@@ -298,6 +298,27 @@ SELECT c2, approx_distinct(c1), approx_distinct(c5) FROM 
aggregate_test_100 GROU
 4 5 23
 5 5 14
 
+# Test approx_distinct for varchar(with Utf8View) / int
+statement ok
+CREATE TABLE aggregate_test_100_utf8view AS SELECT
+      arrow_cast(c1, 'Utf8View') as c1,
+      c2,
+      c5
+FROM aggregate_test_100;
+
+# Test approx_distinct for varchar / int

Review Comment:
   ```suggestion
   # Test approx_distinct for varchar(with Utf8View) / int
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to