fix: Track metrics in hash joins with empty build sides#20810
Merged
2010YOUY01 merged 2 commits intoapache:mainfrom Mar 13, 2026
Merged
fix: Track metrics in hash joins with empty build sides#208102010YOUY01 merged 2 commits intoapache:mainfrom
2010YOUY01 merged 2 commits intoapache:mainfrom
Conversation
jonathanc-n
approved these changes
Mar 8, 2026
| self.state = HashJoinStreamState::FetchProbeBatch; | ||
|
|
||
| return Ok(StatefulStreamResult::Ready(Some(result))); | ||
| return Ok(StatefulStreamResult::Continue); |
Contributor
There was a problem hiding this comment.
I think we can slowly transition everything to slowly not need to variants of StatefulStreamResult, maybe an issue can be raised for this. It goes hand in hand with using the limited batch coalescer
Contributor
There was a problem hiding this comment.
@Dandandan We can replicate the pattern you added with LimitedBatchCoalescer and updating metrics in poll_next_impl throughout the codebase
Contributor
|
cc @Dandandan for review |
2010YOUY01
approved these changes
Mar 11, 2026
| @@ -655,10 +655,10 @@ impl HashJoinStream { | |||
| self.join_type, | |||
| )?; | |||
| timer.done(); | |||
Contributor
There was a problem hiding this comment.
Not related to this PR, but I noticed we don’t need to explicitly end the timer here since it’s an RAII variable. I’ll open a separate PR after this is merged.
Co-authored-by: Yongting You <2010youy01@gmail.com>
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.
Which issue does this PR close?
Rationale for this change
Show the correct metrics when executing hash joins.
What changes are included in this PR?
process_probe_batchnow stores the output batch inoutput_bufferinstead of returning it, since the metrics are only updated with batches stored there.Are these changes tested?
Yes.
Are there any user-facing changes?
No.