pub mod alias;
pub mod cast;
mod column;
pub mod config;
mod dfschema;
pub mod display;
mod error;
pub mod file_options;
pub mod format;
mod functional_dependencies;
mod join_type;
pub mod parsers;
#[cfg(feature = "pyarrow")]
mod pyarrow;
pub mod scalar;
mod schema_reference;
pub mod stats;
mod table_reference;
pub mod test_util;
pub mod tree_node;
mod unnest;
pub mod utils;
pub use column::Column;
pub use dfschema::{DFField, 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::{
FileCompressionType, FileType, GetExt, DEFAULT_ARROW_EXTENSION,
DEFAULT_AVRO_EXTENSION, DEFAULT_CSV_EXTENSION, DEFAULT_JSON_EXTENSION,
DEFAULT_PARQUET_EXTENSION,
};
pub use file_options::FileTypeWriterOptions;
pub use functional_dependencies::{
aggregate_functional_dependencies, get_target_functional_dependencies, Constraints,
Dependency, FunctionalDependence, FunctionalDependencies,
};
pub use join_type::{JoinConstraint, JoinType};
pub use scalar::{ScalarType, ScalarValue};
pub use schema_reference::{OwnedSchemaReference, SchemaReference};
pub use stats::{ColumnStatistics, Statistics};
pub use table_reference::{OwnedTableReference, ResolvedTableReference, TableReference};
pub use unnest::UnnestOptions;
pub use utils::project_schema;
#[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>>()
))
})?
}};
}