Skip to content

Commit

Permalink
feat(json): fix hidden column make by json (#715)
Browse files Browse the repository at this point in the history
Signed-off-by: YangKeao <[email protected]>
  • Loading branch information
YangKeao authored Mar 29, 2023
1 parent 9f51ed0 commit beb8d92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sync_diff_inspector/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit beb8d92

Please sign in to comment.