Skip to content

Commit

Permalink
fix compilation lazy + string (#2914)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Mar 16, 2022
1 parent f071601 commit 43f7e39
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion polars/polars-lazy/src/dsl/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl StringNameSpace {
}

/// Split the string by a substring.
// Split exactly `n` times by a given substring. The resulting dtype is `List<Utf8>`.
pub fn split(self, by: &str) -> Expr {
let by = by.to_string();

Expand All @@ -110,6 +111,8 @@ impl StringNameSpace {
.with_fmt("str.split")
}

#[cfg(feature = "dtype-struct")]
// Split exactly `n` times by a given substring. The resulting dtype is [`DataType::Struct`].
pub fn split_exact(self, by: &str, n: usize) -> Expr {
let by = by.to_string();

Expand Down Expand Up @@ -159,6 +162,9 @@ impl StringNameSpace {
.with_fmt("str.split_exact")
}

#[cfg(feature = "dtype-struct")]
// Split exactly `n` times by a given substring and keep the substring.
// The resulting dtype is [`DataType::Struct`].
pub fn split_exact_inclusive(self, by: &str, n: usize) -> Expr {
let by = by.to_string();

Expand Down Expand Up @@ -208,7 +214,8 @@ impl StringNameSpace {
.with_fmt("str.split_exact")
}

/// Split the string by a substring.
/// Split the string by a substring and keep the substring.
// Split exactly `n` times by a given substring. The resulting dtype is `List<Utf8>`.
pub fn split_inclusive(self, by: &str) -> Expr {
let by = by.to_string();

Expand Down

0 comments on commit 43f7e39

Please sign in to comment.