Skip to content

Commit 59316de

Browse files
fix: eliminate warning when building without sql feature (#18480)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes #18479. You can see an example run with the warning [here](https://github.com/apache/datafusion/actions/runs/19056329292/job/54427495514), just expand the `Check datafusion (no-default-features)` section. ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> Fixes a warning when building without the sql feature. ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Makes a `use` declaration conditional based on the sql feature. ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> I ran the same command and had no issues. ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> Nope!
1 parent e4f6a14 commit 59316de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datafusion/core/src/execution/session_state.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ use datafusion_catalog::information_schema::{
3737
use datafusion_catalog::MemoryCatalogProviderList;
3838
use datafusion_catalog::{TableFunction, TableFunctionImpl};
3939
use datafusion_common::alias::AliasGenerator;
40-
use datafusion_common::config::{ConfigExtension, ConfigOptions, Dialect, TableOptions};
40+
#[cfg(feature = "sql")]
41+
use datafusion_common::config::Dialect;
42+
use datafusion_common::config::{ConfigExtension, ConfigOptions, TableOptions};
4143
use datafusion_common::display::{PlanType, StringifiedPlan, ToStringifiedPlan};
4244
use datafusion_common::tree_node::TreeNode;
4345
use datafusion_common::{

0 commit comments

Comments
 (0)