From 4df8d8ed8857ed2a2df4dbdc6275b074e638f847 Mon Sep 17 00:00:00 2001 From: xudong963 Date: Tue, 5 Jul 2022 16:40:22 +0800 Subject: [PATCH] add more annotation --- .../new/processors/transforms/hash_join/result_blocks.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/query/src/pipelines/new/processors/transforms/hash_join/result_blocks.rs b/query/src/pipelines/new/processors/transforms/hash_join/result_blocks.rs index af5cb2d95fca..45c472da43b8 100644 --- a/query/src/pipelines/new/processors/transforms/hash_join/result_blocks.rs +++ b/query/src/pipelines/new/processors/transforms/hash_join/result_blocks.rs @@ -131,8 +131,11 @@ impl JoinHashTable { } Mark => { let mut has_null = false; - // Check if there is any null in the probe block. - if let Some(validity) = input.column(0).validity().1 { + // `probe_column` is the subquery result column. + // For sql: select * from t1 where t1.a in (select t2.a from t2); t2.a is the `probe_column`, + let probe_column = input.column(0); + // Check if there is any null in the probe column. + if let Some(validity) = probe_column.validity().1 { if validity.null_count() > 0 { has_null = true; }