#![deny(clippy::clone_on_ref_ptr)]
mod column;
mod dfschema;
mod functional_dependencies;
mod join_type;
mod param_value;
#[cfg(feature = "pyarrow")]
mod pyarrow;
mod schema_reference;
mod table_reference;
mod unnest;
pub mod alias;
pub mod cast;
pub mod config;
pub mod cse;
pub mod display;
pub mod error;
pub mod file_options;
pub mod format;
pub mod hash_utils;
pub mod instant;
pub mod parsers;
pub mod rounding;
pub mod scalar;
pub mod stats;
pub mod test_util;
pub mod tree_node;
pub mod types;
pub mod utils;
pub use arrow;
pub use column::Column;
pub use dfschema::{
qualified_name, DFSchema, DFSchemaRef, ExprSchema, SchemaExt, ToDFSchema,
};
pub use error::{
field_not_found, unqualified_field_not_found, DataFusionError, Result, SchemaError,
SharedResult,
};
pub use file_options::file_type::{
GetExt, DEFAULT_ARROW_EXTENSION, DEFAULT_AVRO_EXTENSION, DEFAULT_CSV_EXTENSION,
DEFAULT_JSON_EXTENSION, DEFAULT_PARQUET_EXTENSION,
};
pub use functional_dependencies::{
aggregate_functional_dependencies, get_required_group_by_exprs_indices,
get_target_functional_dependencies, Constraint, Constraints, Dependency,
FunctionalDependence, FunctionalDependencies,
};
pub use join_type::{JoinConstraint, JoinSide, JoinType};
pub use param_value::ParamValues;
pub use scalar::{ScalarType, ScalarValue};
pub use schema_reference::SchemaReference;
pub use stats::{ColumnStatistics, Statistics};
pub use table_reference::{ResolvedTableReference, TableReference};
pub use unnest::{RecursionUnnestOption, UnnestOptions};
pub use utils::project_schema;
#[doc(hidden)]
pub use error::{
_config_datafusion_err, _exec_datafusion_err, _internal_datafusion_err,
_not_impl_datafusion_err, _plan_datafusion_err, _resources_datafusion_err,
_substrait_datafusion_err,
};
#[macro_export]
macro_rules! downcast_value {
($Value: expr, $Type: ident) => {{
use std::any::type_name;
$Value.as_any().downcast_ref::<$Type>().ok_or_else(|| {
DataFusionError::Internal(format!(
"could not cast value to {}",
type_name::<$Type>()
))
})?
}};
($Value: expr, $Type: ident, $T: tt) => {{
use std::any::type_name;
$Value.as_any().downcast_ref::<$Type<$T>>().ok_or_else(|| {
DataFusionError::Internal(format!(
"could not cast value to {}",
type_name::<$Type<$T>>()
))
})?
}};
}