sdd commented on code in PR #363:
URL: https://github.com/apache/iceberg-rust/pull/363#discussion_r1631990232


##########
crates/iceberg/src/expr/visitors/expression_evaluator.rs:
##########
@@ -223,11 +217,10 @@ impl BoundPredicateVisitor for 
ExpressionEvaluatorVisitor<'_> {
         literal: &Datum,
         _predicate: &BoundPredicate,
     ) -> Result<bool> {
-        let datum = reference.accessor().get(self.partition)?;
-
-        if Self::is_null(datum.literal()) {
-            return Ok(false);
-        }
+        let datum = match reference.accessor().get(self.partition)? {

Review Comment:
   I think this is slightly neater with `let .. else`, but I'm not gonna lose 
any sleep over it 😅 
   
   ```rust
   let Some(datum) = reference.accessor().get(self.partition)? else { return 
Ok(false); };
   ```



##########
crates/iceberg/src/expr/visitors/expression_evaluator.rs:
##########
@@ -223,11 +217,10 @@ impl BoundPredicateVisitor for 
ExpressionEvaluatorVisitor<'_> {
         literal: &Datum,
         _predicate: &BoundPredicate,
     ) -> Result<bool> {
-        let datum = reference.accessor().get(self.partition)?;
-
-        if Self::is_null(datum.literal()) {
-            return Ok(false);
-        }
+        let datum = match reference.accessor().get(self.partition)? {

Review Comment:
   I think this is slightly neater with `let ... else`, but I'm not gonna lose 
any sleep over it 😅 
   
   ```rust
   let Some(datum) = reference.accessor().get(self.partition)? else { return 
Ok(false); };
   ```



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