alamb commented on code in PR #21128:
URL: https://github.com/apache/datafusion/pull/21128#discussion_r3002197286
##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -320,10 +320,8 @@ fn can_evaluate_as_join_condition(predicate: &Expr) ->
Result<bool> {
/// * do nothing.
fn extract_or_clauses_for_join<'a>(
filters: &'a [Expr],
- schema: &'a DFSchema,
+ schema_cols: &'a HashSet<Column>,
Review Comment:
Do we need to have owned Columns?
Maybe this could be something like `&HashSet<&Column>` and avoid copying
strings too
##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -588,25 +599,13 @@ impl ConstEvaluator {
pub fn try_new(config_options: Option<Arc<ConfigOptions>>) -> Result<Self>
{
// The dummy column name is unused and doesn't matter as only
// expressions without column references can be evaluated
- static DUMMY_COL_NAME: &str = ".";
- let schema = Arc::new(Schema::new(vec![Field::new(
Review Comment:
this is nice to save several callocations for each call to the Const
evaluator 👍
##########
datafusion/optimizer/src/push_down_limit.rs:
##########
@@ -47,12 +47,12 @@ impl OptimizerRule for PushDownLimit {
true
}
+ #[expect(clippy::only_used_in_recursion)]
Review Comment:
As in you plan to remove it as a follow on PR?
##########
datafusion/optimizer/src/push_down_limit.rs:
##########
@@ -47,12 +47,12 @@ impl OptimizerRule for PushDownLimit {
true
}
+ #[expect(clippy::only_used_in_recursion)]
fn rewrite(
&self,
plan: LogicalPlan,
config: &dyn OptimizerConfig,
) -> Result<Transformed<LogicalPlan>> {
- let _ = config.options();
Review Comment:
that is weird
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]