refactor: Extract sort-merge join filter logic into separate module#19614
Merged
viirya merged 1 commit intoapache:mainfrom Feb 21, 2026
Merged
refactor: Extract sort-merge join filter logic into separate module#19614viirya merged 1 commit intoapache:mainfrom
viirya merged 1 commit intoapache:mainfrom
Conversation
4d6f0dd to
348f56c
Compare
Member
Author
|
Thank you @comphead |
Refactored the sort-merge join implementation to improve code organization by extracting all filter-related logic into a dedicated filter.rs module. Changes: - Created new filter.rs module (~576 lines) containing: - Filter metadata tracking (FilterMetadata struct) - Deferred filtering decision logic (needs_deferred_filtering) - Filter mask correction for different join types (get_corrected_filter_mask) - Filter application with null-joined row handling (filter_record_batch_by_join_type) - Helper functions for filter column extraction and batch filtering - Updated stream.rs: - Removed ~450 lines of filter-specific code - Now delegates to filter module functions - Simplified main join logic to focus on stream processing - Updated tests.rs: - Updated imports to use new filter module - Changed test code to use FilterMetadata struct - All 47 sort-merge join tests passing The refactoring maintains all existing functionality with no behavior changes. Null-joined batch creation for outer joins with different column counts is handled correctly by: - Properly extracting and replacing columns based on join type and batch organization - Using RecordBatchOptions to bypass strict nullable field validation in outer joins 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
348f56c to
16c36e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored the sort-merge join implementation to improve code organization by extracting all filter-related logic into a dedicated filter.rs module.
Changes:
Created new filter.rs module (~576 lines) containing:
Updated stream.rs:
Updated tests.rs:
🤖 Generated with Claude Code
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?