wgtmac commented on code in PR #387:
URL: https://github.com/apache/iceberg-cpp/pull/387#discussion_r2587539580


##########
src/iceberg/transform.cc:
##########
@@ -306,6 +306,66 @@ Result<std::unique_ptr<UnboundPredicate>> 
Transform::Project(
   std::unreachable();
 }
 
+Result<std::unique_ptr<UnboundPredicate>> Transform::ProjectStrict(

Review Comment:
   `Transform::ProjectStrict` looks so similar to `Transform::Project` with the 
only difference being the calls to `ProjectionUtil`. Perhaps we can use 
template to dispatch it?



##########
src/iceberg/test/predicate_test.cc:
##########
@@ -607,24 +606,24 @@ std::shared_ptr<BoundPredicate> 
AssertAndCastToBoundPredicate(
 }  // namespace
 
 TEST_F(PredicateTest, BoundUnaryPredicateTestIsNull) {
-  ICEBERG_ASSIGN_OR_THROW(auto is_null_pred, Expressions::IsNull("name")->Bind(
-                                                 *schema_, 
/*case_sensitive=*/true));
+  ICEBERG_UNWRAP_OR_FAIL(auto is_null_pred, Expressions::IsNull("name")->Bind(

Review Comment:
   TBH, I think we should remove `ICEBERG_UNWRAP_OR_FAIL` in favor of 
`ICEBERG_ASSIGN_OR_THROW` because the former one cannot be used in functions 
with return type.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to