Skip to content

Commit

Permalink
manual drop state
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesdevil committed Mar 22, 2023
1 parent 5dc4c8b commit 27bd972
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/query/functions/src/aggregates/aggregate_quantile_cont.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ where T: Number + AsPrimitive<f64>
let state = place.get::<QuantileState>();
state.merge_result(builder, self.levels.clone())
}

fn need_manual_drop_state(&self) -> bool {
true
}

unsafe fn drop_state(&self, place: StateAddr) {
let state = place.get::<QuantileState>();
std::ptr::drop_in_place(state);
}
}

impl<T> AggregateQuantileContFunction<T>
Expand Down

0 comments on commit 27bd972

Please sign in to comment.