Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: xiongjiwei <[email protected]>
  • Loading branch information
xiongjiwei committed Jan 3, 2023
1 parent 4e40892 commit 6092c7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion executor/distsql.go
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ func (w *tableWorker) compareData(ctx context.Context, task *lookupTableTask, ta
col := w.idxTblCols[i]
idxVal := idxRow.GetDatum(i, w.idxColTps[i])
tablecodec.TruncateIndexValue(&idxVal, w.idxLookup.index.Columns[i], col.ColumnInfo)
cmpRes, err := tables.CompareIndexAndVal(sctx, vals[i], idxVal, collators[i], col.FieldType.IsArray())
cmpRes, err := tables.CompareIndexAndVal(sctx, vals[i], idxVal, collators[i], col.FieldType.IsArray() && vals[i].Kind() == types.KindMysqlJSON)
if err != nil {
return ir().ReportAdminCheckInconsistentWithColInfo(ctx,
handle,
Expand Down
4 changes: 3 additions & 1 deletion table/tables/mutation_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ func compareIndexData(
cols[indexInfo.Columns[i].Offset].ColumnInfo,
)

comparison, err := CompareIndexAndVal(sc, expectedDatum, decodedMutationDatum, collate.GetCollator(decodedMutationDatum.Collation()), cols[indexInfo.Columns[i].Offset].ColumnInfo.FieldType.IsArray())
comparison, err := CompareIndexAndVal(sc, expectedDatum, decodedMutationDatum,
collate.GetCollator(decodedMutationDatum.Collation()),
cols[indexInfo.Columns[i].Offset].ColumnInfo.FieldType.IsArray() && expectedDatum.Kind() == types.KindMysqlJSON)
if err != nil {
return errors.Trace(err)
}
Expand Down

0 comments on commit 6092c7b

Please sign in to comment.