From e41d3554f64be2656b581e06a3bdb5ff0769e31c Mon Sep 17 00:00:00 2001 From: 3AceShowHand Date: Tue, 24 Nov 2026 12:44:47 +0800 Subject: [PATCH 1/3] codec: align canal-json javaType mapping with tiflow --- pkg/sink/codec/canal/helper.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/sink/codec/canal/helper.go b/pkg/sink/codec/canal/helper.go index 3ddf163971..7127252cda 100644 --- a/pkg/sink/codec/canal/helper.go +++ b/pkg/sink/codec/canal/helper.go @@ -85,6 +85,10 @@ func mysqlType2JavaType(t byte, isBinary bool) common.JavaSQLType { return common.JavaSQLTypeVARCHAR case mysql.TypeTiDBVectorFloat32: return common.JavaSQLTypeVARCHAR + case mysql.TypeNull: + return common.JavaSQLTypeNULL + case mysql.TypeGeometry: + return common.JavaSQLTypeBINARY default: } return common.JavaSQLTypeVARCHAR From fa75036993ff23b0564f6d975d57bcae4519df50 Mon Sep 17 00:00:00 2001 From: 3AceShowHand Date: Tue, 24 Nov 2026 16:25:27 +0800 Subject: [PATCH 2/3] test: track FieldType subtype in shared schema guard --- pkg/common/table_info_shared_schema_guard_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/common/table_info_shared_schema_guard_test.go b/pkg/common/table_info_shared_schema_guard_test.go index 15cb20fd64..a0326def54 100644 --- a/pkg/common/table_info_shared_schema_guard_test.go +++ b/pkg/common/table_info_shared_schema_guard_test.go @@ -122,7 +122,8 @@ func TestLatestTiDBTableInfoSharedSchemaGuard(t *testing.T) { modulePath: "github.com/pingcap/tidb/pkg/parser", pkgRelativePath: "types", typeName: "FieldType", - expectedFields: []string{"tp", "flag", "flen", "decimal", "charset", "collate", "elems", "elemsIsBinaryLit", "array"}, + // subtype is the geometry subtype and is persisted in the field type JSON. + expectedFields: []string{"tp", "flag", "flen", "decimal", "charset", "collate", "elems", "elemsIsBinaryLit", "array", "subtype"}, }, } From 13fe69b59dbd3e06fc32f7e4f36f51a7bd6df601 Mon Sep 17 00:00:00 2001 From: 3AceShowHand Date: Tue, 24 Nov 2026 19:45:01 +0800 Subject: [PATCH 3/3] remove one comment and trigger ci --- pkg/common/table_info_shared_schema_guard_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/common/table_info_shared_schema_guard_test.go b/pkg/common/table_info_shared_schema_guard_test.go index a0326def54..b3dc23a47f 100644 --- a/pkg/common/table_info_shared_schema_guard_test.go +++ b/pkg/common/table_info_shared_schema_guard_test.go @@ -122,8 +122,7 @@ func TestLatestTiDBTableInfoSharedSchemaGuard(t *testing.T) { modulePath: "github.com/pingcap/tidb/pkg/parser", pkgRelativePath: "types", typeName: "FieldType", - // subtype is the geometry subtype and is persisted in the field type JSON. - expectedFields: []string{"tp", "flag", "flen", "decimal", "charset", "collate", "elems", "elemsIsBinaryLit", "array", "subtype"}, + expectedFields: []string{"tp", "flag", "flen", "decimal", "charset", "collate", "elems", "elemsIsBinaryLit", "array", "subtype"}, }, }