diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculator.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculator.java index 22af62850c3c7..ebf59bb3c7c6a 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculator.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculator.java @@ -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 columnNames = param.getColumnNames().isEmpty() ? Collections.singleton("*") : param.getColumnNames();