From ff7d5e9332de2c46c22ada9897a3f5eefad10eb1 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 83408d9b26d4844e2b50af7c2393e8d5a3fe3e0d 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 6970ddf2c5..540fac96c7 100644 --- a/pkg/common/table_info_shared_schema_guard_test.go +++ b/pkg/common/table_info_shared_schema_guard_test.go @@ -125,7 +125,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 0c7fca0cb162b147466593750c6a9861108b7f54 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 540fac96c7..a9c8dd6772 100644 --- a/pkg/common/table_info_shared_schema_guard_test.go +++ b/pkg/common/table_info_shared_schema_guard_test.go @@ -125,8 +125,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"}, }, }