[Fix](explain) fix tablet showing problem (#35830) (#36028)

cherry-pick: #35830
This commit is contained in:
LiBinfeng
2024-06-11 10:55:35 +08:00
committed by GitHub
parent 75a6f28f2e
commit afe2c57e05

View File

@ -1331,8 +1331,9 @@ public class OlapScanNode extends ScanNode {
String selectedPartitions = getSelectedPartitionIds().stream().sorted()
.map(id -> olapTable.getPartition(id).getName())
.collect(Collectors.joining(","));
output.append(prefix).append(String.format("partitions=%s/%s (%s), tablets=%s/%s", selectedPartitionNum,
olapTable.getPartitions().size(), selectedPartitions, selectedTabletsNum, totalTabletsNum));
output.append(prefix).append(String.format("partitions=%s/%s (%s)", selectedPartitionNum,
olapTable.getPartitions().size(), selectedPartitions)).append("\n");
output.append(prefix).append(String.format("tablets=%s/%s", selectedTabletsNum, totalTabletsNum));
// We print up to 3 tablet, and we print "..." if the number is more than 3
if (scanTabletIds.size() > 3) {
List<Long> firstTenTabletIds = scanTabletIds.subList(0, 3);