Apache DataFusion SQL Query Engine
ARROW-11626: [Rust][DataFusion] Move [DataFusion] examples to own project
Heres, Daniel72d4de4a9236
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex 90831341d6..1dd220ade9 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -116,8 +116,8 @@ jobs:# run tests on all workspace members with default feature listcargo test# test datafusion examples- cd datafusion- cargo test --no-default-features --features cli+ cd datafusion-examples+ cargo test --no-default-featurescargo run --example csv_sqlcargo run --example parquet_sqlcd ..diff --git a/dev/release/00-prepare-test.rb b/dev/release/00-prepare-test.rbindex b686ecd97d..53bd5e89bf 100644--- a/dev/release/00-prepare-test.rb+++ b/dev/release/00-prepare-test.rb@@ -288,6 +288,13 @@ class PrepareTest < Test::Unit::TestCase"+version = \"#{@release_version}\""],],},+ {+ path: "rust/datafusion-examples/Cargo.toml",+ hunks: [+ ["-version = \"#{@snapshot_version}\"",+ "+version = \"#{@release_version}\""],+ ],+ },{path: "rust/datafusion/Cargo.toml",hunks: [@@ -297,8 +304,6 @@ class PrepareTest < Test::Unit::TestCase"-parquet = { path = \"../parquet\", version = \"#{@snapshot_version}\", features = [\"arrow\"] }","+arrow = { path = \"../arrow\", version = \"#{@release_version}\", features = [\"prettyprint\"] }","+parquet = { path = \"../parquet\", version = \"#{@release_version}\", features = [\"arrow\"] }"],- ["-arrow-flight = { path = \"../arrow-flight\", version = \"#{@snapshot_version}\" }",- "+arrow-flight = { path = \"../arrow-flight\", version = \"#{@release_version}\" }"]],},{@@ -535,6 +540,13 @@ class PrepareTest < Test::Unit::TestCase"+version = \"#{@next_snapshot_version}\""],],},+ {+ path: "rust/datafusion-examples/Cargo.toml",+ hunks: [+ ["-version = \"#{@release_version}\"",+ "+version = \"#{@next_snapshot_version}\""],+ ],+ },{path: "rust/datafusion/Cargo.toml",hunks: [@@ -544,8 +556,6 @@ class PrepareTest < Test::Unit::TestCase"-parquet = { path = \"../parquet\", version = \"#{@release_version}\", features = [\"arrow\"] }","+arrow = { path = \"../arrow\", version = \"#{@next_snapshot_version}\", features = [\"prettyprint\"] }","+parquet = { path = \"../parquet\", version = \"#{@next_snapshot_version}\", features = [\"arrow\"] }"],- ["-arrow-flight = { path = \"../arrow-flight\", version = \"#{@release_version}\" }",- "+arrow-flight = { path = \"../arrow-flight\", version = \"#{@next_snapshot_version}\" }"]],},{diff --git a/rust/Cargo.toml b/rust/Cargo.tomlindex 16e34de7f1..c29900429b 100644--- a/rust/Cargo.toml+++ b/rust/Cargo.toml@@ -22,6 +22,7 @@ members = ["parquet_derive","parquet_derive_test","datafusion",+ "datafusion-examples","arrow-flight","integration-testing","benchmarks",diff --git a/rust/datafusion-examples/Cargo.toml b/rust/datafusion-examples/Cargo.tomlnew file mode 100644index 0000000000..c86e7ccbe3--- /dev/null+++ b/rust/datafusion-examples/Cargo.toml@@ -0,0 +1,39 @@+# Licensed to the Apache Software Foundation (ASF) under one+# or more contributor license agreements. See the NOTICE file+# distributed with this work for additional information+# regarding copyright ownership. The ASF licenses this file+# to you under the Apache License, Version 2.0 (the+# "License"); you may not use this file except in compliance+# with the License. You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing,+# software distributed under the License is distributed on an+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+# KIND, either express or implied. See the License for the+# specific language governing permissions and limitations+# under the License.++[package]+name = "datafusion-examples"+description = "DataFusion usage examples"+version = "4.0.0-SNAPSHOT"+homepage = "https://github.com/apache/arrow"+repository = "https://github.com/apache/arrow"+authors = ["Apache Arrow <[email protected]>"]+license = "Apache-2.0"+keywords = [ "arrow", "query", "sql" ]+edition = "2018"+publish = false+++[dev-dependencies]+datafusion = { path = "../datafusion" }+arrow = { path = "../arrow" }+prost = "0.7"+arrow-flight = { path = "../arrow-flight" }+tonic = "0.4"+tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync"] }+futures = "0.3"+num_cpus = "1.13.0"diff --git a/rust/datafusion/examples/README.md b/rust/datafusion-examples/examples/README.mdsimilarity index 100%rename from rust/datafusion/examples/README.mdrename to rust/datafusion-examples/examples/README.mddiff --git a/rust/datafusion/examples/csv_sql.rs b/rust/datafusion-examples/examples/csv_sql.rssimilarity index 100%rename from rust/datafusion/examples/csv_sql.rsrename to rust/datafusion-examples/examples/csv_sql.rsdiff --git a/rust/datafusion/examples/dataframe.rs b/rust/datafusion-examples/examples/dataframe.rssimilarity index 100%rename from rust/datafusion/examples/dataframe.rsrename to rust/datafusion-examples/examples/dataframe.rsdiff --git a/rust/datafusion/examples/dataframe_in_memory.rs b/rust/datafusion-examples/examples/dataframe_in_memory.rssimilarity index 100%rename from rust/datafusion/examples/dataframe_in_memory.rsrename to rust/datafusion-examples/examples/dataframe_in_memory.rsdiff --git a/rust/datafusion/examples/flight_client.rs b/rust/datafusion-examples/examples/flight_client.rssimilarity index 100%rename from rust/datafusion/examples/flight_client.rsrename to rust/datafusion-examples/examples/flight_client.rsdiff --git a/rust/datafusion/examples/flight_server.rs b/rust/datafusion-examples/examples/flight_server.rssimilarity index 100%rename from rust/datafusion/examples/flight_server.rsrename to rust/datafusion-examples/examples/flight_server.rsdiff --git a/rust/datafusion/examples/parquet_sql.rs b/rust/datafusion-examples/examples/parquet_sql.rssimilarity index 100%rename from rust/datafusion/examples/parquet_sql.rsrename to rust/datafusion-examples/examples/parquet_sql.rsdiff --git a/rust/datafusion/examples/simple_udaf.rs b/rust/datafusion-examples/examples/simple_udaf.rssimilarity index 100%rename from rust/datafusion/examples/simple_udaf.rsrename to rust/datafusion-examples/examples/simple_udaf.rsdiff --git a/rust/datafusion/examples/simple_udf.rs b/rust/datafusion-examples/examples/simple_udf.rssimilarity index 100%rename from rust/datafusion/examples/simple_udf.rsrename to rust/datafusion-examples/examples/simple_udf.rsdiff --git a/rust/datafusion/Cargo.toml b/rust/datafusion/Cargo.tomlindex 94e56a41e7..3236a97124 100644--- a/rust/datafusion/Cargo.toml+++ b/rust/datafusion/Cargo.toml@@ -75,9 +75,6 @@ lazy_static = { version = "^1.4.0", optional = true }rand = "0.8"criterion = "0.3"tempfile = "3"-prost = "0.7"-arrow-flight = { path = "../arrow-flight", version = "4.0.0-SNAPSHOT" }-tonic = "0.4"doc-comment = "0.3"[[bench]]