Skip to content

chore: gate internal_datafusion_err import behind the proto feature#23075

Open
Phoenix500526 wants to merge 1 commit into
apache:mainfrom
Phoenix500526:fix/unused-import
Open

chore: gate internal_datafusion_err import behind the proto feature#23075
Phoenix500526 wants to merge 1 commit into
apache:mainfrom
Phoenix500526:fix/unused-import

Conversation

@Phoenix500526

@Phoenix500526 Phoenix500526 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

N/A — a trivial build-warning fix, no tracking issue.

Rationale for this change

Building datafusion-physical-expr without the proto feature emits an
unused import warning:

warning: unused import: `internal_datafusion_err`
  --> datafusion/physical-expr/src/expressions/dynamic_filters/mod.rs:26

internal_datafusion_err is only referenced inside
impl DynamicFilterPhysicalExpr { fn try_from_proto(..) }, which is itself gated
behind #[cfg(feature = "proto")]. The import was unconditional, so it became
dead whenever proto is disabled.

What changes are included in this PR?

Move the internal_datafusion_err import behind #[cfg(feature = "proto")] so it
is compiled only when its sole use site is, matching the existing gate on the
try_from_proto impl block.

Are these changes tested?

No new tests — this is a compile-time-only change. It is exercised by existing CI,
which builds the crate both with and without the proto feature; the warning
(promoted to an error under -D warnings) no longer fires.

Are there any user-facing changes?

No.

🤖 Generated with Claude Code

`internal_datafusion_err` is only used in `DynamicFilterPhysicalExpr::try_from_proto`,
which are only compiled when feature proto is enabled.

Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant