From f72af7b32ba3fc6a5250635c9f6f98a7236542cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=9C=88?= <1759519137@qq.com> Date: Fri, 9 Oct 2026 17:30:36 +0800 Subject: [PATCH] fix: access ColumnSchema fields directly and use plain format args ColumnSchema exposes name and data_type as public fields, not methods, and the telemetry macros only accept a format string after the error. Signed-off-by: fengyue-xve <1759519137@qq.com> --- .../src/ddl/alter_table/partition_compat.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/common/meta/src/ddl/alter_table/partition_compat.rs b/src/common/meta/src/ddl/alter_table/partition_compat.rs index 96e5fb243de..b1608387206 100644 --- a/src/common/meta/src/ddl/alter_table/partition_compat.rs +++ b/src/common/meta/src/ddl/alter_table/partition_compat.rs @@ -97,14 +97,11 @@ pub(crate) fn changed_column_types( ) -> HashMap { let mut changed = HashMap::new(); for new_column in new_schema.column_schemas() { - let Some(old_column) = old_schema.column_schema_by_name(new_column.name()) else { + let Some(old_column) = old_schema.column_schema_by_name(&new_column.name) else { continue; }; - if old_column.data_type() != new_column.data_type() { - changed.insert( - new_column.name().to_string(), - new_column.data_type().clone(), - ); + if old_column.data_type != new_column.data_type { + changed.insert(new_column.name.clone(), new_column.data_type.clone()); } } @@ -215,10 +212,11 @@ fn validate_comparison( if let Err(error) = scalar.cast_to(&target_arrow_type) { warn!( error; - "Persisted partition bound is not representable with the altered column type"; - "region_id" => %region_id, - "column" => column, - "target_type" => target_type.to_string(), + "Persisted partition bound is not representable with the altered column type, \ + region_id: {}, column: '{}', target_type: {}", + region_id, + column, + target_type ); return PartitionExprIncompatibleSnafu { region_id,