This is an automated email from the ASF dual-hosted git repository.

gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 49c54d4b feat: manifest evaluator supports row filter (#428)
49c54d4b is described below

commit 49c54d4b99079ad8bf097304c2ed8166c4fa0989
Author: dongxiao <[email protected]>
AuthorDate: Mon Dec 22 14:56:24 2025 +0800

    feat: manifest evaluator supports row filter (#428)
---
 src/iceberg/expression/manifest_evaluator.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/iceberg/expression/manifest_evaluator.cc 
b/src/iceberg/expression/manifest_evaluator.cc
index 9c4e708f..bc7d0bfe 100644
--- a/src/iceberg/expression/manifest_evaluator.cc
+++ b/src/iceberg/expression/manifest_evaluator.cc
@@ -21,6 +21,7 @@
 
 #include "iceberg/expression/binder.h"
 #include "iceberg/expression/expression_visitor.h"
+#include "iceberg/expression/projections.h"
 #include "iceberg/expression/rewrite_not.h"
 #include "iceberg/manifest/manifest_list.h"
 #include "iceberg/row/struct_like.h"
@@ -352,11 +353,11 @@ 
ManifestEvaluator::ManifestEvaluator(std::shared_ptr<Expression> expr)
 ManifestEvaluator::~ManifestEvaluator() = default;
 
 Result<std::unique_ptr<ManifestEvaluator>> ManifestEvaluator::MakeRowFilter(
-    [[maybe_unused]] std::shared_ptr<Expression> expr,
-    [[maybe_unused]] const std::shared_ptr<PartitionSpec>& spec,
-    [[maybe_unused]] const Schema& schema, [[maybe_unused]] bool 
case_sensitive) {
-  // TODO(xiao.dong) we need a projection util to project row filter to the 
partition col
-  return NotImplemented("ManifestEvaluator::MakeRowFilter");
+    std::shared_ptr<Expression> expr, const std::shared_ptr<PartitionSpec>& 
spec,
+    const Schema& schema, bool case_sensitive) {
+  auto projection_valuator = Projections::Inclusive(*spec, schema, 
case_sensitive);
+  ICEBERG_ASSIGN_OR_RAISE(auto partition_expr, 
projection_valuator->Project(expr));
+  return MakePartitionFilter(partition_expr, spec, schema, case_sensitive);
 }
 
 Result<std::unique_ptr<ManifestEvaluator>> 
ManifestEvaluator::MakePartitionFilter(

Reply via email to