diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 90831341d6c..1dd220ade94 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 list cargo test # test datafusion examples - cd datafusion - cargo test --no-default-features --features cli + cd datafusion-examples + cargo test --no-default-features cargo run --example csv_sql cargo run --example parquet_sql cd .. diff --git a/dev/release/00-prepare-test.rb b/dev/release/00-prepare-test.rb index b686ecd97d1..53bd5e89bf2 100644 --- a/dev/release/00-prepare-test.rb +++ b/dev/release/00-prepare-test.rb @@ -288,6 +288,13 @@ def test_version_pre_tag "+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 @@ def test_version_pre_tag "-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 @@ def test_version_post_tag "+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 @@ def test_version_post_tag "-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.toml index 16e34de7f14..c29900429b2 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.toml new file mode 100644 index 00000000000..c86e7ccbe3c --- /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 "] +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.md similarity index 100% rename from rust/datafusion/examples/README.md rename to rust/datafusion-examples/examples/README.md diff --git a/rust/datafusion/examples/csv_sql.rs b/rust/datafusion-examples/examples/csv_sql.rs similarity index 100% rename from rust/datafusion/examples/csv_sql.rs rename to rust/datafusion-examples/examples/csv_sql.rs diff --git a/rust/datafusion/examples/dataframe.rs b/rust/datafusion-examples/examples/dataframe.rs similarity index 100% rename from rust/datafusion/examples/dataframe.rs rename to rust/datafusion-examples/examples/dataframe.rs diff --git a/rust/datafusion/examples/dataframe_in_memory.rs b/rust/datafusion-examples/examples/dataframe_in_memory.rs similarity index 100% rename from rust/datafusion/examples/dataframe_in_memory.rs rename to rust/datafusion-examples/examples/dataframe_in_memory.rs diff --git a/rust/datafusion/examples/flight_client.rs b/rust/datafusion-examples/examples/flight_client.rs similarity index 100% rename from rust/datafusion/examples/flight_client.rs rename to rust/datafusion-examples/examples/flight_client.rs diff --git a/rust/datafusion/examples/flight_server.rs b/rust/datafusion-examples/examples/flight_server.rs similarity index 100% rename from rust/datafusion/examples/flight_server.rs rename to rust/datafusion-examples/examples/flight_server.rs diff --git a/rust/datafusion/examples/parquet_sql.rs b/rust/datafusion-examples/examples/parquet_sql.rs similarity index 100% rename from rust/datafusion/examples/parquet_sql.rs rename to rust/datafusion-examples/examples/parquet_sql.rs diff --git a/rust/datafusion/examples/simple_udaf.rs b/rust/datafusion-examples/examples/simple_udaf.rs similarity index 100% rename from rust/datafusion/examples/simple_udaf.rs rename to rust/datafusion-examples/examples/simple_udaf.rs diff --git a/rust/datafusion/examples/simple_udf.rs b/rust/datafusion-examples/examples/simple_udf.rs similarity index 100% rename from rust/datafusion/examples/simple_udf.rs rename to rust/datafusion-examples/examples/simple_udf.rs diff --git a/rust/datafusion/Cargo.toml b/rust/datafusion/Cargo.toml index 94e56a41e7d..3236a97124d 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]]