juntaozhang commented on code in PR #7950:
URL: https://github.com/apache/paimon/pull/7950#discussion_r3298042812


##########
paimon-core/src/main/java/org/apache/paimon/table/FallbackReadFileStoreTable.java:
##########
@@ -560,18 +569,31 @@ public List<PartitionEntry> listPartitionEntries() {
         }
 
         protected void setPartitionPredicate(PartitionPredicate predicate) {
-            this.partitionPredicate = predicate;
+            this.mainPartitionPredicate = predicate;
+            this.fallbackPartitionPredicate = predicate;
+        }
+
+        protected void setPartitionPredicate(
+                PartitionPredicate mainPartitionPredicate,
+                PartitionPredicate fallbackPartitionPredicate) {
+            this.mainPartitionPredicate = mainPartitionPredicate;
+            this.fallbackPartitionPredicate = fallbackPartitionPredicate;
+        }
+
+        protected PartitionPredicate getMainPartitionPredicate() {
+            return mainPartitionPredicate;
         }
 
-        protected PartitionPredicate getPartitionPredicate() {
-            return partitionPredicate;
+        protected PartitionPredicate getFallbackPartitionPredicate() {
+            return fallbackPartitionPredicate;
         }
 
-        private DataTableScan newPartitionListingScan(
-                boolean isMain, PartitionPredicate scanPartitionPredicate) {
+        private DataTableScan newPartitionListingScan(boolean isMain) {
             DataTableScan scan = scanCreator.apply(isMain ? wrappedTable : 
fallbackTable);
-            if (scanPartitionPredicate != null) {
-                scan.withPartitionFilter(scanPartitionPredicate);
+            if (isMain && getMainPartitionPredicate() != null) {
+                scan.withPartitionFilter(getMainPartitionPredicate());
+            } else if (getFallbackPartitionPredicate() != null) {

Review Comment:
   Thanks a lot for your review. The `testMainAndFallbackPartitionPredicates` 
has already been added.



-- 
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