You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2023/03/28 14:40:43 UTC

[GitHub] [arrow-datafusion] comphead commented on a diff in pull request #5748: infer right side nullability for LEFT join

comphead commented on code in PR #5748:
URL: https://github.com/apache/arrow-datafusion/pull/5748#discussion_r1150732166


##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -1041,20 +1041,44 @@ pub fn build_join_schema(
     right: &DFSchema,
     join_type: &JoinType,
 ) -> Result<DFSchema> {
+    let right_fields = right.fields();
+    let left_fields = left.fields();
+
     let fields: Vec<DFField> = match join_type {
-        JoinType::Inner | JoinType::Left | JoinType::Full | JoinType::Right => {
-            let right_fields = right.fields().iter();
-            let left_fields = left.fields().iter();
+        JoinType::Inner | JoinType::Full | JoinType::Right => {
             // left then right
-            left_fields.chain(right_fields).cloned().collect()
+            left_fields
+                .iter()
+                .chain(right_fields.iter())
+                .cloned()
+                .collect()
+        }
+        JoinType::Left => {

Review Comment:
   I'll fix other types of joins on separate PR



-- 
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-unsubscribe@arrow.apache.org

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