Skip to content

Commit

Permalink
Fix DataFusionError use in schema_err macro (apache#13488)
Browse files Browse the repository at this point in the history
Use declaring-crate-relative references so that macro use place does not
need to import symbols it doesn't use.
  • Loading branch information
findepi authored Nov 20, 2024
1 parent ecc04d4 commit a2f4878
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datafusion/common/src/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use arrow_schema::{Field, FieldRef};

use crate::error::_schema_err;
use crate::utils::{parse_identifiers_normalized, quote_identifier};
use crate::{DFSchema, DataFusionError, Result, SchemaError, TableReference};
use crate::{DFSchema, Result, SchemaError, TableReference};
use std::collections::HashSet;
use std::convert::Infallible;
use std::fmt;
Expand Down
8 changes: 4 additions & 4 deletions datafusion/common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,9 @@ macro_rules! arrow_err {
#[macro_export]
macro_rules! schema_datafusion_err {
($ERR:expr) => {
DataFusionError::SchemaError(
$crate::error::DataFusionError::SchemaError(
$ERR,
Box::new(Some(DataFusionError::get_back_trace())),
Box::new(Some($crate::error::DataFusionError::get_back_trace())),
)
};
}
Expand All @@ -609,9 +609,9 @@ macro_rules! schema_datafusion_err {
#[macro_export]
macro_rules! schema_err {
($ERR:expr) => {
Err(DataFusionError::SchemaError(
Err($crate::error::DataFusionError::SchemaError(
$ERR,
Box::new(Some(DataFusionError::get_back_trace())),
Box::new(Some($crate::error::DataFusionError::get_back_trace())),
))
};
}
Expand Down

0 comments on commit a2f4878

Please sign in to comment.