Skip to content

add unique transformation - #5

Merged
Edwardvaneechoud merged 2 commits into
mainfrom
feature/add-unique
Jun 13, 2026
Merged

add unique transformation#5
Edwardvaneechoud merged 2 commits into
mainfrom
feature/add-unique

Conversation

@Edwardvaneechoud

Copy link
Copy Markdown
Owner

This pull request adds a new deduplication feature to the LazyFrame API, allowing users to efficiently remove duplicate rows from data frames. It introduces both hash-based and streaming deduplication methods, supports deduplication on a subset of columns or entire rows, and ensures correct integration with the query optimizer and column pruning logic. Comprehensive tests and documentation are included to demonstrate and validate the new functionality.

Deduplication Feature:

  • Added a new unique method to LazyFrame and TypedLazyFrame, supporting deduplication on specified columns or entire rows, with an optional sorted parameter for optimized streaming deduplication when input is pre-sorted. [1] [2]
  • Implemented two new plan nodes, UniqueNode (hash-based deduplication) and SortedUniqueNode (streaming deduplication for sorted input), with appropriate logic for execution, schema propagation, and plan explanation.

Query Optimization and Column Pruning:

  • Updated the optimizer to correctly handle deduplication nodes, ensuring filter pushdown and column pruning work as expected with the new deduplication operations. [1] [2]

Documentation and Testing:

  • Added a new "Deduplicating" section to the documentation (docs/operations.md) with usage examples for the new unique method.
  • Added comprehensive tests for deduplication, including subset deduplication, full-row deduplication, multi-column deduplication, sorted vs hash deduplication, error handling, filter pushdown, and column pruning.

@Edwardvaneechoud
Edwardvaneechoud merged commit 72f73df into main Jun 13, 2026
4 checks passed
@Edwardvaneechoud
Edwardvaneechoud deleted the feature/add-unique branch June 13, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant