Skip to content

feat: add python and java binding for aggregate#5951

Merged
jackye1995 merged 2 commits intolance-format:mainfrom
jackye1995:aggregate-bindings
Feb 13, 2026
Merged

feat: add python and java binding for aggregate#5951
jackye1995 merged 2 commits intolance-format:mainfrom
jackye1995:aggregate-bindings

Conversation

@jackye1995
Copy link
Copy Markdown
Contributor

Follow up after #5911

@github-actions github-actions Bot added enhancement New feature or request python java labels Feb 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Code Review Summary

This PR adds Python and Java bindings for the aggregate functionality introduced in #5911. The implementation follows the existing patterns established for similar features (e.g., substrait_filter).

No Critical Issues Found

The code is straightforward and follows existing patterns well:

  • Java: Adds substrait_aggregate parameter through the JNI layer using AggregateExpr::substrait()
  • Python: Adds substrait_aggregate builder method and passes it to the Rust scanner

Minor Observations (Not Blocking)

  1. Test Coverage: The PR adds no tests for the new bindings. However, since:

    • The core Rust functionality is thoroughly tested in feat: support aggregate in scanner #5911
    • The bindings are thin wrappers that follow the exact same pattern as substrait_filter (which also lacks binding-level tests)
    • This is consistent with the project's existing testing approach for such bindings

    This is acceptable for a follow-up binding PR.

  2. Type stub completeness: The __init__.pyi file also adds stubs for other missing parameters (scan_stats_callback, strict_batch_size, order_by, disable_scoring_autoprojection) which is a nice cleanup beyond just the aggregate feature.

LGTM 👍

@jackye1995 jackye1995 merged commit 86e5967 into lance-format:main Feb 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants