From 6fc4d07c59b3fbf196fe8c26482f50858e45ae38 Mon Sep 17 00:00:00 2001 From: zhyass Date: Thu, 19 Dec 2024 00:53:21 +0800 Subject: [PATCH] fix test --- .../storages/fuse/src/operations/changes.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/query/storages/fuse/src/operations/changes.rs b/src/query/storages/fuse/src/operations/changes.rs index 6e5bb16328b55..45166df5ace07 100644 --- a/src/query/storages/fuse/src/operations/changes.rs +++ b/src/query/storages/fuse/src/operations/changes.rs @@ -154,13 +154,17 @@ impl FuseTable { } StreamMode::Standard => { let a_table_alias = format!("_change_insert${}", suffix); - let a_cols = cols.join(", "); - let d_table_alias = format!("_change_delete${}", suffix); - let (d_alias_vec, d_cols_vec): (Vec<_>, Vec<_>) = cols - .into_iter() - .map(|s| (format!("{s} as d_{s}"), format!("d_{s}"))) - .unzip(); + + let mut a_cols_vec = Vec::with_capacity(cols.len()); + let mut d_alias_vec = Vec::with_capacity(cols.len()); + let mut d_cols_vec = Vec::with_capacity(cols.len()); + for col in cols { + a_cols_vec.push(format!("`{col}`")); + d_alias_vec.push(format!("`{col}` as d_{col}")); + d_cols_vec.push(format!("d_{col}")); + } + let a_cols = a_cols_vec.join(", "); let d_cols_alias = d_alias_vec.join(", "); let d_cols = d_cols_vec.join(", ");