Skip to content

Commit

Permalink
Merge branch 'apache:main' into feature/lpad_utf8view
Browse files Browse the repository at this point in the history
  • Loading branch information
Omega359 authored Aug 14, 2024
2 parents e5fc0ce + e4be013 commit c7fadc2
Show file tree
Hide file tree
Showing 109 changed files with 3,743 additions and 2,516 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/dev_pr/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,37 @@ logical-expr:

physical-expr:
- changed-files:
- any-glob-to-any-file: ['datafusion/physical-expr/**/*']
- any-glob-to-any-file: ['datafusion/physical-expr/**/*', 'datafusion/physical-expr-common/**/*', 'datafusion/physical-expr-aggregate/**/*', 'datafusion/physical-plan/**/*']

catalog:
- changed-files:
- any-glob-to-any-file: ['datafusion/catalog/**/*']

common:
- changed-files:
- any-glob-to-any-file: ['datafusion/common/**/*', 'datafusion/common-runtime/**/*']

execution:
- changed-files:
- any-glob-to-any-file: ['datafusion/execution/**/*']

functions:
- changed-files:
- any-glob-to-any-file: ['datafusion/functions/**/*', 'datafusion/functions-aggregate/**/*', 'datafusion/functions-aggregate-common', 'datafusion/functions-nested']


optimizer:
- changed-files:
- any-glob-to-any-file: ['datafusion/optimizer/**/*']
- any-glob-to-any-file: ['datafusion/optimizer/**/*', 'datafusion/physical-optimizer/**/*']

core:
- changed-files:
- any-glob-to-any-file: ['datafusion/core/**/*']

proto:
- changed-files:
- any-glob-to-any-file: ['datafusion/proto/**/*', 'datafusion/proto-common/**/*']

substrait:
- changed-files:
- any-glob-to-any-file: ['datafusion/substrait/**/*']
Expand Down
68 changes: 35 additions & 33 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions datafusion/catalog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

[package]
name = "datafusion-catalog"
description = "datafusion-catalog"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
Expand Down
1 change: 1 addition & 0 deletions datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ libc = "0.2.140"
num_cpus = { workspace = true }
object_store = { workspace = true, optional = true }
parquet = { workspace = true, optional = true, default-features = true }
paste = "1.0.15"
pyo3 = { version = "0.21.0", optional = true }
sqlparser = { workspace = true }

Expand Down
71 changes: 31 additions & 40 deletions datafusion/common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,6 @@ macro_rules! unwrap_or_internal_err {
};
}

macro_rules! with_dollar_sign {
($($body:tt)*) => {
macro_rules! __with_dollar_sign { $($body)* }
__with_dollar_sign!($);
}
}

/// Add a macros for concise DataFusionError::* errors declaration
/// supports placeholders the same way as `format!`
/// Examples:
Expand All @@ -501,37 +494,41 @@ macro_rules! with_dollar_sign {
/// `NAME_DF_ERR` - macro name for wrapping DataFusionError::*. Needed to keep backtrace opportunity
/// in construction where DataFusionError::* used directly, like `map_err`, `ok_or_else`, etc
macro_rules! make_error {
($NAME_ERR:ident, $NAME_DF_ERR: ident, $ERR:ident) => {
with_dollar_sign! {
($d:tt) => {
/// Macro wraps `$ERR` to add backtrace feature
#[macro_export]
macro_rules! $NAME_DF_ERR {
($d($d args:expr),*) => {
$crate::DataFusionError::$ERR(
format!(
"{}{}",
format!($d($d args),*),
$crate::DataFusionError::get_back_trace(),
).into()
)
}
($NAME_ERR:ident, $NAME_DF_ERR: ident, $ERR:ident) => { make_error!(@inner ($), $NAME_ERR, $NAME_DF_ERR, $ERR); };
(@inner ($d:tt), $NAME_ERR:ident, $NAME_DF_ERR:ident, $ERR:ident) => {
::paste::paste!{
/// Macro wraps `$ERR` to add backtrace feature
#[macro_export]
macro_rules! $NAME_DF_ERR {
($d($d args:expr),*) => {
$crate::DataFusionError::$ERR(
::std::format!(
"{}{}",
::std::format!($d($d args),*),
$crate::DataFusionError::get_back_trace(),
).into()
)
}
}

/// Macro wraps Err(`$ERR`) to add backtrace feature
#[macro_export]
macro_rules! $NAME_ERR {
($d($d args:expr),*) => {
Err($crate::DataFusionError::$ERR(
format!(
"{}{}",
format!($d($d args),*),
$crate::DataFusionError::get_back_trace(),
).into()
))
}
/// Macro wraps Err(`$ERR`) to add backtrace feature
#[macro_export]
macro_rules! $NAME_ERR {
($d($d args:expr),*) => {
Err($crate::[<_ $NAME_DF_ERR>]!($d($d args),*))
}
}


// Note: Certain macros are used in this crate, but not all.
// This macro generates a use or all of them in case they are needed
// so we allow unused code to avoid warnings when they are not used
#[doc(hidden)]
#[allow(unused)]
pub use $NAME_ERR as [<_ $NAME_ERR>];
#[doc(hidden)]
#[allow(unused)]
pub use $NAME_DF_ERR as [<_ $NAME_DF_ERR>];
}
};
}
Expand Down Expand Up @@ -613,12 +610,6 @@ macro_rules! schema_err {

// To avoid compiler error when using macro in the same crate:
// macros from the current crate cannot be referred to by absolute paths
pub use config_err as _config_err;
pub use internal_datafusion_err as _internal_datafusion_err;
pub use internal_err as _internal_err;
pub use not_impl_err as _not_impl_err;
pub use plan_datafusion_err as _plan_datafusion_err;
pub use plan_err as _plan_err;
pub use schema_err as _schema_err;

/// Create a "field not found" DataFusion::SchemaError
Expand Down
Loading

0 comments on commit c7fadc2

Please sign in to comment.