JingsongLi commented on code in PR #8785:
URL: https://github.com/apache/paimon/pull/8785#discussion_r3626934789


##########
paimon-core/src/main/java/org/apache/paimon/table/format/CatalogFormatTablePartitionManager.java:
##########
@@ -73,31 +76,88 @@ public List<Partition> listPartitions(Map<String, String> 
prefix) {
         String pattern = 
PartitionPathUtils.buildPartitionNamePrefixPattern(partitionKeys, ordered);
         return execute(
                 catalog -> {
-                    List<Partition> partitions = new ArrayList<>();
-                    Set<String> seenPageTokens = new HashSet<>();
-                    String pageToken = null;
-                    do {
-                        PagedList<Partition> page =
-                                catalog.listPartitionsPaged(
-                                        identifier, REQUEST_SIZE, pageToken, 
pattern);
-                        if (page.getElements() != null) {
-                            partitions.addAll(page.getElements());
-                        }
-                        pageToken = page.getNextPageToken();
-                        if (StringUtils.isNotEmpty(pageToken) && 
!seenPageTokens.add(pageToken)) {
-                            throw new IllegalStateException(
-                                    String.format(
-                                            "Catalog returned repeated 
partition page token '%s' for format table %s.",
-                                            pageToken, 
identifier.getFullName()));
+                    if (filter != null) {
+                        try {
+                            return collectAllPages(

Review Comment:
   Do filter again on return list? Is it possible that the server cannot 
perform complete filtering?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to