Skip to content

Commit

Permalink
Fix index out of bounds exception for migration without unique keys (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
menghaoranss authored Dec 23, 2024
1 parent 80e148e commit 44c49a1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private void fulfillCalculationContext(final CalculationContext calculationConte
}

private String getQuerySQL(final SingleTableInventoryCalculateParameter param) {
ShardingSpherePreconditions.checkNotNull(param.getFirstUniqueKey(),
ShardingSpherePreconditions.checkState(param.getUniqueKeys() != null && !param.getUniqueKeys().isEmpty() && null != param.getFirstUniqueKey(),
() -> new UnsupportedOperationException("Record inventory calculator does not support table without unique key and primary key now."));
PipelineDataConsistencyCalculateSQLBuilder pipelineSQLBuilder = new PipelineDataConsistencyCalculateSQLBuilder(param.getDatabaseType());
Collection<String> columnNames = param.getColumnNames().isEmpty() ? Collections.singleton("*") : param.getColumnNames();
Expand Down

0 comments on commit 44c49a1

Please sign in to comment.