code: func NewRowDecoder(tbl table.Table, decodeColMap map[int64]Column) *RowDecoder {
  	colFieldMap := make(map[int64]*types.FieldType, len(decodeColMap))
  	haveGenCol := false
  	for id, col := range decodeColMap {
  		colFieldMap[id] = &col.Col.ColumnInfo.FieldType
  		if col.GenExpr != nil {
  			haveGenCol = true
  		}
  	}
  	if !haveGenCol {
  		return &RowDecoder{
  			colTypes: colFieldMap,
  		}
  	}
  
  	cols := tbl.Cols()
  	tps := make([]*types.FieldType, len(cols))
  	for _, col := range cols {
  		tps[col.Offset] = &col.FieldType
  	}
  	return &RowDecoder{
  		tbl:           tbl,
  		mutRow:        chunk.MutRowFromTypes(tps),
  		columns:       decodeColMap,
  		colTypes:      colFieldMap,
  		haveGenColumn: haveGenCol,
  		defaultVals:   make([]types.Datum, len(cols)),
  	}
  }
docs: // NewRowDecoder returns a new RowDecoder.