-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: clean up dependencies and feature flags #1014
Merged
+79
−57
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
09a45a3
chore: update datafusion dependencies
roeap ecb1c87
test: add test for reading non string partitions
roeap 3b9d027
chore: use chrono without default features
roeap b1b566e
fix: move profile code behind feature flag
roeap c55878f
Apply suggestions from code review
roeap d47dcfd
chore: merge main
roeap 9b858f5
chore: remove test added elsewhere
roeap b0a13e3
Merge branch 'main' into dependencies
roeap 363b6d3
refactor: enable aws-profile for s3 features
roeap f294b20
fix: update missed feature flag
roeap 90b9979
docs: remove outdated feature docs
roeap a6277a9
build: allow building with no-default-features
roeap 3eaa2bd
fix: fmt
roeap 26c1153
fix: remove outdated feature flags
roeap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
Deltalake | ||
========= | ||
# Deltalake | ||
|
||
[![crates.io](https://img.shields.io/crates/v/deltalake.svg?style=flat-square)](https://crates.io/crates/deltalake) | ||
[![api_doc](https://img.shields.io/badge/doc-api-blue)](https://docs.rs/deltalake) | ||
|
||
Native Delta Lake implementation in Rust | ||
|
||
|
||
Usage | ||
----- | ||
## Usage | ||
|
||
### API | ||
|
||
|
@@ -17,7 +14,6 @@ let table = deltalake::open_table("./tests/data/simple_table").await.unwrap(); | |
println!("{}", table.get_files()); | ||
``` | ||
|
||
|
||
### CLI | ||
|
||
```bash | ||
|
@@ -43,20 +39,18 @@ Examples can be run using the `cargo run --example` command. For example: | |
cargo run --example read_delta_table | ||
``` | ||
|
||
Optional cargo package features | ||
----------------------- | ||
## Optional cargo package features | ||
|
||
- `s3` - enable the S3 storage backend to work with Delta Tables in AWS S3. | ||
- `s3-rustls` - enable the S3 storage backend but rely on [rustls](https://github.com/ctz/rustls) rather than OpenSSL (`native-tls`). | ||
- `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-ext` - enable the `datafusion::datasource::TableProvider` trait implementation for Delta Tables, allowing them to be queried using [DataFusion](https://github.com/apache/arrow-datafusion). | ||
- `datafusion` - enable the `datafusion::datasource::TableProvider` trait implementation for Delta Tables, allowing them to be queried using [DataFusion](https://github.com/apache/arrow-datafusion). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
- `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`. | ||
|
||
|
||
Development | ||
----------- | ||
## Development | ||
|
||
To run s3 integration tests from local machine, we use docker-compose to stand | ||
up AWS local stack. To spin up the test environment run `docker-compose up` in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,8 +41,11 @@ | |
//! or Azure Blob Storage / Azure Data Lake Storage Gen2 (ADLS2). Use `s3-rustls` to use Rust TLS | ||
//! instead of native TLS implementation. | ||
//! - `glue` - enable the Glue data catalog to work with Delta Tables with AWS Glue. | ||
//! - `datafusion-ext` - enable the `datafusion::datasource::TableProvider` trait implementation | ||
//! - `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`. | ||
//! | ||
//! # Querying Delta Tables with Datafusion | ||
//! | ||
|
@@ -64,23 +67,18 @@ | |
//! .await.unwrap(); | ||
//! }; | ||
//! ``` | ||
//! | ||
//! It's important to note that the DataFusion library is evolving quickly, often with breaking api | ||
//! changes, and this may cause compilation issues as a result. If you are having issues with the most | ||
//! recently released `delta-rs` you can set a specific branch or commit in your `Cargo.toml`. | ||
//! | ||
//! ```toml | ||
//! datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "07bc2c754805f536fe1cd873dbe6adfc0a21cbb3" } | ||
//! ``` | ||
|
||
#![deny(warnings)] | ||
#![deny(missing_docs)] | ||
|
||
#[cfg(all(feature = "parquet", feature = "parquet2"))] | ||
compile_error!( | ||
"Feature parquet and parquet2 are mutually exclusive and cannot be enabled together" | ||
"Features parquet and parquet2 are mutually exclusive and cannot be enabled together" | ||
); | ||
|
||
#[cfg(all(feature = "s3", feature = "s3-rustls"))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
compile_error!("Features s3 and s3-rustls are mutually exclusive and cannot be enabled together"); | ||
|
||
pub mod action; | ||
pub mod builder; | ||
pub mod data_catalog; | ||
|
@@ -98,11 +96,11 @@ pub mod vacuum; | |
pub mod checkpoints; | ||
#[cfg(all(feature = "arrow", feature = "parquet"))] | ||
pub mod delta_arrow; | ||
#[cfg(feature = "datafusion-ext")] | ||
#[cfg(feature = "datafusion")] | ||
pub mod delta_datafusion; | ||
#[cfg(all(feature = "arrow", feature = "parquet"))] | ||
pub mod operations; | ||
#[cfg(feature = "parquet")] | ||
#[cfg(all(feature = "arrow", feature = "parquet"))] | ||
pub mod optimize; | ||
#[cfg(all(feature = "arrow", feature = "parquet"))] | ||
pub mod writer; | ||
|
@@ -117,7 +115,7 @@ pub use object_store::{path::Path, Error as ObjectStoreError, ObjectMeta, Object | |
// convenience exports for consumers to avoid aligning crate versions | ||
#[cfg(feature = "arrow")] | ||
pub use arrow; | ||
#[cfg(feature = "datafusion-ext")] | ||
#[cfg(feature = "datafusion")] | ||
pub use datafusion; | ||
#[cfg(all(feature = "arrow", feature = "parquet"))] | ||
pub use operations::DeltaOps; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also add aws-profile in the default feature list? profile based auth is a very common practice in production environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add it as default to s3* features, since those are the only ones where it is useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!