actiontech/dtle

Error: gob: type types.MyDecimal ...

c0494133d4 opened this issue · 1 comments

create table ... (val decimal(10,2) DEFAULT 4.2)

目前利用gob序列化Table表结构.

Table.OriginalTableColumns.Columns[i].Default有类型interface{}, 可被赋值为各种tidb类型.

// tidb.types
func (d *Datum) GetValue() interface{} {

Only types that will be transferred as implementations of interface values need to be registered.

修复: 将赋予Default的值转换为基础类型. 则不需要 gob.Register()