Skip to content

Commit

Permalink
Run all datafusion-examples in CI tests (#3761)
Browse files Browse the repository at this point in the history
* Run more examples in CI

* fix compilation

* Do not run tests twice

* Add expr_api to example
  • Loading branch information
alamb authored Oct 12, 2022
1 parent 4cb8ac0 commit 7179c54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,25 @@ jobs:
run: |
export PATH=$PATH:$HOME/d/protoc/bin
cargo test --features avro,jit,scheduler,json
- name: Run examples
run: |
export PATH=$PATH:$HOME/d/protoc/bin
# test datafusion-sql examples
cargo run --example sql
# test datafusion examples
cd datafusion-examples
# test datafusion-examples
cargo run --example avro_sql --features=datafusion/avro
cargo run --example csv_sql
cargo run --example custom_datasource
cargo run --example dataframe
cargo run --example dataframe_in_memory
cargo run --example deserialize_to_struct
cargo run --example expr_api
cargo run --example parquet_sql
cargo run --example avro_sql --features=datafusion/avro
cargo run --example parquet_sql_multiple_files
cargo run --example memtable
cargo run --example simple_udf
cargo run --example simple_udaf
integration-test:
name: "Compare to postgres"
Expand Down
6 changes: 3 additions & 3 deletions datafusion-examples/examples/parquet_sql_multiple_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ async fn main() -> Result<()> {
// execute the query
let df = ctx
.sql(
"SELECT int_col, double_col, CAST(date_string_col as VARCHAR) \
FROM alltypes_plain \
WHERE id > 1 AND tinyint_col < double_col",
"SELECT * \
FROM my_table \
LIMIT 1",
)
.await?;

Expand Down

0 comments on commit 7179c54

Please sign in to comment.