Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesCheung96 committed May 25, 2023
1 parent 6c5fe0b commit 34263ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cdc/entry/mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,7 @@ func getDefaultOrZeroValue(col *timodel.ColumnInfo) (types.Datum, any, int, stri
return d, v, size, warn, err
}

// GetDDLDefaultDefinition returns the default definition of a column.
func GetDDLDefaultDefinition(col *timodel.ColumnInfo) interface{} {
defaultValue := col.GetDefaultValue()
if defaultValue == nil {
Expand Down
2 changes: 1 addition & 1 deletion cdc/entry/mounter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ func TestGetDefaultZeroValue(t *testing.T) {
for _, tc := range testCases {
_, val, _, _, _ := getDefaultOrZeroValue(&tc.ColInfo)
require.Equal(t, tc.Res, val, tc.Name)
val = getDDLDefaultDefinition(&tc.ColInfo)
val = GetDDLDefaultDefinition(&tc.ColInfo)
require.Equal(t, tc.Default, val, tc.Name)
}
}
Expand Down

0 comments on commit 34263ac

Please sign in to comment.