refactor(mark join): no need to init_markers in RightMark.
@@ -540,11 +540,13 @@ impl HashJoinState for JoinHashTable {
for chunk_index in 0..chunks.len() {
let chunk = &mut chunks[chunk_index];
let mut columns = Vec::with_capacity(chunk.cols.len());
- let markers = if matches!(
- self.hash_join_desc.join_type,
- JoinType::LeftMark | JoinType::RightMark
- ) {
- if self.hash_join_desc.join_type == JoinType::RightMark && !has_null {
+ let markers = match self.hash_join_desc.join_type {
+ JoinType::LeftMark => Self::init_markers(&chunk.cols, chunk.num_rows())
+ .iter()
+ .map(|x| Some(*x))
+ .collect(),
+ JoinType::RightMark => {
+ if !has_null {
if let Some(validity) = chunk.cols[0].validity().1 {
if validity.unset_bits() > 0 {
has_null = true;
@@ -554,12 +556,11 @@ impl HashJoinState for JoinHashTable {
}
}
}
- Self::init_markers(&chunk.cols, chunk.num_rows())
- .iter()
- .map(|x| Some(*x))
- .collect()
- } else {
vec![None; chunk.num_rows()]
+ }
+ _ => {
+ vec![None; chunk.num_rows()]
+ }
};
for col in chunk.cols.iter() {
columns.push(col);
