Remove `GroupsAccumulator::supports_convert_to_state` and require `convert_to_state` (#23489)

## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->

- Closes #23081.

## Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->

Following #23275, all `GroupsAccumulator` implementations now provide
`convert_to_state`.

The `supports_convert_to_state` capability flag is therefore no longer
needed.

## What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

- Make `GroupsAccumulator::convert_to_state` a required trait method.
- Remove `GroupsAccumulator::supports_convert_to_state` and its
implementations.
- Remove the corresponding capability checks from hash aggregation.
- Simplify skip-partial aggregation to use the required
`convert_to_state` implementation directly.
- Add a regression test covering the partial hash aggregation skip path.
- Document the breaking trait change in the 55.0.0 upgrading guide.

- Remove `FFI_GroupsAccumulator::supports_convert_to_state`. This
changes the FFI ABI layout, so providers and consumers must be rebuilt
against DataFusion 55.

## Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

Yes. Added a regression test verifying that skip-partial aggregation
uses the required `convert_to_state` implementation without a capability
flag.

Existing physical-plan and FFI tests continue to pass.

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->

<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->

Yes. This is a breaking Rust API change for external `GroupsAccumulator`
implementations:

- `convert_to_state` must now be implemented.
- `supports_convert_to_state` should be removed.

The migration is documented in the 55.0.0 upgrading guide.

The `FFI_GroupsAccumulator` layout has changed. FFI providers and
consumers must be rebuilt against DataFusion 55 and must not exchange
this struct with older major versions.
28 files changed
tree: 0af124f3cd8162447c2dd85ced2699462c3541d8
  1. .ai/
  2. .devcontainer/
  3. .github/
  4. benchmarks/
  5. ci/
  6. datafusion/
  7. datafusion-cli/
  8. datafusion-examples/
  9. dev/
  10. docs/
  11. python/
  12. test-utils/
  13. .asf.yaml
  14. .dockerignore
  15. .editorconfig
  16. .gitattributes
  17. .gitignore
  18. .gitmodules
  19. AGENTS.md
  20. Cargo.lock
  21. Cargo.toml
  22. CHANGELOG.md
  23. clippy.toml
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. doap.rdf
  27. header
  28. LICENSE.txt
  29. licenserc.toml
  30. lychee.toml
  31. NOTICE.txt
  32. pre-commit.sh
  33. pyproject.toml
  34. README.md
  35. rust-toolchain.toml
  36. rustfmt.toml
  37. taplo.toml
  38. typos.toml
  39. uv.lock
README.md

Apache DataFusion

Crates.io Apache licensed Build Status Commit Activity Open Issues Pending PRs Discord chat Linkedin Crates.io MSRV

Website | API Docs | Chat

DataFusion is an extensible query engine written in Rust that uses Apache Arrow as its in-memory format.

This crate provides libraries and binaries for developers building fast and feature-rich database and analytic systems, customized for particular workloads. See use cases for examples. The following related subprojects target end users:

“Out of the box,” DataFusion offers SQL and DataFrame APIs, excellent performance, built-in support for CSV, Parquet, JSON, and Avro, extensive customization, and a great community.

DataFusion features a full query planner, a columnar, streaming, multi-threaded, vectorized execution engine, and partitioned data sources. You can customize DataFusion at almost all points including additional data sources, query languages, functions, custom operators and more. See the Architecture section for more details.

Here are links to important resources:

What can you do with this crate?

DataFusion is great for building projects such as domain-specific query engines, new database platforms and data pipelines, query languages and more. It lets you start quickly from a fully working engine, and then customize those features specific to your needs. See the list of known users.

Contributing to DataFusion

Please see the contributor guide and communication pages for more information.

We discuss our roadmap via GitHub issues and invite you to join the conversation. The current discussion is the DataFusion 2026 Q3-Q4 Roadmap Discussion.

Crate features

This crate has several features which can be specified in your Cargo.toml.

Default features:

  • nested_expressions: functions for working with nested types such as array_to_string
  • compression: reading files compressed with xz2, bzip2, flate2, and zstd
  • crypto_expressions: cryptographic functions such as md5 and sha256
  • datetime_expressions: date and time functions such as to_timestamp
  • encoding_expressions: encode and decode functions
  • parquet: support for reading the Apache Parquet format
  • sql: support for SQL parsing and planning
  • regex_expressions: regular expression functions, such as regexp_match
  • unicode_expressions: include Unicode-aware functions such as character_length
  • unparser: enables support to reverse LogicalPlans back into SQL
  • recursive_protection: uses recursive for stack overflow protection.

Optional features:

  • avro: support for reading the Apache Avro format
  • backtrace: include backtrace information in error messages
  • parquet_encryption: support for using Parquet Modular Encryption
  • serde: enable arrow-schema's serde feature

DataFusion API Evolution and Deprecation Guidelines

Public methods in Apache DataFusion evolve over time: while we try to maintain a stable API, we also improve the API over time. As a result, we typically deprecate methods before removing them, according to the deprecation guidelines.

Dependencies and Cargo.lock

Following the guidance on committing Cargo.lock files, this project commits its Cargo.lock file.

CI uses the committed Cargo.lock file, and dependencies are updated regularly using Dependabot PRs.