Skip to content

Commit

Permalink
Fix handling of JSON columns
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Nov 26, 2021
1 parent fc6c443 commit e8f735d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cdc/sink/codec/avro.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"github.com/pingcap/ticdc/pkg/util"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/types"
tijson "github.com/pingcap/tidb/types/json"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -476,7 +475,7 @@ func columnToAvroNativeData(col *model.Column, tz *time.Location) (interface{},
case mysql.TypeYear:
return col.Value.(int64), "long", nil
case mysql.TypeJSON:
return col.Value.(tijson.BinaryJSON).String(), "string", nil
return col.Value.(string), "string", nil
case mysql.TypeNewDecimal:
return col.Value.(string), "string", nil
case mysql.TypeEnum:
Expand Down

0 comments on commit e8f735d

Please sign in to comment.