(
exec: &NestedLoopJoinExec,
codec: &dyn PhysicalExtensionCodec,
proto_converter: &dyn PhysicalProtoConverterExtension,
)
| 3344 | } |
| 3345 | |
| 3346 | fn try_from_nested_loop_join_exec( |
| 3347 | exec: &NestedLoopJoinExec, |
| 3348 | codec: &dyn PhysicalExtensionCodec, |
| 3349 | proto_converter: &dyn PhysicalProtoConverterExtension, |
| 3350 | ) -> Result<Self> { |
| 3351 | let left = protobuf::PhysicalPlanNode::try_from_physical_plan_with_converter( |
| 3352 | exec.left().to_owned(), |
| 3353 | codec, |
| 3354 | proto_converter, |
| 3355 | )?; |
| 3356 | let right = protobuf::PhysicalPlanNode::try_from_physical_plan_with_converter( |
| 3357 | exec.right().to_owned(), |
| 3358 | codec, |
| 3359 | proto_converter, |
| 3360 | )?; |
| 3361 | |
| 3362 | let join_type: protobuf::JoinType = exec.join_type().to_owned().into(); |
| 3363 | let filter = exec |
| 3364 | .filter() |
| 3365 | .as_ref() |
| 3366 | .map(|f| { |
| 3367 | let expression = |
| 3368 | proto_converter.physical_expr_to_proto(f.expression(), codec)?; |
| 3369 | let column_indices = f |
| 3370 | .column_indices() |
| 3371 | .iter() |
| 3372 | .map(|i| { |
| 3373 | let side: protobuf::JoinSide = i.side.to_owned().into(); |
| 3374 | protobuf::ColumnIndex { |
| 3375 | index: i.index as u32, |
| 3376 | side: side.into(), |
| 3377 | } |
| 3378 | }) |
| 3379 | .collect(); |
| 3380 | let schema = f.schema().as_ref().try_into()?; |
| 3381 | Ok(protobuf::JoinFilter { |
| 3382 | expression: Some(expression), |
| 3383 | column_indices, |
| 3384 | schema: Some(schema), |
| 3385 | }) |
| 3386 | }) |
| 3387 | .map_or(Ok(None), |v: Result<protobuf::JoinFilter>| v.map(Some))?; |
| 3388 | |
| 3389 | Ok(protobuf::PhysicalPlanNode { |
| 3390 | physical_plan_type: Some(PhysicalPlanType::NestedLoopJoin(Box::new( |
| 3391 | protobuf::NestedLoopJoinExecNode { |
| 3392 | left: Some(Box::new(left)), |
| 3393 | right: Some(Box::new(right)), |
| 3394 | join_type: join_type.into(), |
| 3395 | filter, |
| 3396 | projection: exec.projection().as_ref().map_or_else(Vec::new, |v| { |
| 3397 | v.iter().map(|x| *x as u32).collect::<Vec<u32>>() |
| 3398 | }), |
| 3399 | }, |
| 3400 | ))), |
| 3401 | }) |
| 3402 | } |
| 3403 |
nothing calls this directly
no test coverage detected