SubhamSinghal commented on code in PR #24956:
URL: https://github.com/apache/datafusion/pull/24956#discussion_r3943078005
##########
datafusion/physical-plan/src/joins/piecewise_merge_join/classic_join.rs:
##########
@@ -336,6 +340,7 @@ impl ClassicPWMJStream {
let buffered_data =
Arc::clone(&self.buffered_side.try_as_ready()?.buffered_data);
let buffered_batch = buffered_data.batch();
+ let join_timer = self.join_metrics.join_time.timer();
Review Comment:
Addressed in a0ba9a7897a11f178e009921a5fbb101492ab061
##########
datafusion/physical-plan/src/joins/piecewise_merge_join/existence_join.rs:
##########
@@ -241,12 +241,19 @@ impl ExistencePWMJStream {
self.join_metrics.input_batches.add(1);
self.join_metrics.input_rows.add(batch.num_rows());
- // Only the batch's extreme key is ever compared against the
buffered side,
- // so reduce the batch to that one key.
- let stream_values =
- extreme_key(&stream_values, self.sort_option.descending)?;
-
- self.mark_matched_buffered_rows(&stream_values)?;
+ // An empty batch has no extreme key to compare, so it can
neither match
+ // nor miss -- counting it either way would understate the
real hit rate.
+ if batch.num_rows() > 0 {
+ let join_time = self.join_metrics.join_time.clone();
+ let join_timer = join_time.timer();
Review Comment:
Addressed in
https://github.com/apache/datafusion/commit/a0ba9a7897a11f178e009921a5fbb101492ab061
##########
datafusion/physical-plan/src/joins/piecewise_merge_join/classic_join.rs:
##########
@@ -294,6 +295,7 @@ impl ClassicPWMJStream {
}
// Produce more work
+ let join_timer = self.join_metrics.join_time.timer();
Review Comment:
Addressed in
https://github.com/apache/datafusion/commit/a0ba9a7897a11f178e009921a5fbb101492ab061
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]