Skip to content

Commit dbfa34c

Browse files
committed
adjust logic tests
1 parent aaf51e9 commit dbfa34c

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

scripts/ci/deploy/config/databend-query-node-1.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ join_spilling_memory_ratio = 60
7373
[log]
7474

7575
[log.file]
76-
level = "INFO"
76+
level = "DEBUG"
7777
format = "text"
7878
dir = "./.databend/logs_1"
7979
prefix_filter = ""

src/query/service/src/pipelines/builders/merge_into_join_optimizations.rs

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ impl PipelineBuilder {
2525
PhysicalPlan::TableScan(scan) => match scan.table_index {
2626
None | Some(databend_common_sql::DUMMY_TABLE_INDEX) => (false, false),
2727
Some(table_index) => match need_reserve_block_info(self.ctx.clone(), table_index) {
28+
// due to issue https://github.com/datafuselabs/databend/issues/15643,
29+
// target build optimization of merge-into is disabled
30+
2831
//(true, is_distributed) => (true, is_distributed),
2932
(true, is_distributed) => (false, is_distributed),
3033
_ => (false, false),

src/query/sql/src/planner/optimizer/optimizer.rs

+4
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,10 @@ async fn optimize_merge_into(opt_ctx: OptimizerContext, plan: Box<MergeInto>) ->
494494
== 0
495495
&& flag
496496
{
497+
// due to issue https://github.com/datafuselabs/databend/issues/15643,
498+
// target build optimization of merge-into is disabled: here row_id column should be kept
499+
500+
// new_columns_set.remove(&plan.row_id_index);
497501
opt_ctx.table_ctx.set_merge_into_join(MergeIntoJoin {
498502
merge_into_join_type: MergeIntoJoinType::Left,
499503
is_distributed: false,

tests/sqllogictests/suites/mode/standalone/explain/09_0039_target_build_merge_into_standalone.test

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ explain merge into target_build_optimization as t1 using source_optimization as
6060
MergeInto:
6161
target_table: default.default.target_build_optimization
6262
├── distributed: false
63-
├── target_build_optimization: true
63+
├── target_build_optimization: false
6464
├── can_try_update_column_only: true
6565
├── matched update: [condition: None,update set a = t2.a (#0),b = t2.b (#1),c = t2.c (#2)]
6666
└── unmatched insert: [condition: None,insert into (a,b,c) values(CAST(a (#0) AS Int32 NULL),CAST(b (#1) AS String NULL),CAST(c (#2) AS String NULL))]
@@ -135,7 +135,7 @@ explain merge into target_build_optimization as t1 using source_optimization as
135135
MergeInto:
136136
target_table: default.default.target_build_optimization
137137
├── distributed: false
138-
├── target_build_optimization: true
138+
├── target_build_optimization: false
139139
├── can_try_update_column_only: true
140140
├── matched update: [condition: None,update set a = t2.a (#0),b = t2.b (#1),c = t2.c (#2)]
141141
└── unmatched insert: [condition: None,insert into (a,b,c) values(CAST(a (#0) AS Int32 NULL),CAST(b (#1) AS String NULL),CAST(c (#2) AS String NULL))]

tests/sqllogictests/suites/mode/standalone/explain/merge_into.test

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ on t1.a = t2.a when matched then update set t1.b = t2.b when not matched then in
174174
MergeInto:
175175
target_table: default.default.column_only_optimization_target
176176
├── distributed: false
177-
├── target_build_optimization: true
177+
├── target_build_optimization: false
178178
├── can_try_update_column_only: true
179179
├── matched update: [condition: None,update set b = t2.b (#1)]
180180
└── unmatched insert: [condition: None,insert into (a,b) values(CAST(a (#0) AS Int32 NULL),CAST(b (#1) AS String NULL))]
@@ -211,7 +211,7 @@ on t1.a = t2.a when matched then update * when not matched then insert *;
211211
MergeInto:
212212
target_table: default.default.column_only_optimization_target
213213
├── distributed: false
214-
├── target_build_optimization: true
214+
├── target_build_optimization: false
215215
├── can_try_update_column_only: true
216216
├── matched update: [condition: None,update set a = a (#0),b = b (#1)]
217217
└── unmatched insert: [condition: None,insert into (a,b) values(CAST(a (#0) AS Int32 NULL),CAST(b (#1) AS String NULL))]

0 commit comments

Comments
 (0)