This is an automated email from the ASF dual-hosted git repository.

comphead pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new c843226d84 doc: Add example how to include latest datafusion (#9076)
c843226d84 is described below

commit c843226d84f79fa7ce99576ae8605ecef1a28484
Author: comphead <[email protected]>
AuthorDate: Wed Jan 31 13:51:58 2024 -0800

    doc: Add example how to include latest datafusion (#9076)
    
    * doc: Add example how to include latest datafusion
    
    * rm unused block
    
    * Update docs/source/user-guide/example-usage.md
    
    Co-authored-by: Andrew Lamb <[email protected]>
    
    ---------
    
    Co-authored-by: Andrew Lamb <[email protected]>
---
 docs/source/user-guide/example-usage.md | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/docs/source/user-guide/example-usage.md 
b/docs/source/user-guide/example-usage.md
index 77b196c124..fd525608d3 100644
--- a/docs/source/user-guide/example-usage.md
+++ b/docs/source/user-guide/example-usage.md
@@ -23,7 +23,7 @@ In this example some simple processing is performed on the 
[`example.csv`](https
 
 Even [`more code 
examples`](https://github.com/apache/arrow-datafusion/tree/main/datafusion-examples)
 attached to the project.
 
-## Update `Cargo.toml`
+## Add DataFusion as a dependency
 
 Find latest available Datafusion version on [DataFusion's
 crates.io] page. Add the dependency to your `Cargo.toml` file:
@@ -33,6 +33,29 @@ datafusion = "31"
 tokio = "1.0"
 ```
 
+## Add DataFusion latest codebase as a dependency
+
+Cargo supports adding dependency directly from Github which allows testing out 
latest DataFusion codebase without waiting the code to be released to crates.io
+according to the [DataFusion release 
schedule](https://github.com/apache/arrow-datafusion/blob/main/dev/release/README.md#release-process)
+
+```toml
+datafusion = { git = "https://github.com/apache/arrow-datafusion";, branch = 
"main"}
+```
+
+Also it works on the package level
+
+```toml
+datafusion-common = { git = "https://github.com/apache/arrow-datafusion";, 
branch = "main", package = "datafusion-common"}
+```
+
+And with features
+
+```toml
+datafusion = { git = "https://github.com/apache/arrow-datafusion";, branch = 
"main", default-features = false, features = ["unicode_expressions"] }
+```
+
+More on [Cargo 
dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies)
+
 ## Run a SQL query against data stored in a CSV:
 
 ```rust
@@ -239,7 +262,7 @@ like error backtrace. To enable a backtrace you need to add 
Datafusion `backtrac
 datafusion = { version = "31.0.0", features = ["backtrace"]}
 ```
 
-Set environment [`variables`] 
https://doc.rust-lang.org/std/backtrace/index.html#environment-variables
+Set environment 
[variables](https://doc.rust-lang.org/std/backtrace/index.html#environment-variables)
 
 ```bash
 RUST_BACKTRACE=1 ./target/debug/datafusion-cli

Reply via email to