code: func (b *batchChecker) encodeNewRow(ctx sessionctx.Context, t table.Table, row []types.Datum) ([]byte, error) {
  	colIDs := make([]int64, 0, len(row))
  	skimmedRow := make([]types.Datum, 0, len(row))
  	for _, col := range t.Cols() {
  		if !tables.CanSkip(t.Meta(), col, row[col.Offset]) {
  			colIDs = append(colIDs, col.ID)
  			skimmedRow = append(skimmedRow, row[col.Offset])
  		}
  	}
  	newRowValue, err := tablecodec.EncodeRow(ctx.GetSessionVars().StmtCtx, skimmedRow, colIDs, nil, nil)
  	if err != nil {
  		return nil, err
  	}
  	return newRowValue, nil
  }
docs: // encodeNewRow encodes a new row to value.