[fix](judge-partition) Fix incorrect logic in determining whether it is a partitioned table (#27515)

The old logic used to determine whether it was a partition table based on the number of buckets, but if I had a partition table with only one partition and the number of buckets in that partition was 1, it would be mistakenly recognized as a non partition table.

```
Table[test_load_doris_to_hive_2] is not partitioned
```
This commit is contained in:
HB
2023-11-27 18:56:52 +08:00
committed by GitHub
parent 50c442fc6c
commit 36a528b6bc

View File

@ -1312,14 +1312,7 @@ public class OlapTable extends Table {
@Override
public boolean isPartitioned() {
int numSegs = 0;
for (Partition part : getPartitions()) {
numSegs += part.getDistributionInfo().getBucketNum();
if (numSegs > 1) {
return true;
}
}
return false;
return !PartitionType.UNPARTITIONED.equals(partitionInfo.getType());
}
@Override