Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set supports_retract_batch to false for ApproxPercentileAccumulator #12132

Merged
merged 2 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions datafusion/functions-aggregate/src/approx_percentile_cont.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,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)]
Expand Down
5 changes: 5 additions & 0 deletions datafusion/sqllogictest/test_files/aggregate.slt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ SELECT approx_percentile_cont(c3, 0.95, 111.1) FROM aggregate_test_100
statement error DataFusion error: Error during planning: Error during planning: Coercion from \[Float64, Float64, Float64\] to the signature OneOf(.*) failed(.|\n)*
SELECT approx_percentile_cont(c12, 0.95, 111.1) 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)
Expand Down