Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions rust/datafusion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ name = "datafusion-cli"
path = "src/bin/main.rs"

[features]
default = ["cli", "crypto_expressions"]
default = ["cli", "crypto_expressions", "regex_expressions", "unicode_expressions"]
cli = ["rustyline"]
simd = ["arrow/simd"]
crypto_expressions = ["md-5", "sha2"]
regex_expressions = ["regex", "lazy_static"]
unicode_expressions = ["unicode-segmentation"]

[dependencies]
ahash = "0.7"
Expand All @@ -65,7 +67,9 @@ log = "^0.4"
md-5 = { version = "^0.9.1", optional = true }
sha2 = { version = "^0.9.1", optional = true }
ordered-float = "2.0"
unicode-segmentation = "^1.7.1"
unicode-segmentation = { version = "^1.7.1", optional = true }
regex = { version = "^1.4.3", optional = true }
lazy_static = { version = "^1.4.0", optional = true }

[dev-dependencies]
rand = "0.8"
Expand Down
7 changes: 6 additions & 1 deletion rust/datafusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,20 @@ DataFusion includes a simple command-line interactive SQL utility. See the [CLI
- [x] lpad
- [x] ltrim
- [x] octet_length
- [x] regexp_replace
- [x] repeat
- [x] replace
- [x] reverse
- [x] right
- [x] rpad
- [x] rtrim
- [x] split_part
- [x] starts_with
- [x] strpos
- [x] substr
- [x] to_hex
- [x] translate
- [x] trim

- Miscellaneous/Boolean functions
- [x] nullif
- Common date/time functions
Expand Down
4 changes: 4 additions & 0 deletions rust/datafusion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,7 @@ pub mod variable;

#[cfg(test)]
pub mod test;

#[macro_use]
#[cfg(feature = "regex_expressions")]
extern crate lazy_static;
6 changes: 6 additions & 0 deletions rust/datafusion/src/logical_plan/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,8 @@ unary_scalar_expr!(Lpad, lpad);
unary_scalar_expr!(Ltrim, ltrim);
unary_scalar_expr!(MD5, md5);
unary_scalar_expr!(OctetLength, octet_length);
unary_scalar_expr!(RegexpReplace, regexp_replace);
unary_scalar_expr!(Replace, replace);
unary_scalar_expr!(Repeat, repeat);
unary_scalar_expr!(Reverse, reverse);
unary_scalar_expr!(Right, right);
Expand All @@ -1099,8 +1101,12 @@ unary_scalar_expr!(SHA224, sha224);
unary_scalar_expr!(SHA256, sha256);
unary_scalar_expr!(SHA384, sha384);
unary_scalar_expr!(SHA512, sha512);
unary_scalar_expr!(SplitPart, split_part);
unary_scalar_expr!(StartsWith, starts_with);
unary_scalar_expr!(Strpos, strpos);
unary_scalar_expr!(Substr, substr);
unary_scalar_expr!(ToHex, to_hex);
unary_scalar_expr!(Translate, translate);
unary_scalar_expr!(Trim, trim);
unary_scalar_expr!(Upper, upper);

Expand Down
5 changes: 3 additions & 2 deletions rust/datafusion/src/logical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ pub use expr::{
ceil, character_length, chr, col, combine_filters, concat, concat_ws, cos, count,
count_distinct, create_udaf, create_udf, exp, exprlist_to_fields, floor, in_list,
initcap, left, length, lit, ln, log10, log2, lower, lpad, ltrim, max, md5, min,
octet_length, or, repeat, reverse, right, round, rpad, rtrim, sha224, sha256, sha384,
sha512, signum, sin, sqrt, substr, sum, tan, to_hex, trim, trunc, upper, when, Expr,
octet_length, or, regexp_replace, repeat, replace, reverse, right, round, rpad,
rtrim, sha224, sha256, sha384, sha512, signum, sin, split_part, sqrt, starts_with,
strpos, substr, sum, tan, to_hex, translate, trim, trunc, upper, when, Expr,
ExprRewriter, ExpressionVisitor, Literal, Recursion,
};
pub use extension::UserDefinedLogicalNode;
Expand Down
Loading