diff --git a/datafusion-cli/Cargo.lock b/datafusion-cli/Cargo.lock index d744a891c6a6..8a8aed249b7a 100644 --- a/datafusion-cli/Cargo.lock +++ b/datafusion-cli/Cargo.lock @@ -1177,7 +1177,6 @@ dependencies = [ "clap", "ctor", "datafusion", - "datafusion-common", "dirs", "env_logger", "futures", diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml index 18e14357314e..c9241fcf10b4 100644 --- a/datafusion-cli/Cargo.toml +++ b/datafusion-cli/Cargo.toml @@ -45,7 +45,6 @@ datafusion = { path = "../datafusion/core", version = "37.0.0", features = [ "unicode_expressions", "compression", ] } -datafusion-common = { path = "../datafusion/common" } dirs = "4.0.0" env_logger = "0.9" futures = "0.3" diff --git a/datafusion-cli/src/command.rs b/datafusion-cli/src/command.rs index a52c9d53bc25..d3d7b65f0a50 100644 --- a/datafusion-cli/src/command.rs +++ b/datafusion-cli/src/command.rs @@ -26,9 +26,9 @@ use datafusion::arrow::array::{ArrayRef, StringArray}; use datafusion::arrow::datatypes::{DataType, Field, Schema}; use datafusion::arrow::record_batch::RecordBatch; use datafusion::common::exec_err; +use datafusion::common::instant::Instant; use datafusion::error::{DataFusionError, Result}; use datafusion::prelude::SessionContext; -use datafusion_common::instant::Instant; use std::fs::File; use std::io::BufReader; use std::str::FromStr; diff --git a/datafusion-cli/src/exec.rs b/datafusion-cli/src/exec.rs index 53375ab4104f..be7e5275e8b2 100644 --- a/datafusion-cli/src/exec.rs +++ b/datafusion-cli/src/exec.rs @@ -41,7 +41,7 @@ use datafusion::prelude::SessionContext; use datafusion::sql::parser::{DFParser, Statement}; use datafusion::sql::sqlparser::dialect::dialect_from_str; -use datafusion_common::FileType; +use datafusion::common::FileType; use rustyline::error::ReadlineError; use rustyline::Editor; use tokio::signal; @@ -350,8 +350,8 @@ pub(crate) async fn register_object_store_and_config_extensions( mod tests { use super::*; - use datafusion_common::config::FormatOptions; - use datafusion_common::plan_err; + use datafusion::common::config::FormatOptions; + use datafusion::common::plan_err; use url::Url; diff --git a/datafusion-cli/src/helper.rs b/datafusion-cli/src/helper.rs index 8b196484ee2c..85f14c1736dc 100644 --- a/datafusion-cli/src/helper.rs +++ b/datafusion-cli/src/helper.rs @@ -20,7 +20,7 @@ use std::borrow::Cow; -use datafusion::common::sql_err; +use datafusion::common::sql_datafusion_err; use datafusion::error::DataFusionError; use datafusion::sql::parser::{DFParser, Statement}; use datafusion::sql::sqlparser::dialect::dialect_from_str; @@ -189,10 +189,9 @@ pub fn unescape_input(input: &str) -> datafusion::error::Result { 't' => '\t', '\\' => '\\', _ => { - return sql_err!(ParserError::TokenizerError(format!( - "unsupported escape char: '\\{}'", - next_char - ),)) + return Err(sql_datafusion_err!(ParserError::TokenizerError( + format!("unsupported escape char: '\\{}'", next_char) + ))) } }); } diff --git a/datafusion-cli/src/object_storage.rs b/datafusion-cli/src/object_storage.rs index 94560cb9d8da..1178c0aad650 100644 --- a/datafusion-cli/src/object_storage.rs +++ b/datafusion-cli/src/object_storage.rs @@ -19,13 +19,13 @@ use std::any::Any; use std::fmt::{Debug, Display}; use std::sync::Arc; +use datafusion::common::config::{ + ConfigEntry, ConfigExtension, ConfigField, ExtensionOptions, TableOptions, Visit, +}; use datafusion::common::{exec_datafusion_err, exec_err, internal_err}; use datafusion::error::{DataFusionError, Result}; use datafusion::execution::context::SessionState; use datafusion::prelude::SessionContext; -use datafusion_common::config::{ - ConfigEntry, ConfigExtension, ConfigField, ExtensionOptions, TableOptions, Visit, -}; use async_trait::async_trait; use aws_credential_types::provider::ProvideCredentials; diff --git a/datafusion-cli/src/print_options.rs b/datafusion-cli/src/print_options.rs index 93630c8d48f8..bede5dd15eb6 100644 --- a/datafusion-cli/src/print_options.rs +++ b/datafusion-cli/src/print_options.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use datafusion_common::instant::Instant; +use datafusion::common::instant::Instant; use std::fmt::{Display, Formatter}; use std::io::Write; use std::pin::Pin;