Expand description
re-export of datafusion_common
crate
Modules§
- alias
- arrow
- A complete, safe, native Rust implementation of Apache Arrow, a cross-language development platform for in-memory data.
- cast
- This module provides DataFusion specific casting functions
that provide error handling. They are intended to “never fail”
but provide an error message rather than a panic, as the corresponding
kernels in arrow-rs such as
as_boolean_array
do. - config
- Runtime configuration, via
ConfigOptions
- cse
- Common Subexpression Elimination logic implemented in
CSE
can be controlled with aCSEController
, that defines how to eliminate common subtrees from a particularTreeNode
tree. - display
- Types for plan display
- error
- DataFusion error types
- file_
options - Options related to how files should be written
- format
- hash_
utils - Functionality used both on logical and physical plans
- instant
- WASM-compatible
Instant
wrapper. - parsers
- Interval parsing logic
- rounding
- Floating point rounding mode utility library TODO: Remove this custom implementation and the “libc” dependency when floating-point rounding mode manipulation functions become available in Rust.
- runtime
- re-export of
datafusion_common_runtime
crate - scalar
ScalarValue
: stores single values- stats
- This module provides data structures to represent statistics
- test_
util - Utility functions to make testing DataFusion based crates easier
- tree_
node TreeNode
for visiting and rewriting expression and plan trees- types
- utils
- This module provides the bisect function, which implements binary search.
Macros§
- _config_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - _exec_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - _internal_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - _not_
impl_ datafusion_ err - Macro wraps
$ERR
to add backtrace feature - _plan_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - _resources_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - _substrait_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - arrow_
datafusion_ err - arrow_
err - assert_
batches_ eq - Compares formatted output of a record batch with an expected vector of strings, with the result of pretty formatting record batches. This is a macro so errors appear on the correct line
- assert_
batches_ sorted_ eq - Compares formatted output of a record batch with an expected vector of strings in a way that order does not matter. This is a macro so errors appear on the correct line
- assert_
contains - A macro to assert that one string is contained within another with a nice error message if they are not.
- assert_
not_ contains - A macro to assert that one string is NOT contained within another with a nice error message if they are are.
- config_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - config_
err - Macro wraps Err(
$ERR
) to add backtrace feature - config_
field - context
- create_
array - downcast_
value - Downcast an Arrow Array to a concrete type, return an
DataFusionError::Internal
if the cast is not possible. In normal usage of DataFusion the downcast should always succeed. - exec_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - exec_
err - Macro wraps Err(
$ERR
) to add backtrace feature - extensions_
options - Convenience macro to create
ExtensionsOptions
. - internal_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - internal_
err - Macro wraps Err(
$ERR
) to add backtrace feature - not_
impl_ datafusion_ err - Macro wraps
$ERR
to add backtrace feature - not_
impl_ err - Macro wraps Err(
$ERR
) to add backtrace feature - plan_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - plan_
err - Macro wraps Err(
$ERR
) to add backtrace feature - record_
batch - Creates a record batch from literal slice of values, suitable for rapid testing and development.
- resources_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - resources_
err - Macro wraps Err(
$ERR
) to add backtrace feature - schema_
datafusion_ err - schema_
err - sql_
datafusion_ err - sql_err
- substrait_
datafusion_ err - Macro wraps
$ERR
to add backtrace feature - substrait_
err - Macro wraps Err(
$ERR
) to add backtrace feature - unwrap_
or_ internal_ err - Unwrap an
Option
if possible. Otherwise return anDataFusionError::Internal
. In normal usage of DataFusion the unwrap should always succeed.
Structs§
- Column
- A named reference to a qualified field in a schema.
- Column
Statistics - Statistics for a column within a relation
- Constraints
- This object encapsulates a list of functional constraints:
- DFSchema
- DFSchema wraps an Arrow schema and adds relation names.
- Functional
Dependence - This object defines a functional dependence in the schema. A functional dependence defines a relationship between determinant keys and dependent columns. A determinant key is a column, or a set of columns, whose value uniquely determines values of some other (dependent) columns. If two rows have the same determinant key, dependent columns in these rows are necessarily the same. If the determinant key is unique, the set of dependent columns is equal to the entire schema and the determinant key can serve as a primary key. Note that a primary key may “downgrade” into a determinant key due to an operation such as a join, and this object is used to track dependence relationships in such cases. For more information on functional dependencies, see: https://www.scaler.com/topics/dbms/functional-dependency-in-dbms/
- Functional
Dependencies - This object encapsulates all functional dependencies in a given relation.
- Recursion
Unnest Option - Instruction on how to unnest a column (mostly with a list type) such as how to name the output, and how many level it should be unnested
- Resolved
Table Reference - A fully resolved path to a table of the form “catalog.schema.table”
- Statistics
- Statistics for a relation Fields are optional and can be inexact because the sources sometimes provide approximate estimates for performance reasons and the transformations output are not always predictable.
- Unnest
Options - Options for unnesting a column that contains a list type, replicating values in the other, non nested rows.
Enums§
- Constraint
- This object defines a constraint on a table.
- Data
Fusion Error - DataFusion error
- Dependency
- Describes functional dependency mode.
- Join
Constraint - Join constraint
- Join
Side - Join side. Stores the referred table side during calculations
- Join
Type - Join type
- Param
Values - The parameter value corresponding to the placeholder
- Scalar
Value - A dynamically typed, nullable single value.
- Schema
Error - Schema-related errors
- Schema
Reference - Table
Reference - A multi part identifier (path) to a table that may require further
resolution (e.g.
foo.bar
).
Constants§
- DEFAULT_
ARROW_ EXTENSION - The default file extension of arrow files
- DEFAULT_
AVRO_ EXTENSION - The default file extension of avro files
- DEFAULT_
CSV_ EXTENSION - The default file extension of csv files
- DEFAULT_
JSON_ EXTENSION - The default file extension of json files
- DEFAULT_
PARQUET_ EXTENSION - The default file extension of parquet files
Traits§
- Expr
Schema - Provides schema information needed by certain methods of
Expr
(defined in the datafusion-common crate). - GetExt
- Define each
FileType
/FileCompressionType
’s extension - Scalar
Type - Trait used to map a NativeType to a ScalarValue
- Schema
Ext - DataFusion-specific extensions to
Schema
. - ToDF
Schema - Convenience trait to convert Schema like things to DFSchema and DFSchemaRef with fewer keystrokes
Functions§
- aggregate_
functional_ dependencies - Calculates functional dependencies for aggregate output, when there is a GROUP BY expression.
- field_
not_ found - Create a “field not found” DataFusion::SchemaError
- get_
required_ group_ by_ exprs_ indices - Returns indices for the minimal subset of GROUP BY expressions that are functionally equivalent to the original set of GROUP BY expressions.
- get_
target_ functional_ dependencies - Returns target indices, for the determinant keys that are inside group by expressions.
- project_
schema - Applies an optional projection to a
SchemaRef
, returning the projected schema - qualified_
name - unqualified_
field_ not_ found - Convenience wrapper over
field_not_found
for when there is no qualifier
Type Aliases§
- DFSchema
Ref - A reference-counted reference to a DFSchema.
- HashMap
- HashSet
- Result
- Result type for operations that could result in an DataFusionError
- Shared
Result - Result type for operations that could result in an DataFusionError and needs to be shared (wrapped into
Arc
).