alamb commented on code in PR #23028:
URL: https://github.com/apache/datafusion/pull/23028#discussion_r3461694969
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -4144,6 +4144,8 @@ fn calc_func_dependencies_for_project(
exprs: &[Expr],
input: &LogicalPlan,
) -> Result<FunctionalDependencies> {
+ const COMPUTED_EXPR_INDEX: usize = usize::MAX;
Review Comment:
Could we possible add a comment explaining what the COMPUTED_EXPR_INDEX is
used for (a sentinel )
Perhaps something like
```rust
// Sentinel for projection expressions that produce an output column but
do not
// map back to any input field.
```
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -4144,6 +4144,8 @@ fn calc_func_dependencies_for_project(
exprs: &[Expr],
input: &LogicalPlan,
) -> Result<FunctionalDependencies> {
+ const COMPUTED_EXPR_INDEX: usize = usize::MAX;
+
let input_fields = input.schema().field_names();
// Calculate expression indices (if present) in the input schema.
Review Comment:
might help to add a note here explaining what proj_indices is: a map from
output column position -> input column index
--
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]