timsaucer opened a new issue, #1745:
URL: https://github.com/apache/datafusion-python/issues/1745
`crates/core/src/expr/indexed_field.rs` is not part of the crate. Its `pub
mod indexed_field;` declaration and the
`m.add_class::<indexed_field::PyGetIndexedField>()` registration were both
removed from `crates/core/src/expr.rs` in
b5446efbc2e50fb017454173f6b11e4fad53fe5a (#728, the DataFusion 39 upgrade),
because upstream replaced `Expr::GetIndexField` with the `FieldAccessor` trait.
The file itself was left on disk.
Since nothing declares it as a module, it is never compiled and
`GetIndexedField` is not exported to Python. It still does `use
datafusion::logical_expr::expr::{GetFieldAccess, GetIndexedField};`, and that
type no longer exists in DataFusion, so the file would not compile even if it
were wired back in.
This is not harmless dead weight. Two concrete symptoms:
1. The `rust-fmt` pre-commit hook runs `cargo +nightly fmt --all --` with
`pass_filenames: true`, so rustfmt is handed the path explicitly and formats
the file regardless of the module tree. CI runs stable `cargo fmt --all
--check` with no filenames, which only walks `mod` declarations and never
reaches it. The two disagree on one match arm, so the hook rewrites the file on
every commit that touches Rust and CI never notices — recurring churn that
contributors have to revert by hand.
2. #1667 removed a `todo!()` from `PyGetIndexedField::key` and replaced it
with a proper error. That change reads as a fix but has no effect, because the
code has not been compiled since June 2024.
Proposed fix: delete the file. There are no references to `indexed_field`,
`IndexedField`, or `PyGetIndexedField` anywhere else in the repository, and
`py_unsupported_variant_err` — the only helper it imports from this crate — has
many other callers in `crates/core/src/expr.rs`.
--
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]