This is an automated email from the ASF dual-hosted git repository.
comphead 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 08f6e54074 Minor: Remove wrong comment on `Accumulator::evaluate` and
`Accumulator::state` (#12001)
08f6e54074 is described below
commit 08f6e54074ba3207fc68665675c33faaffc7282a
Author: 张林伟 <[email protected]>
AuthorDate: Fri Aug 16 23:32:34 2024 +0800
Minor: Remove wrong comment on `Accumulator::evaluate` and
`Accumulator::state` (#12001)
* Remove wrong comment
* Remove wrong comment on Accumulator::state
* Not call twice comment
* Adjust comment order
---
datafusion/expr-common/src/accumulator.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/datafusion/expr-common/src/accumulator.rs
b/datafusion/expr-common/src/accumulator.rs
index 262646d8ba..eac91c4f8e 100644
--- a/datafusion/expr-common/src/accumulator.rs
+++ b/datafusion/expr-common/src/accumulator.rs
@@ -64,8 +64,8 @@ pub trait Accumulator: Send + Sync + Debug {
/// For example, the `SUM` accumulator maintains a running sum,
/// and `evaluate` will produce that running sum as its output.
///
- /// After this call, the accumulator's internal state should be
- /// equivalent to when it was first created.
+ /// This function should not be called twice, otherwise it will
+ /// result in potentially non-deterministic behavior.
///
/// This function gets `&mut self` to allow for the accumulator to build
/// arrow compatible internal state that can be returned without copying
@@ -85,8 +85,8 @@ pub trait Accumulator: Send + Sync + Debug {
/// Returns the intermediate state of the accumulator, consuming the
/// intermediate state.
///
- /// After this call, the accumulator's internal state should be
- /// equivalent to when it was first created.
+ /// This function should not be called twice, otherwise it will
+ /// result in potentially non-deterministic behavior.
///
/// This function gets `&mut self` to allow for the accumulator to build
/// arrow compatible internal state that can be returned without copying
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]