From beb8d927e9f20d6cf6b7287733316759785252b1 Mon Sep 17 00:00:00 2001 From: YangKeao Date: Wed, 29 Mar 2023 04:16:56 -0400 Subject: [PATCH] feat(json): fix hidden column make by json (#715) Signed-off-by: YangKeao --- sync_diff_inspector/utils/utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sync_diff_inspector/utils/utils.go b/sync_diff_inspector/utils/utils.go index 5f503173..fe96f296 100644 --- a/sync_diff_inspector/utils/utils.go +++ b/sync_diff_inspector/utils/utils.go @@ -757,7 +757,11 @@ func GetCountAndCRC32Checksum(ctx context.Context, db *sql.DB, schemaName, table */ columnNames := make([]string, 0, len(tbInfo.Columns)) columnIsNull := make([]string, 0, len(tbInfo.Columns)) + log.Debug("table columns", zap.Any("columns", tbInfo.Columns)) for _, col := range tbInfo.Columns { + if col.Hidden { + continue + } name := dbutil.ColumnName(col.Name.O) // When col value is 0, the result is NULL. // But we can use ISNULL to distinguish between null and 0.