adriangb commented on code in PR #21493:
URL: https://github.com/apache/datafusion/pull/21493#discussion_r3059154213


##########
datafusion/physical-expr-adapter/src/schema_rewriter.rs:
##########
@@ -423,13 +422,12 @@ impl DefaultPhysicalExprAdapterRewriter {
             )));
         };
 
-        if resolved_column.index() == column.index()
-            && logical_field == physical_field.as_ref()
-        {
-            return Ok(Transformed::no(expr));
-        }
+        let fields_match = logical_field == physical_field.as_ref();
+        if fields_match {
+            if resolved_column.index() == column.index() {
+                return Ok(Transformed::no(expr));
+            }

Review Comment:
   Is this just to create the named variable `fields_match`? It otherwise seems 
equivalent (just changing the order of evaluation).



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