Skip to content

Commit 952d16d

Browse files
Anurag Tryambak RautAnurag Tryambak Raut
authored andcommitted
style: apply cargo fmt
1 parent 8c8ad2f commit 952d16d

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

datafusion/physical-expr/src/expressions/dynamic_filters.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,7 @@ impl DynamicFilterPhysicalExpr {
428428
pub fn try_to_proto(
429429
&self,
430430
ctx: &datafusion_physical_expr_common::physical_expr::proto_encode::PhysicalExprEncodeCtx<'_>,
431-
) -> Result<Option<datafusion_proto_models::protobuf::PhysicalExprNode>>
432-
{
431+
) -> Result<Option<datafusion_proto_models::protobuf::PhysicalExprNode>> {
433432
use datafusion_proto_models::protobuf;
434433
use datafusion_proto_models::protobuf::physical_expr_node::ExprType;
435434

@@ -465,18 +464,19 @@ impl DynamicFilterPhysicalExpr {
465464
}
466465

467466
/// Reconstruct a [`DynamicFilterPhysicalExpr`] from its protobuf representation.
468-
pub fn try_from_proto(
467+
pub fn try_from_proto(
469468
node: &datafusion_proto_models::protobuf::PhysicalExprNode,
470469
ctx: &datafusion_physical_expr_common::physical_expr::proto_decode::PhysicalExprDecodeCtx<'_>,
471-
) -> Result<Arc<dyn PhysicalExpr>>
472-
{
470+
) -> Result<Arc<dyn PhysicalExpr>> {
473471
use datafusion_proto_models::protobuf::physical_expr_node::ExprType;
474472

475473
let dynamic_filter = match &node.expr_type {
476474
Some(ExprType::DynamicFilter(df)) => df.as_ref(),
477-
_ => return datafusion_common::internal_err!(
478-
"PhysicalExprNode is not a DynamicFilter"
479-
),
475+
_ => {
476+
return datafusion_common::internal_err!(
477+
"PhysicalExprNode is not a DynamicFilter"
478+
);
479+
}
480480
};
481481

482482
let expression_id = node.expr_id.ok_or_else(|| {
@@ -505,14 +505,12 @@ impl DynamicFilterPhysicalExpr {
505505
None
506506
};
507507

508-
let inner_expr = ctx.decode(
509-
dynamic_filter
510-
.inner_expr
511-
.as_deref()
512-
.ok_or_else(|| datafusion_common::DataFusionError::Internal(
508+
let inner_expr =
509+
ctx.decode(dynamic_filter.inner_expr.as_deref().ok_or_else(|| {
510+
datafusion_common::DataFusionError::Internal(
513511
"DynamicFilterPhysicalExpr missing inner_expr".to_string(),
514-
))?,
515-
)?;
512+
)
513+
})?)?;
516514

517515
Ok(Arc::new(DynamicFilterPhysicalExpr::from_parts(
518516
children,

0 commit comments

Comments
 (0)