|
21 | 21 |
|
22 | 22 | #include "iceberg/expression/binder.h" |
23 | 23 | #include "iceberg/expression/expression_visitor.h" |
| 24 | +#include "iceberg/expression/projections.h" |
24 | 25 | #include "iceberg/expression/rewrite_not.h" |
25 | 26 | #include "iceberg/manifest/manifest_list.h" |
26 | 27 | #include "iceberg/row/struct_like.h" |
@@ -352,11 +353,11 @@ ManifestEvaluator::ManifestEvaluator(std::shared_ptr<Expression> expr) |
352 | 353 | ManifestEvaluator::~ManifestEvaluator() = default; |
353 | 354 |
|
354 | 355 | Result<std::unique_ptr<ManifestEvaluator>> ManifestEvaluator::MakeRowFilter( |
355 | | - [[maybe_unused]] std::shared_ptr<Expression> expr, |
356 | | - [[maybe_unused]] const std::shared_ptr<PartitionSpec>& spec, |
357 | | - [[maybe_unused]] const Schema& schema, [[maybe_unused]] bool case_sensitive) { |
358 | | - // TODO(xiao.dong) we need a projection util to project row filter to the partition col |
359 | | - return NotImplemented("ManifestEvaluator::MakeRowFilter"); |
| 356 | + std::shared_ptr<Expression> expr, const std::shared_ptr<PartitionSpec>& spec, |
| 357 | + const Schema& schema, bool case_sensitive) { |
| 358 | + auto projection_valuator = Projections::Inclusive(*spec, schema, case_sensitive); |
| 359 | + ICEBERG_ASSIGN_OR_RAISE(auto partition_expr, projection_valuator->Project(expr)); |
| 360 | + return MakePartitionFilter(partition_expr, spec, schema, case_sensitive); |
360 | 361 | } |
361 | 362 |
|
362 | 363 | Result<std::unique_ptr<ManifestEvaluator>> ManifestEvaluator::MakePartitionFilter( |
|
0 commit comments