Skip to content

Commit

Permalink
chore(rust): Rename lazy-regex feature to regex to align polars
Browse files Browse the repository at this point in the history
… with `polars-lazy` crate (pola-rs#13647)
  • Loading branch information
stinodego authored and r-brink committed Jan 24, 2024
1 parent 133ba88 commit b46abb4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/polars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ is_first_distinct = ["polars-lazy?/is_first_distinct", "polars-ops/is_first_dist
is_in = ["polars-lazy?/is_in"]
is_last_distinct = ["polars-lazy?/is_last_distinct", "polars-ops/is_last_distinct"]
is_unique = ["polars-lazy?/is_unique", "polars-ops/is_unique"]
lazy_regex = ["polars-lazy?/regex"]
regex = ["polars-lazy?/regex"]
list_any_all = ["polars-lazy?/list_any_all"]
list_count = ["polars-ops/list_count", "polars-lazy?/list_count"]
list_drop_nulls = ["polars-lazy?/list_drop_nulls"]
Expand Down
2 changes: 1 addition & 1 deletion crates/polars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
//!
//! * `performant` - Longer compile times more fast paths.
//! * `lazy` - Lazy API
//! - `lazy_regex` - Use regexes in [column selection]
//! - `regex` - Use regexes in [column selection]
//! - `dot_diagram` - Create dot diagrams from lazy logical plans.
//! * `sql` - Pass SQL queries to polars.
//! * `streaming` - Be able to process datasets that are larger than RAM.
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The opt-in features are:
- `dtype-categorical`
- `dtype-struct`
- `lazy` - Lazy API
- `lazy_regex` - Use regexes in [column selection](crate::lazy::dsl::col)
- `regex` - Use regexes in [column selection](crate::lazy::dsl::col)
- `dot_diagram` - Create dot diagrams from lazy logical plans.
- `sql` - Pass SQL queries to polars.
- `streaming` - Be able to process datasets that are larger than RAM.
Expand Down
4 changes: 2 additions & 2 deletions py-polars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ streaming = ["polars/streaming"]
meta = ["polars/meta"]
search_sorted = ["polars/search_sorted"]
decompress = ["polars/decompress-fast"]
lazy_regex = ["polars/lazy_regex"]
regex = ["polars/regex"]
csv = ["polars/csv"]
object = ["polars/object"]
extract_jsonpath = ["polars/extract_jsonpath"]
Expand Down Expand Up @@ -215,7 +215,7 @@ all = [
"dtypes",
"meta",
"decompress",
"lazy_regex",
"regex",
"build_info",
"sql",
"binary_encoding",
Expand Down
8 changes: 4 additions & 4 deletions py-polars/src/expr/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl PyExpr {
self.inner.clone().str().len_chars().into()
}

#[cfg(feature = "lazy_regex")]
#[cfg(feature = "regex")]
fn str_replace_n(&self, pat: Self, val: Self, literal: bool, n: i64) -> Self {
self.inner
.clone()
Expand All @@ -132,7 +132,7 @@ impl PyExpr {
.into()
}

#[cfg(feature = "lazy_regex")]
#[cfg(feature = "regex")]
fn str_replace_all(&self, pat: Self, val: Self, literal: bool) -> Self {
self.inner
.clone()
Expand All @@ -158,7 +158,7 @@ impl PyExpr {
}

#[pyo3(signature = (pat, literal, strict))]
#[cfg(feature = "lazy_regex")]
#[cfg(feature = "regex")]
fn str_contains(&self, pat: Self, literal: Option<bool>, strict: bool) -> Self {
match literal {
Some(true) => self.inner.clone().str().contains_literal(pat.inner).into(),
Expand All @@ -167,7 +167,7 @@ impl PyExpr {
}

#[pyo3(signature = (pat, literal, strict))]
#[cfg(feature = "lazy_regex")]
#[cfg(feature = "regex")]
fn str_find(&self, pat: Self, literal: Option<bool>, strict: bool) -> Self {
match literal {
Some(true) => self.inner.clone().str().find_literal(pat.inner).into(),
Expand Down

0 comments on commit b46abb4

Please sign in to comment.