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


##########
paimon-core/src/main/java/org/apache/paimon/stats/SimpleStatsEvolutions.java:
##########
@@ -78,19 +86,27 @@ public SimpleStatsEvolution getOrCreate(long dataSchemaId) {
     }
 
     @Nullable
-    public Predicate tryDevolveFilter(long dataSchemaId, Predicate filter) {
+    public Predicate tryDevolveFilter(long dataSchemaId, Predicate filter, 
boolean nullSafe) {
         if (tableSchemaId == dataSchemaId) {
             return filter;
         }
         List<Predicate> devolved =
                 Objects.requireNonNull(
                         SchemaEvolutionUtil.devolveDataFilters(
-                                schemaFields.apply(tableSchemaId),
+                                tableDataFields,
                                 schemaFields.apply(dataSchemaId),
-                                Collections.singletonList(filter)));
+                                Collections.singletonList(filter),
+                                isKeyStats,
+                                nullSafe));
         return devolved.isEmpty() ? null : devolved.get(0);
     }
 
+    // Stats filter is unsafe if it should be devolved and the devolving is 
unsafe
+    // null safe: it's safe if the predicate field is added later and filter 
it on the old schema
+    public boolean statsFilterUnsafe(ManifestEntry entry, Predicate 
statsFilter) {

Review Comment:
   Should not return bool, we should return predicate, here should consider and 
filter, should deal with multiple predicates situation.



-- 
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: issues-unsubscr...@paimon.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to