From 4526f40ee2a0d88dc5934e25f0478463c9173e0a Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sat, 22 Apr 2023 21:36:44 -0700 Subject: [PATCH 1/2] Re-organize the features to be alphabetical for easier parsing --- rust/Cargo.toml | 15 +++++++-------- rust/README.md | 10 +++++----- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index db1ffe396f..a26253f2c1 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -91,6 +91,7 @@ utime = "0.3" glibc_version = { path = "../glibc_version", version = "0.1" } [features] +azure = ["object_store/azure"] default = ["arrow", "parquet"] datafusion = [ "dep:datafusion", @@ -104,8 +105,13 @@ datafusion = [ "parquet", ] datafusion-ext = ["datafusion"] -azure = ["object_store/azure"] gcs = ["object_store/gcp"] +glue = ["s3", "rusoto_glue/rustls"] +glue-native-tls = ["s3-native-tls", "rusoto_glue"] +hdfs = ["datafusion-objectstore-hdfs"] +# used only for integration testing +integration_test = ["fs_extra", "tempdir"] +python = ["arrow/pyarrow"] s3-native-tls = [ "rusoto_core/native-tls", "rusoto_credential", @@ -124,13 +130,6 @@ s3 = [ "object_store/aws", "object_store/aws_profile", ] -hdfs = ["datafusion-objectstore-hdfs"] -glue-native-tls = ["s3-native-tls", "rusoto_glue"] -glue = ["s3", "rusoto_glue/rustls"] -python = ["arrow/pyarrow"] - -# used only for integration testing -integration_test = ["fs_extra", "tempdir"] [[bench]] name = "read_checkpoint" diff --git a/rust/README.md b/rust/README.md index cc98b4e777..7e43b43f3d 100644 --- a/rust/README.md +++ b/rust/README.md @@ -41,15 +41,15 @@ cargo run --example read_delta_table ## Optional cargo package features -- `s3` - enable the S3 storage backend to work with Delta Tables in AWS S3. Uses [rustls](https://github.com/ctz/rustls). -- `s3-native-tls` - enable the S3 storage backend but rely on OpenSSL. -- `glue` - enable the Glue data catalog to work with Delta Tables with AWS Glue. - `azure` - enable the Azure storage backend to work with Delta Tables in Azure Data Lake Storage Gen2 accounts. -- `gcs` - enable the Google storage backend to work with Delta Tables in Google Cloud Storage. - `datafusion` - enable the `datafusion::datasource::TableProvider` trait implementation for Delta Tables, allowing them to be queried using [DataFusion](https://github.com/apache/arrow-datafusion). - `datafusion-ext` - DEPRECATED: alias for `datafusion` feature -- `parquet2` - use parquet2 for checkpoint deserialization. Since `arrow` and `parquet` features are enabled by default for backwards compatibility, this feature needs to be used with `--no-default-features`. +- `gcs` - enable the Google storage backend to work with Delta Tables in Google Cloud Storage. +- `glue` - enable the Glue data catalog to work with Delta Tables with AWS Glue. - `hdfs` - enable the HDFS storage backend to work with Delta Tables in HDFS. +- `parquet2` - use parquet2 for checkpoint deserialization. Since `arrow` and `parquet` features are enabled by default for backwards compatibility, this feature needs to be used with `--no-default-features`. +- `s3` - enable the S3 storage backend to work with Delta Tables in AWS S3. Uses [rustls](https://github.com/ctz/rustls). +- `s3-native-tls` - enable the S3 storage backend but rely on OpenSSL. ## Development From 5f0474fbd810c1fb51daaf0e2071dcaab6868a93 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sat, 22 Apr 2023 21:37:58 -0700 Subject: [PATCH 2/2] Add the `json` feature to compile json support for parquet I figure we can use this feature for other JSONy things too --- rust/Cargo.toml | 2 +- rust/README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index a26253f2c1..3e2b23c866 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -32,7 +32,6 @@ once_cell = "1.16.0" parking_lot = "0.12" parquet = { version = "36", features = [ "async", - "json", "object_store", ], optional = true } parquet2 = { version = "0.17", optional = true } @@ -111,6 +110,7 @@ glue-native-tls = ["s3-native-tls", "rusoto_glue"] hdfs = ["datafusion-objectstore-hdfs"] # used only for integration testing integration_test = ["fs_extra", "tempdir"] +json = ["parquet/json"] python = ["arrow/pyarrow"] s3-native-tls = [ "rusoto_core/native-tls", diff --git a/rust/README.md b/rust/README.md index 7e43b43f3d..659de48566 100644 --- a/rust/README.md +++ b/rust/README.md @@ -47,6 +47,7 @@ cargo run --example read_delta_table - `gcs` - enable the Google storage backend to work with Delta Tables in Google Cloud Storage. - `glue` - enable the Glue data catalog to work with Delta Tables with AWS Glue. - `hdfs` - enable the HDFS storage backend to work with Delta Tables in HDFS. +- `json` - enable the JSON feature of the `parquet` crate for better JSON interoperability. - `parquet2` - use parquet2 for checkpoint deserialization. Since `arrow` and `parquet` features are enabled by default for backwards compatibility, this feature needs to be used with `--no-default-features`. - `s3` - enable the S3 storage backend to work with Delta Tables in AWS S3. Uses [rustls](https://github.com/ctz/rustls). - `s3-native-tls` - enable the S3 storage backend but rely on OpenSSL.