Skip to content

Java side HashJoin is converted as BroadcastJoinExec at native side #1770

@xumingming

Description

@xumingming

PhysicalPlanType::HashJoin(hash_join) => {
let schema = Arc::new(convert_required!(hash_join.schema)?);
let left: Arc<dyn ExecutionPlan> = convert_box_required!(hash_join.left)?;
let right: Arc<dyn ExecutionPlan> = convert_box_required!(hash_join.right)?;
let on: Vec<(PhysicalExprRef, PhysicalExprRef)> = hash_join
.on
.iter()
.map(|col| {
let left_key =
try_parse_physical_expr(&col.left.as_ref().unwrap(), &left.schema())?;
let right_key =
try_parse_physical_expr(&col.right.as_ref().unwrap(), &right.schema())?;
Ok((left_key, right_key))
})
.collect::<Result<_, Self::Error>>()?;
let join_type =
protobuf::JoinType::try_from(hash_join.join_type).expect("invalid JoinType");
let build_side =
protobuf::JoinSide::try_from(hash_join.build_side).expect("invalid BuildSide");
Ok(Arc::new(BroadcastJoinExec::try_new(
schema,
left,
right,
on,
join_type
.try_into()
.map_err(|_| proto_error("invalid JoinType"))?,
build_side
.try_into()
.map_err(|_| proto_error("invalid BuildSide"))?,
false,
None,
)?))
}

Seems like a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions