From 6129621947496a833fd5561971ae59c4236049c4 Mon Sep 17 00:00:00 2001 From: Michael Lutsiuk Date: Mon, 31 May 2021 20:04:18 +0300 Subject: [PATCH] Examples section in datafusion crate. Instructions how to run them --- datafusion/src/lib.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/datafusion/src/lib.rs b/datafusion/src/lib.rs index b6f64feb70d2..5b8c9c13006a 100644 --- a/datafusion/src/lib.rs +++ b/datafusion/src/lib.rs @@ -182,6 +182,35 @@ //! * declare and use user-defined aggregate functions ([`AggregateUDF`](physical_plan::udaf::AggregateUDF)) //! //! you can find examples of each of them in examples section. +//! +//! ## Examples +//! +//! Examples are located in [datafusion-examples directory](https://github.com/apache/arrow-datafusion/tree/master/datafusion-examples) +//! +//! Here's how to run them +//! +//! ```bash +//! git clone https://github.com/apache/arrow-datafusion +//! cd arrow-datafusion +//! # Download test data +//! git submodule update --init +//! export PARQUET_TEST_DATA=parquet-testing/data +//! export ARROW_TEST_DATA=testing/data +//! +//! cargo run --example csv_sql +//! +//! cargo run --example parquet_sql +//! +//! cargo run --example dataframe +//! +//! cargo run --example dataframe_in_memory +//! +//! cargo run --example parquet_sql +//! +//! cargo run --example simple_udaf +//! +//! cargo run --example simple_udf +//! ``` extern crate sqlparser;