Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordworms committed Oct 25, 2024
1 parent 2ff52e6 commit a8fb818
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions datafusion/core/src/physical_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ impl DefaultPhysicalPlanner {
}
_ => None,
};

let prefer_hash_join =
session_state.config_options().optimizer.prefer_hash_join;

Expand Down Expand Up @@ -1122,7 +1122,11 @@ impl DefaultPhysicalPlanner {
)?)
};
// build dynamic filter
if join.support_dynamic_filter() && dynamic_pushdown_columns.as_ref().is_some_and(|columns| !columns.is_empty()) {
if join.support_dynamic_filter()
&& dynamic_pushdown_columns
.as_ref()
.is_some_and(|columns| !columns.is_empty())
{
let physical_dynamic_filter_info: Option<Arc<DynamicFilterInfo>> =
if let Some(dynamic_columns) = dynamic_pushdown_columns {
let columns_and_types_and_names: Vec<(Arc<Column>, String)> =
Expand All @@ -1137,12 +1141,11 @@ impl DefaultPhysicalPlanner {
index,
),
);

let build_side_name = dynamic_column.build_name().to_owned();
Ok((physical_column, build_side_name))
})
.collect::<Result<_, DataFusionError>>()?;

let (physical_columns, build_side_names) =
columns_and_types_and_names.into_iter().fold(
(Vec::new(), Vec::new()),
Expand All @@ -1152,7 +1155,7 @@ impl DefaultPhysicalPlanner {
(cols, names)
},
);

Some(Arc::new(DynamicFilterInfo::try_new(
physical_columns,
build_side_names,
Expand Down

0 comments on commit a8fb818

Please sign in to comment.