[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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user