seddonm1 commented on a change in pull request #778:
URL: https://github.com/apache/arrow-datafusion/pull/778#discussion_r676981952



##########
File path: datafusion/src/logical_plan/builder.rs
##########
@@ -282,14 +282,42 @@ impl LogicalPlanBuilder {
             ));
         }
 
+        let left_keys = left_keys
+            .into_iter()
+            .map(|c| c.into())
+            .collect::<Vec<Column>>();
+
+        let mut swap = false;
         let left_keys: Vec<Column> = left_keys
+            .clone()
             .into_iter()
-            .map(|c| c.into().normalize(&self.plan))
-            .collect::<Result<_>>()?;
+            .map(|c| c.normalize(&self.plan))
+            .collect::<Result<_>>()
+            .or_else(|_| {
+                swap = true;

Review comment:
       I have refactored this to operate at an individual condition level and I 
think the code is much more succinct.




-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to