diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java index 752b37e7a2..8347b33d5b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java @@ -1240,7 +1240,7 @@ public class ShowExecutor { } else { partitions = olapTable.getPartitions(); } - List> tableInfos = new ArrayList>(); + List> tabletInfos = new ArrayList<>(); String indexName = showStmt.getIndexName(); long indexId = -1; if (indexName != null) { @@ -1260,18 +1260,18 @@ public class ShowExecutor { continue; } TabletsProcDir procDir = new TabletsProcDir(db, index); - tableInfos.addAll(procDir.fetchComparableResult( + tabletInfos.addAll(procDir.fetchComparableResult( showStmt.getVersion(), showStmt.getBackendId(), showStmt.getReplicaState())); - if (sizeLimit > -1 && tableInfos.size() >= sizeLimit) { + if (sizeLimit > -1 && tabletInfos.size() >= sizeLimit) { stop = true; break; } } } - if (sizeLimit > -1 && tableInfos.size() < sizeLimit) { - tableInfos.clear(); + if (sizeLimit > -1 && tabletInfos.size() < sizeLimit) { + tabletInfos.clear(); } else if (sizeLimit > -1) { - tableInfos = tableInfos.subList((int)showStmt.getOffset(), (int)sizeLimit); + tabletInfos = tabletInfos.subList((int)showStmt.getOffset(), (int)sizeLimit); } // order by @@ -1279,15 +1279,15 @@ public class ShowExecutor { ListComparator> comparator = null; if (orderByPairs != null) { OrderByPair[] orderByPairArr = new OrderByPair[orderByPairs.size()]; - comparator = new ListComparator>(orderByPairs.toArray(orderByPairArr)); + comparator = new ListComparator<>(orderByPairs.toArray(orderByPairArr)); } else { // order by tabletId, replicaId - comparator = new ListComparator>(0, 1); + comparator = new ListComparator<>(0, 1); } - Collections.sort(tableInfos, comparator); + Collections.sort(tabletInfos, comparator); - for (List tabletInfo : tableInfos) { - List oneTablet = new ArrayList(tableInfos.size()); + for (List tabletInfo : tabletInfos) { + List oneTablet = new ArrayList(tabletInfo.size()); for (Comparable column : tabletInfo) { oneTablet.add(column.toString()); }