You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "mengnankkkk (via GitHub)" <gi...@apache.org> on 2025/07/13 05:05:06 UTC
Re: [PR] [WIP] [flink] Cast Predicate to PartitionPredicate to avoid stack overflow [paimon]
mengnankkkk commented on code in PR #5880:
URL: https://github.com/apache/paimon/pull/5880#discussion_r2203158750
##########
paimon-core/src/main/java/org/apache/paimon/table/source/AbstractDataTableScan.java:
##########
@@ -27,6 +27,7 @@
import org.apache.paimon.metrics.MetricRegistry;
import org.apache.paimon.operation.FileStoreScan;
import org.apache.paimon.options.Options;
+import org.apache.paimon.partition.PartitionPredicate;
import org.apache.paimon.predicate.Predicate;
Review Comment:
旧的没有删除
##########
paimon-core/src/main/java/org/apache/paimon/table/source/ReadBuilder.java:
##########
@@ -20,6 +20,7 @@
import org.apache.paimon.annotation.Public;
import org.apache.paimon.data.InternalRow;
+import org.apache.paimon.partition.PartitionPredicate;
import org.apache.paimon.predicate.Predicate;
import org.apache.paimon.predicate.PredicateBuilder;
Review Comment:
旧的要删除
##########
paimon-core/src/main/java/org/apache/paimon/table/FallbackReadFileStoreTable.java:
##########
@@ -337,6 +338,13 @@ public InnerTableScan withPartitionsFilter(List<Map<String, String>> partitions)
return this;
Review Comment:
多个类新增了类似方法,部分实现仅简单返回 this,没有实际逻辑,导致接口膨胀。建议统一抽象或合并接口,减少冗余。
##########
paimon-core/src/main/java/org/apache/paimon/table/source/InnerTableScan.java:
##########
@@ -20,6 +20,7 @@
import org.apache.paimon.data.BinaryRow;
import org.apache.paimon.metrics.MetricRegistry;
+import org.apache.paimon.partition.PartitionPredicate;
import org.apache.paimon.predicate.Predicate;
Review Comment:
旧的没有删除
##########
paimon-core/src/main/java/org/apache/paimon/table/FallbackReadFileStoreTable.java:
##########
@@ -32,6 +32,7 @@
import org.apache.paimon.manifest.PartitionEntry;
import org.apache.paimon.metrics.MetricRegistry;
import org.apache.paimon.options.Options;
+import org.apache.paimon.partition.PartitionPredicate;
import org.apache.paimon.predicate.Predicate;
Review Comment:
旧的没有删除
##########
paimon-core/src/main/java/org/apache/paimon/partition/PartitionPredicate.java:
##########
@@ -282,4 +283,16 @@ static List<BinaryRow> createBinaryPartitions(
}
return result;
}
+
+ static PartitionPredicate fromMap(
+ RowType partitionType, Map<String, String> values, String defaultPartValue) {
+ return fromPredicate(
+ partitionType, createPartitionPredicate(values, partitionType, defaultPartValue));
Review Comment:
接口声明了 Serializable,但没有实现序列化相关方法,且部分实现类未处理序列化细节。建议补充序列化实现,并在分布式场景下进行测试。
--
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-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org