diff --git a/datafusion-examples/examples/regex_count.rs b/datafusion-examples/examples/regex_count.rs deleted file mode 100644 index 93ec705ff6cc..000000000000 --- a/datafusion-examples/examples/regex_count.rs +++ /dev/null @@ -1,33 +0,0 @@ -use datafusion::common::Result; -use datafusion::prelude::{CsvReadOptions, SessionContext}; - -#[tokio::main] -async fn main() -> Result<()> { - let ctx = SessionContext::new(); - ctx.register_csv( - "examples", - "../../datafusion/physical-expr/tests/data/regex.csv", - CsvReadOptions::new(), - ) - .await?; - - // - // - //regexp_count examples - // - // - // regexp_count format is (regexp_count(text, regex[, flags]) - // - - // use sql and regexp_count function to test col 'values', against patterns in col 'patterns' without flags - let result = ctx - .sql("select regexp_count(values, patterns) from examples") - .await? - .collect() - .await?; - - println!("{:?}", result); - assert_eq!(result.len(), 1); - - Ok(()) -} diff --git a/datafusion/functions/Cargo.toml b/datafusion/functions/Cargo.toml index 337379a74670..c793b8e6464e 100644 --- a/datafusion/functions/Cargo.toml +++ b/datafusion/functions/Cargo.toml @@ -52,7 +52,7 @@ encoding_expressions = ["base64", "hex"] # enable math functions math_expressions = [] # enable regular expressions -regex_expressions = ["regex"] +regex_expressions = ["regex", "string_expressions"] # enable string functions string_expressions = ["uuid"] # enable unicode functions