Skip to content

Commit

Permalink
fix: set supports_retract_batch to false for `ApproxPercentileAccum…
Browse files Browse the repository at this point in the history
…ulator` (#12132)
  • Loading branch information
jonahgao authored Aug 24, 2024
1 parent 31adb08 commit 6f18304
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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 @@ -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)]
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 @@ -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)
Expand Down

0 comments on commit 6f18304

Please sign in to comment.