diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs index b2074b35ed82..11e9e4bac56a 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/probe_join/left_join.rs @@ -403,7 +403,7 @@ impl HashJoinProbeState { let new_matched_count = old_mactehd_counts + 1; if old_mactehd_counts > 0 { return Err(ErrorCode::UnresolvableConflict( - "multi rows from source match one and the same row in the target_table multi times", + "multi rows from source match one and the same row in the target_table multi times in probe phase", )); } loop { diff --git a/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs b/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs index d694f01222d8..dbb33b1ec91b 100644 --- a/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs +++ b/src/query/service/src/pipelines/processors/transforms/hash_join/transform_hash_join_probe.rs @@ -133,6 +133,10 @@ impl TransformHashJoinProbe { if item.0.is_empty() { let prefix = item.1; let (segment_idx, block_idx) = split_prefix(prefix); + info!( + "matched whole block: segment_idx: {}, block_idx: {}", + segment_idx, block_idx + ); let data_block = DataBlock::empty_with_meta(Box::new(BlockMetaIndex { segment_idx: segment_idx as usize, block_idx: block_idx as usize, @@ -156,6 +160,10 @@ impl TransformHashJoinProbe { )?; assert!(!data_block.is_empty()); let (segment_idx, block_idx) = split_prefix(prefix); + info!( + "matched partial block: segment_idx: {}, block_idx: {}", + segment_idx, block_idx + ); let data_block = data_block.add_meta(Some(Box::new(BlockMetaIndex { segment_idx: segment_idx as usize, block_idx: block_idx as usize, diff --git a/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs b/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs index df4eaa9443f9..d9b3b63b737f 100644 --- a/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs +++ b/src/query/storages/fuse/src/operations/merge_into/mutator/matched_mutator.rs @@ -144,6 +144,10 @@ impl MatchedAggregator { .meta_indexes .insert((meta_index.segment_idx, meta_index.block_idx)) { + info!( + "duplicated block: segment_idx: {}, block_idx: {}", + meta_index.segment_idx, meta_index.block_idx + ); return Err(ErrorCode::Internal( "merge into get duplicated block for target build unmodified optimization", )); diff --git a/tests/sqllogictests/suites/mode/standalone/explain/09_0039_target_build_merge_into_standalone.test b/tests/sqllogictests/suites/mode/standalone/explain/09_0039_target_build_merge_into_standalone.test index b31b20b9083a..e9cdadf2b9a9 100644 --- a/tests/sqllogictests/suites/mode/standalone/explain/09_0039_target_build_merge_into_standalone.test +++ b/tests/sqllogictests/suites/mode/standalone/explain/09_0039_target_build_merge_into_standalone.test @@ -286,7 +286,7 @@ target_table: default.default.target_build_optimization query TT merge into target_build_optimization as t1 using source_optimization as t2 on t1.a > t2.a and t1.b = t2.b when matched then update * when not matched then insert *; ---- -12 0 +10 0 query TTT select * from target_build_optimization order by a,b,c;