Skip to content

Commit dc92bb8

Browse files
chore: gate internal_datafusion_err import behind the proto feature (#23075)
## 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](https://claude.com/claude-code) Signed-off-by: Jiawei Zhao <[email protected]>
1 parent 48a5e21 commit dc92bb8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • datafusion/physical-expr/src/expressions/dynamic_filters

‎datafusion/physical-expr/src/expressions/dynamic_filters/mod.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ use tokio::sync::watch;
2222

2323
use crate::PhysicalExpr;
2424
use arrow::datatypes::{DataType, Schema};
25+
#[cfg(feature = "proto")]
26+
use datafusion_common::internal_datafusion_err;
2527
use datafusion_common::{
26-
Result, internal_datafusion_err,
28+
Result,
2729
tree_node::{Transformed, TransformedResult, TreeNode},
2830
};
31+
2932
use datafusion_expr::ColumnarValue;
3033
use datafusion_physical_expr_common::physical_expr::DynHash;
3134

0 commit comments

Comments
 (0)