This is an automated email from the ASF dual-hosted git repository.
jonah pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 6f183043e9 fix: set `supports_retract_batch` to false for
`ApproxPercentileAccumulator` (#12132)
6f183043e9 is described below
commit 6f183043e9c28a55311e187e9e78caad330976af
Author: Jonah Gao <[email protected]>
AuthorDate: Sat Aug 24 17:28:09 2024 +0800
fix: set `supports_retract_batch` to false for
`ApproxPercentileAccumulator` (#12132)
---
datafusion/functions-aggregate/src/approx_percentile_cont.rs | 4 ----
datafusion/sqllogictest/test_files/aggregate.slt | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/datafusion/functions-aggregate/src/approx_percentile_cont.rs
b/datafusion/functions-aggregate/src/approx_percentile_cont.rs
index e860783dbe..867dfed485 100644
--- a/datafusion/functions-aggregate/src/approx_percentile_cont.rs
+++ b/datafusion/functions-aggregate/src/approx_percentile_cont.rs
@@ -460,10 +460,6 @@ impl Accumulator for ApproxPercentileAccumulator {
+ self.return_type.size()
- std::mem::size_of_val(&self.return_type)
}
-
- fn supports_retract_batch(&self) -> bool {
- true
- }
}
#[cfg(test)]
diff --git a/datafusion/sqllogictest/test_files/aggregate.slt
b/datafusion/sqllogictest/test_files/aggregate.slt
index c3609e59f2..b826dd31f4 100644
--- a/datafusion/sqllogictest/test_files/aggregate.slt
+++ b/datafusion/sqllogictest/test_files/aggregate.slt
@@ -104,6 +104,11 @@ SELECT approx_percentile_cont(c12, c12) FROM
aggregate_test_100
statement error DataFusion error: This feature is not implemented: Tdigest
max_size value for 'APPROX_PERCENTILE_CONT' must be a literal
SELECT approx_percentile_cont(c12, 0.95, c5) FROM aggregate_test_100
+# Not supported over sliding windows
+query error This feature is not implemented: Aggregate can not be used as a
sliding accumulator because `retract_batch` is not implemented
+SELECT approx_percentile_cont(c3, 0.5) OVER (ROWS BETWEEN 4 PRECEDING AND
CURRENT ROW)
+FROM aggregate_test_100
+
# array agg can use order by
query ?
SELECT array_agg(c13 ORDER BY c13)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]