hhhizzz commented on code in PR #23028:
URL: https://github.com/apache/datafusion/pull/23028#discussion_r3456331279
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -4161,30 +4163,33 @@ fn calc_func_dependencies_for_project(
Ok::<_, DataFusionError>(
wildcard_fields
.into_iter()
- .filter_map(|(qualifier, f)| {
+ .map(|(qualifier, f)| {
let flat_name = qualifier
.map(|t| format!("{}.{}", t, f.name()))
.unwrap_or_else(|| f.name().clone());
- input_fields.iter().position(|item| *item ==
flat_name)
+ input_fields
+ .iter()
+ .position(|item| *item == flat_name)
+ .unwrap_or(COMPUTED_EXPR_INDEX)
})
Review Comment:
Added two wildcard regression tests: one for the normal builder-level `*`
expansion path, and one that directly covers the deprecated `Expr::Wildcard`
branch in `calc_func_dependencies_for_project`.
The direct test verifies that a wildcard expression before a primary-key
column preserves the correct FD output position.
--
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]