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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]