You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/06/23 16:36:07 UTC
(datafusion) branch main updated: [sql]: remove deprecated TableReference re-exports (#23102)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new ed91337ae2 [sql]: remove deprecated TableReference re-exports (#23102)
ed91337ae2 is described below
commit ed91337ae208816d75c646eeb9ac271b0b0c489b
Author: Megakaizo <ge...@proton.me>
AuthorDate: Tue Jun 23 20:21:22 2026 +0400
[sql]: remove deprecated TableReference re-exports (#23102)
## Which issue does this PR close?
- part of #23080
## Rationale for this change
`ResolvedTableReference` and `TableReference` re-exports were deprecated
in 46.0.0 in `datafusion-sql` and should be imported from
`datafusion_common` (or `datafusion::common`) instead.
## What changes are included in this PR?
- Removed deprecated `ResolvedTableReference` and `TableReference`
re-exports from `datafusion-sql` (`lib.rs`).
- Updated internal downstream imports in `datafusion-sql`,
`datafusion-core`, and `datafusion-substrait` to use correct paths.
## Are these changes tested?
Verified by running local compilation and tests.
## Are there any user-facing changes?
Yes. This removes deprecated public Rust API re-exports
`ResolvedTableReference` and `TableReference` from `datafusion-sql`.
Downstream users should migrate to importing them from
`datafusion_common` (or `datafusion::common`).
This is an API change and should be labeled `api change`.
---
datafusion/core/src/execution/session_state.rs | 4 +---
datafusion/optimizer/src/analyzer/type_coercion.rs | 5 +++--
datafusion/sql/src/lib.rs | 5 -----
datafusion/sql/src/resolve.rs | 2 +-
datafusion/substrait/src/logical_plan/consumer/utils.rs | 8 +++-----
5 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/datafusion/core/src/execution/session_state.rs b/datafusion/core/src/execution/session_state.rs
index ad525ac7b1..f1f5465212 100644
--- a/datafusion/core/src/execution/session_state.rs
+++ b/datafusion/core/src/execution/session_state.rs
@@ -2354,13 +2354,11 @@ mod tests {
use crate::logical_expr::{AggregateUDF, ScalarUDF, TableSource, WindowUDF};
use crate::physical_plan::ExecutionPlan;
use crate::sql::planner::ContextProvider;
- use crate::sql::{ResolvedTableReference, TableReference};
use arrow::array::{ArrayRef, Int32Array, RecordBatch, StringArray};
use arrow::datatypes::{DataType, Field, Schema};
use datafusion_catalog::MemoryCatalogProviderList;
- use datafusion_common::DFSchema;
- use datafusion_common::Result;
use datafusion_common::config::Dialect;
+ use datafusion_common::{DFSchema, ResolvedTableReference, Result, TableReference};
use datafusion_execution::config::SessionConfig;
use datafusion_expr::Expr;
use datafusion_expr::HigherOrderUDF;
diff --git a/datafusion/optimizer/src/analyzer/type_coercion.rs b/datafusion/optimizer/src/analyzer/type_coercion.rs
index 032fe25240..2503fc8072 100644
--- a/datafusion/optimizer/src/analyzer/type_coercion.rs
+++ b/datafusion/optimizer/src/analyzer/type_coercion.rs
@@ -1322,7 +1322,9 @@ mod test {
use crate::assert_analyzed_plan_with_config_eq_snapshot;
use datafusion_common::config::ConfigOptions;
use datafusion_common::tree_node::{TransformedResult, TreeNode};
- use datafusion_common::{DFSchema, DFSchemaRef, Result, ScalarValue, Spans};
+ use datafusion_common::{
+ DFSchema, DFSchemaRef, Result, ScalarValue, Spans, TableReference,
+ };
use datafusion_expr::expr::{self, InSubquery, Like, ScalarFunction};
use datafusion_expr::logical_plan::{EmptyRelation, Projection, Sort};
use datafusion_expr::test::function_stub::avg_udaf;
@@ -1333,7 +1335,6 @@ mod test {
col, create_udaf, is_true, lit,
};
use datafusion_functions_aggregate::average::AvgAccumulator;
- use datafusion_sql::TableReference;
fn empty() -> Arc<LogicalPlan> {
Arc::new(LogicalPlan::EmptyRelation(EmptyRelation {
diff --git a/datafusion/sql/src/lib.rs b/datafusion/sql/src/lib.rs
index 7fef670933..95601acac2 100644
--- a/datafusion/sql/src/lib.rs
+++ b/datafusion/sql/src/lib.rs
@@ -57,9 +57,4 @@ mod statement;
pub mod unparser;
pub mod utils;
mod values;
-#[deprecated(
- since = "46.0.0",
- note = "use datafusion_common::{ResolvedTableReference, TableReference}"
-)]
-pub use datafusion_common::{ResolvedTableReference, TableReference};
pub use sqlparser;
diff --git a/datafusion/sql/src/resolve.rs b/datafusion/sql/src/resolve.rs
index 955dbb8660..d1c172502f 100644
--- a/datafusion/sql/src/resolve.rs
+++ b/datafusion/sql/src/resolve.rs
@@ -20,9 +20,9 @@ use std::ops::ControlFlow;
use datafusion_common::{DataFusionError, Result};
-use crate::TableReference;
use crate::parser::{CopyToSource, CopyToStatement, Statement as DFStatement};
use crate::planner::object_name_to_table_reference;
+use datafusion_common::TableReference;
use sqlparser::ast::*;
// following constants are used in `resolve_table_references`
diff --git a/datafusion/substrait/src/logical_plan/consumer/utils.rs b/datafusion/substrait/src/logical_plan/consumer/utils.rs
index c654cc0709..824c79452d 100644
--- a/datafusion/substrait/src/logical_plan/consumer/utils.rs
+++ b/datafusion/substrait/src/logical_plan/consumer/utils.rs
@@ -18,12 +18,11 @@
use crate::logical_plan::consumer::SubstraitConsumer;
use datafusion::arrow::datatypes::{DataType, Field, Schema, TimeUnit, UnionFields};
use datafusion::common::{
- DFSchema, DFSchemaRef, exec_err, not_impl_err, substrait_datafusion_err,
- substrait_err,
+ DFSchema, DFSchemaRef, TableReference, exec_err, not_impl_err,
+ substrait_datafusion_err, substrait_err,
};
use datafusion::logical_expr::expr::Sort;
use datafusion::logical_expr::{Cast, Expr, ExprSchemable};
-use datafusion::sql::TableReference;
use std::collections::HashSet;
use std::sync::Arc;
use substrait::proto::SortField;
@@ -570,12 +569,11 @@ pub(crate) mod tests {
use crate::extensions::Extensions;
use crate::logical_plan::consumer::DefaultSubstraitConsumer;
use datafusion::arrow::datatypes::{DataType, Field, Fields, Schema};
- use datafusion::common::DFSchema;
+ use datafusion::common::{DFSchema, TableReference};
use datafusion::error::Result;
use datafusion::execution::SessionState;
use datafusion::logical_expr::{Expr, col};
use datafusion::prelude::SessionContext;
- use datafusion::sql::TableReference;
use std::collections::HashMap;
use std::sync::{Arc, LazyLock};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org