Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add specialized group_by implementations for DuckDB and MongoDB #44

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cmungall
Copy link
Member

Summary

  • Implement specialized group_by methods for DuckDB and MongoDB backends to improve performance and capabilities
  • Add comprehensive tests to verify correct functionality across database implementations
  • Support advanced features like comparison operators, multi-field grouping, and field selection

Implementation details

  • DuckDB: Uses SQLAlchemy for SQL query construction with proper handling of complex where clauses
  • MongoDB: Uses MongoDB's native aggregation pipeline with $group and $push operations
  • Both implementations maintain compatibility with the base Collection interface

Test plan

  • Basic test verifies core grouping functionality works across all store implementations
  • Advanced test verifies specialized features like:
    • Single and multi-field grouping
    • Filtering with where clauses
    • Field selection through agg_map
    • MongoDB-specific query operators
    • Custom inlined field names

🤖 Generated with Claude Code

- Implement specialized group_by method for DuckDB using SQLAlchemy
- Implement specialized group_by method for MongoDB using aggregation pipeline
- Add comprehensive tests for both implementations
- Support filter conditions, field selection, and multi-field grouping
- Support MongoDB query operators and DuckDB SQL operators

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant