diff --git a/README.md b/README.md index 158033d40599f..23f28be5a5bee 100644 --- a/README.md +++ b/README.md @@ -106,32 +106,9 @@ Please see the [contributor guide] and [communication] pages for more informatio ## Crate features -This crate has several [features] which can be specified in your `Cargo.toml`. +Please see the [Crate features section of the user guide] for available features -[features]: https://doc.rust-lang.org/cargo/reference/features.html - -Default features: - -- `nested_expressions`: functions for working with nested type function such as `array_to_string` -- `compression`: reading files compressed with `xz2`, `bzip2`, `flate2`, and `zstd` -- `crypto_expressions`: cryptographic functions such as `md5` and `sha256` -- `datetime_expressions`: date and time functions such as `to_timestamp` -- `encoding_expressions`: `encode` and `decode` functions -- `parquet`: support for reading the [Apache Parquet] format -- `regex_expressions`: regular expression functions, such as `regexp_match` -- `unicode_expressions`: Include unicode aware functions such as `character_length` -- `unparser`: enables support to reverse LogicalPlans back into SQL -- `recursive_protection`: uses [recursive](https://docs.rs/recursive/latest/recursive/) for stack overflow protection. - -Optional features: - -- `avro`: support for reading the [Apache Avro] format -- `backtrace`: include backtrace information in error messages -- `pyarrow`: conversions between PyArrow and DataFusion types -- `serde`: enable arrow-schema's `serde` feature - -[apache avro]: https://avro.apache.org/ -[apache parquet]: https://parquet.apache.org/ +[crate features section of the user guide]: https://datafusion.apache.org/user-guide/crate-configuration.html#crate-features ## Rust Version Compatibility Policy diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index 4b6d8f274932f..a418b3df15b6f 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -57,8 +57,10 @@ default = [ "datetime_expressions", "encoding_expressions", "regex_expressions", + "math_expressions", "string_expressions", "unicode_expressions", + "unparser", "compression", "parquet", "recursive_protection", @@ -86,6 +88,7 @@ serde = [ "arrow-schema/serde", ] string_expressions = ["datafusion-functions/string_expressions"] +unparser = ["datafusion-sql/unparser"] unicode_expressions = [ "datafusion-sql/unicode_expressions", "datafusion-functions/unicode_expressions", diff --git a/docs/source/user-guide/crate-configuration.md b/docs/source/user-guide/crate-configuration.md index f4a1910f5f78f..edb9dd99c570c 100644 --- a/docs/source/user-guide/crate-configuration.md +++ b/docs/source/user-guide/crate-configuration.md @@ -25,7 +25,47 @@ control DataFusion's behavior. [configuration settings]: configs.md -## Add latest non published DataFusion dependency +## Crate features + +The `datafusion` crate has several [features] which can be specified in your `Cargo.toml`. For example +to enable support for `avro` you can put the following in your `Cargo.toml`: + +```toml +datafusion = { version = "45", features = ["avro"] } +``` + +[features]: https://doc.rust-lang.org/cargo/reference/features.html + +You can always check the [Cargo.toml] file for the most up to date list of features. + +[cargo.toml]: https://github.com/apache/datafusion/blob/main/datafusion/core/Cargo.toml#L39 + +### Default features: + +- `compression`: reading files compressed with `xz2`, `bzip2`, `flate2`, and `zstd` +- `crypto_expressions`: cryptographic functions such as `md5` and `sha256` +- `datetime_expressions`: date and time functions such as `to_timestamp` +- `encoding_expressions`: `encode` and `decode` functions +- `math_expressions`: `sqrt` and other math functions +- `nested_expressions`: functions for working with nested type function such as `array_to_string` +- `parquet`: support for reading the [Apache Parquet] format +- `string_expressions`: string functions such as `concat` +- `recursive_protection`: uses [recursive](https://docs.rs/recursive/latest/recursive/) for stack overflow protection. +- `regex_expressions`: regular expression functions, such as `regexp_match` +- `unicode_expressions`: Include unicode aware functions such as `character_length` +- `unparser`: enables support to reverse LogicalPlans back into SQL + +### Optional features: + +- `avro`: support for reading the [Apache Avro] format +- `backtrace`: include backtrace information in error messages +- `pyarrow`: conversions between PyArrow and DataFusion types +- `serde`: enable arrow-schema's `serde` feature + +[apache avro]: https://avro.apache.org/ +[apache parquet]: https://parquet.apache.org/ + +## Use latest non published DataFusion dependency DataFusion changes are published to `crates.io` according to the [release schedule](https://github.com/apache/datafusion/blob/main/dev/release/README.md#release-process)