Skip to content

Commit

Permalink
feat: implement more expr_to_sql functionality (#9578)
Browse files Browse the repository at this point in the history
* more impls

* fix tests

* cargo update dfcli

* fix custom_dialect test

* add tests and feature flag

* fix comment

* remove chrono use arrow-array conversions

* fix cargo lock again

* fix count distinct

* retry windows ci

* retry windows ci again

* add roundtrip tests

* cargo fmt
  • Loading branch information
devinjdangelo authored Mar 14, 2024
1 parent 8b4a8e6 commit 5911d18
Show file tree
Hide file tree
Showing 6 changed files with 338 additions and 82 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Default features:
- `parquet`: support for reading the [Apache Parquet] format
- `regex_expressions`: regular expression functions, such as `regexp_match`
- `unicode_expressions`: Include unicode aware functions such as `character_length`
- `unparser` : enables support to reverse LogicalPlans back into SQL

Optional features:

Expand Down
1 change: 1 addition & 0 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion datafusion/sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ name = "datafusion_sql"
path = "src/lib.rs"

[features]
default = ["unicode_expressions"]
default = ["unicode_expressions", "unparser"]
unicode_expressions = []
unparser = []

[dependencies]
arrow = { workspace = true }
arrow-array = { workspace = true }
arrow-schema = { workspace = true }
datafusion-common = { workspace = true, default-features = true }
datafusion-expr = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions datafusion/sql/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ mod relation;
mod select;
mod set_expr;
mod statement;
#[cfg(feature = "unparser")]
pub mod unparser;
pub mod utils;
mod values;
Expand Down
Loading

0 comments on commit 5911d18

Please sign in to comment.