-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Proposal: Remove Accumulator::update
and Accumulator::merge
#1549
Comments
Can we change the default implementation of the accumulator trait to this?
|
+1 on this proposal. |
We could change the default implementation, however, I am not sure what purpose that would serve -- the code in datafusion that calls I was thinking of moving the current default implementation of |
It makes sense to me. |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
It is very non obvious that either one or the other of
Accumulator::update
orAccumulator::update_batch
are called. This results in unfortunate things like #1525 (implementation in terms ofScalarValue
) only then to be followed by #1546 (implementation in terms ofArray
)In addition,
update_batch
andmerge_batch
will always be the most performant, so they should always be what is implemented.The same issue applies to
Accumulator::merge
andAccumulator::merge_batch
I tried making this clearer in the docs via #1542
Describe the solution you'd like
I think a clearer thing to do would be to remove
update
andmerge
entirely from the traits and ensure the examples are clear to keep the barrier to entry as low as possible.Additional context
See additional context on #1547 (review)
The text was updated successfully, but these errors were encountered: