Skip to content

Commit

Permalink
docs(rust): Fix user_guide of str.split
Browse files Browse the repository at this point in the history
  • Loading branch information
reswqa committed Sep 18, 2023
1 parent 040c53b commit 6f373d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/src/rust/user-guide/expressions/lists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let out = weather
.clone()
.lazy()
.with_columns([col("temperatures").str().split(" ")])
.with_columns([col("temperatures").str().split(lit(" "))])
.collect()?;
println!("{}", &out);
// --8<-- [end:string_to_list]
Expand All @@ -30,7 +30,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let out = weather
.clone()
.lazy()
.with_columns([col("temperatures").str().split(" ")])
.with_columns([col("temperatures").str().split(lit(" "))])
.explode(["temperatures"])
.collect()?;
println!("{}", &out);
Expand All @@ -40,7 +40,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let out = weather
.clone()
.lazy()
.with_columns([col("temperatures").str().split(" ")])
.with_columns([col("temperatures").str().split(lit(" "))])
.with_columns([
col("temperatures").list().head(lit(3)).alias("top3"),
col("temperatures")
Expand All @@ -59,7 +59,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.lazy()
.with_columns([col("temperatures")
.str()
.split(" ")
.split(lit(" "))
.list()
.eval(col("").cast(DataType::Int64).is_null(), false)
.list()
Expand All @@ -75,7 +75,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.lazy()
.with_columns([col("temperatures")
.str()
.split(" ")
.split(lit(" "))
.list()
.eval(col("").str().contains(lit("(?i)[a-z]"), false), false)
.list()
Expand Down

0 comments on commit 6f373d1

Please sign in to comment.