code: func getRowData(columns []*tipb.ColumnInfo, colIDs map[int64]int, handle int64, value []byte) ([][]byte, error) {
  	values, err := tablecodec.CutRowNew(value, colIDs)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	if values == nil {
  		values = make([][]byte, len(colIDs))
  	}
  	// Fill the handle and null columns.
  	for _, col := range columns {
  		id := col.GetColumnId()
  		offset := colIDs[id]
  		if col.GetPkHandle() || id == model.ExtraHandleID {
  			var handleDatum types.Datum
  			if mysql.HasUnsignedFlag(uint(col.GetFlag())) {
  				// PK column is Unsigned.
  				handleDatum = types.NewUintDatum(uint64(handle))
  			} else {
  				handleDatum = types.NewIntDatum(handle)
  			}
  			handleData, err1 := codec.EncodeValue(nil, nil, handleDatum)
  			if err1 != nil {
  				return nil, errors.Trace(err1)
  			}
  			values[offset] = handleData
  			continue
  		}
  		if hasColVal(values, colIDs, id) {
  			continue
  		}
  		if len(col.DefaultVal) > 0 {
  			values[offset] = col.DefaultVal
  			continue
  		}
  		if mysql.HasNotNullFlag(uint(col.GetFlag())) {
  			return nil, errors.Errorf("Miss column %d", id)
  		}
  
  		values[offset] = []byte{codec.NilFlag}
  	}
  
  	return values, nil
  }
docs: // getRowData decodes raw byte slice to row data.