Skip to content

Commit

Permalink
deprecation warning in extendr-warappers.R -> *.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
sorhawell committed Aug 4, 2023
1 parent 5aee11f commit 7b761c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions R/extendr-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,7 @@ LazyFrame$groupby <- function(exprs, maintain_order) .Call(wrap__LazyFrame__grou

LazyFrame$with_columns <- function(exprs) .Call(wrap__LazyFrame__with_columns, self, exprs)

LazyFrame$with_column <- function(expr) {
warning("`with_column()` is deprecated and will be removed in polars 0.9.0. Please use `with_columns()` instead.")
.Call(wrap__LazyFrame__with_column, self, expr)
}
LazyFrame$with_column <- function(expr) .Call(wrap__LazyFrame__with_column, self, expr)

LazyFrame$with_row_count <- function(name, offset) .Call(wrap__LazyFrame__with_row_count, self, name, offset)

Expand Down
2 changes: 2 additions & 0 deletions src/rust/src/lazy/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ impl LazyFrame {
}

fn with_column(&self, expr: &Expr) -> LazyFrame {
R!("warning('`with_column()` is deprecated and will be removed in polars 0.9.0. Please use `with_columns()` instead.')")
.expect("warning wil not fail");
LazyFrame(self.0.clone().with_column(expr.0.clone()))
}

Expand Down

0 comments on commit 7b761c9

Please sign in to comment.