Skip to content

Commit

Permalink
refactor!: Rename structs in Rust to rename classes in R (#554)
Browse files Browse the repository at this point in the history
Co-authored-by: eitsupi <ts1s1andn@gmail.com>
  • Loading branch information
etiennebacher and eitsupi authored Dec 1, 2023
1 parent 7c684fb commit 396caf9
Show file tree
Hide file tree
Showing 126 changed files with 1,669 additions and 1,625 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: polars
Title: Lightning-Fast 'DataFrame' Library
Version: 0.11.0.9000
Version: 0.11.0.9001
Depends: R (>= 4.2)
Imports: utils, codetools
Authors@R:
Expand Down
264 changes: 132 additions & 132 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Generated by roxygen2: do not edit by hand

S3method("!",Expr)
S3method("!=",Expr)
S3method("!",RPolarsExpr)
S3method("!=",RPolarsDataType)
S3method("!=",Series)
S3method("$",ChainedThen)
S3method("$",ChainedWhen)
S3method("$",DataFrame)
S3method("$",DataTypeVector)
S3method("$",Expr)
S3method("!=",RPolarsExpr)
S3method("!=",RPolarsSeries)
S3method("$",ExprBinNameSpace)
S3method("$",ExprCatNameSpace)
S3method("$",ExprDTNameSpace)
Expand All @@ -18,167 +13,172 @@ S3method("$",ExprNameNameSpace)
S3method("$",ExprStrNameSpace)
S3method("$",ExprStructNameSpace)
S3method("$",GroupBy)
S3method("$",LazyFrame)
S3method("$",LazyGroupBy)
S3method("$",ProtoExprArray)
S3method("$",RField)
S3method("$",RNullValues)
S3method("$",RPolarsChainedThen)
S3method("$",RPolarsChainedWhen)
S3method("$",RPolarsDataFrame)
S3method("$",RPolarsDataType)
S3method("$",RPolarsDataTypeVector)
S3method("$",RPolarsErr)
S3method("$",RPolarsExpr)
S3method("$",RPolarsLazyFrame)
S3method("$",RPolarsLazyGroupBy)
S3method("$",RPolarsProtoExprArray)
S3method("$",RPolarsRField)
S3method("$",RPolarsRNullValues)
S3method("$",RPolarsRThreadHandle)
S3method("$",RPolarsSQLContext)
S3method("$",RPolarsSeries)
S3method("$",RPolarsStringCacheHolder)
S3method("$",RThreadHandle)
S3method("$",Series)
S3method("$",Then)
S3method("$",VecDataFrame)
S3method("$",When)
S3method("$",RPolarsThen)
S3method("$",RPolarsVecDataFrame)
S3method("$",RPolarsWhen)
S3method("$",pl_polars_env)
S3method("$",private_polars_env)
S3method("$<-",DataFrame)
S3method("$<-",RField)
S3method("%%",Expr)
S3method("%/%",Expr)
S3method("&",Expr)
S3method("*",Expr)
S3method("*",Series)
S3method("+",Expr)
S3method("+",Series)
S3method("-",Expr)
S3method("-",Series)
S3method("/",Expr)
S3method("/",Series)
S3method("<",Expr)
S3method("<",Series)
S3method("<=",Expr)
S3method("<=",Series)
S3method("==",Expr)
S3method("$<-",RPolarsDataFrame)
S3method("$<-",RPolarsRField)
S3method("%%",RPolarsExpr)
S3method("%/%",RPolarsExpr)
S3method("&",RPolarsExpr)
S3method("*",RPolarsExpr)
S3method("*",RPolarsSeries)
S3method("+",RPolarsExpr)
S3method("+",RPolarsSeries)
S3method("-",RPolarsExpr)
S3method("-",RPolarsSeries)
S3method("/",RPolarsExpr)
S3method("/",RPolarsSeries)
S3method("<",RPolarsExpr)
S3method("<",RPolarsSeries)
S3method("<=",RPolarsExpr)
S3method("<=",RPolarsSeries)
S3method("==",RPolarsDataType)
S3method("==",Series)
S3method(">",Expr)
S3method(">",Series)
S3method(">=",Expr)
S3method(">=",Series)
S3method("[",DataFrame)
S3method("==",RPolarsExpr)
S3method("==",RPolarsSeries)
S3method(">",RPolarsExpr)
S3method(">",RPolarsSeries)
S3method(">=",RPolarsExpr)
S3method(">=",RPolarsSeries)
S3method("[",ExprListNameSpace)
S3method("[",LazyFrame)
S3method("[",Series)
S3method("[",RPolarsDataFrame)
S3method("[",RPolarsLazyFrame)
S3method("[",RPolarsSeries)
S3method("[",rpolars_raw_list)
S3method("[[",ChainedThen)
S3method("[[",ChainedWhen)
S3method("[[",DataFrame)
S3method("[[",DataTypeVector)
S3method("[[",Expr)
S3method("[[",GroupBy)
S3method("[[",LazyFrame)
S3method("[[",LazyGroupBy)
S3method("[[",ProtoExprArray)
S3method("[[",RField)
S3method("[[",RNullValues)
S3method("[[",RPolarsChainedThen)
S3method("[[",RPolarsChainedWhen)
S3method("[[",RPolarsDataFrame)
S3method("[[",RPolarsDataType)
S3method("[[",RPolarsDataTypeVector)
S3method("[[",RPolarsErr)
S3method("[[",RPolarsExpr)
S3method("[[",RPolarsLazyFrame)
S3method("[[",RPolarsLazyGroupBy)
S3method("[[",RPolarsProtoExprArray)
S3method("[[",RPolarsRField)
S3method("[[",RPolarsRNullValues)
S3method("[[",RPolarsRThreadHandle)
S3method("[[",RPolarsSQLContext)
S3method("[[",RPolarsSeries)
S3method("[[",RPolarsStringCacheHolder)
S3method("[[",RThreadHandle)
S3method("[[",Series)
S3method("[[",Then)
S3method("[[",VecDataFrame)
S3method("[[",When)
S3method("^",Expr)
S3method("|",Expr)
S3method(.DollarNames,ChainedThen)
S3method(.DollarNames,ChainedWhen)
S3method(.DollarNames,DataFrame)
S3method(.DollarNames,Expr)
S3method("[[",RPolarsThen)
S3method("[[",RPolarsVecDataFrame)
S3method("[[",RPolarsWhen)
S3method("^",RPolarsExpr)
S3method("|",RPolarsExpr)
S3method(.DollarNames,GroupBy)
S3method(.DollarNames,LazyFrame)
S3method(.DollarNames,RField)
S3method(.DollarNames,RPolarsChainedThen)
S3method(.DollarNames,RPolarsChainedWhen)
S3method(.DollarNames,RPolarsDataFrame)
S3method(.DollarNames,RPolarsErr)
S3method(.DollarNames,RPolarsExpr)
S3method(.DollarNames,RPolarsLazyFrame)
S3method(.DollarNames,RPolarsRField)
S3method(.DollarNames,RPolarsRThreadHandle)
S3method(.DollarNames,RPolarsSQLContext)
S3method(.DollarNames,RThreadHandle)
S3method(.DollarNames,Series)
S3method(.DollarNames,Then)
S3method(.DollarNames,VecDataFrame)
S3method(.DollarNames,When)
S3method(.DollarNames,RPolarsSeries)
S3method(.DollarNames,RPolarsThen)
S3method(.DollarNames,RPolarsVecDataFrame)
S3method(.DollarNames,RPolarsWhen)
S3method(.DollarNames,method_environment)
S3method(as.character,RPolarsErr)
S3method(as.character,RThreadHandle)
S3method(as.character,Series)
S3method(as.data.frame,DataFrame)
S3method(as.data.frame,LazyFrame)
S3method(as.list,Expr)
S3method(as.character,RPolarsRThreadHandle)
S3method(as.character,RPolarsSeries)
S3method(as.data.frame,RPolarsDataFrame)
S3method(as.data.frame,RPolarsLazyFrame)
S3method(as.list,RPolarsExpr)
S3method(as.list,rpolars_raw_list)
S3method(as.matrix,DataFrame)
S3method(as.matrix,LazyFrame)
S3method(as.vector,Series)
S3method(as.matrix,RPolarsDataFrame)
S3method(as.matrix,RPolarsLazyFrame)
S3method(as.vector,RPolarsSeries)
S3method(as_polars_df,ArrowTabular)
S3method(as_polars_df,DataFrame)
S3method(as_polars_df,GroupBy)
S3method(as_polars_df,LazyFrame)
S3method(as_polars_df,LazyGroupBy)
S3method(as_polars_df,Series)
S3method(as_polars_df,RPolarsDataFrame)
S3method(as_polars_df,RPolarsLazyFrame)
S3method(as_polars_df,RPolarsLazyGroupBy)
S3method(as_polars_df,RPolarsSeries)
S3method(as_polars_df,data.frame)
S3method(as_polars_df,default)
S3method(as_polars_lf,LazyFrame)
S3method(as_polars_lf,LazyGroupBy)
S3method(as_polars_lf,RPolarsLazyFrame)
S3method(as_polars_lf,RPolarsLazyGroupBy)
S3method(as_polars_lf,default)
S3method(as_polars_series,POSIXlt)
S3method(as_polars_series,default)
S3method(as_polars_series,vctrs_rcrd)
S3method(c,Series)
S3method(dim,DataFrame)
S3method(dim,LazyFrame)
S3method(dimnames,DataFrame)
S3method(dimnames,LazyFrame)
S3method(head,DataFrame)
S3method(head,LazyFrame)
S3method(length,DataFrame)
S3method(length,LazyFrame)
S3method(length,Series)
S3method(max,DataFrame)
S3method(max,LazyFrame)
S3method(max,Series)
S3method(mean,DataFrame)
S3method(mean,LazyFrame)
S3method(mean,Series)
S3method(median,DataFrame)
S3method(median,LazyFrame)
S3method(median,Series)
S3method(min,DataFrame)
S3method(min,LazyFrame)
S3method(min,Series)
S3method(na.omit,DataFrame)
S3method(na.omit,LazyFrame)
S3method(names,DataFrame)
S3method(names,LazyFrame)
S3method(print,ChainedThen)
S3method(print,ChainedWhen)
S3method(print,DataFrame)
S3method(print,Expr)
S3method(c,RPolarsSeries)
S3method(dim,RPolarsDataFrame)
S3method(dim,RPolarsLazyFrame)
S3method(dimnames,RPolarsDataFrame)
S3method(dimnames,RPolarsLazyFrame)
S3method(head,RPolarsDataFrame)
S3method(head,RPolarsLazyFrame)
S3method(length,RPolarsDataFrame)
S3method(length,RPolarsLazyFrame)
S3method(length,RPolarsSeries)
S3method(max,RPolarsDataFrame)
S3method(max,RPolarsLazyFrame)
S3method(max,RPolarsSeries)
S3method(mean,RPolarsDataFrame)
S3method(mean,RPolarsLazyFrame)
S3method(mean,RPolarsSeries)
S3method(median,RPolarsDataFrame)
S3method(median,RPolarsLazyFrame)
S3method(median,RPolarsSeries)
S3method(min,RPolarsDataFrame)
S3method(min,RPolarsLazyFrame)
S3method(min,RPolarsSeries)
S3method(na.omit,RPolarsDataFrame)
S3method(na.omit,RPolarsLazyFrame)
S3method(names,RPolarsDataFrame)
S3method(names,RPolarsLazyFrame)
S3method(print,GroupBy)
S3method(print,LazyFrame)
S3method(print,LazyGroupBy)
S3method(print,PTime)
S3method(print,RField)
S3method(print,RPolarsChainedThen)
S3method(print,RPolarsChainedWhen)
S3method(print,RPolarsDataFrame)
S3method(print,RPolarsDataType)
S3method(print,RPolarsErr)
S3method(print,RThreadHandle)
S3method(print,Series)
S3method(print,Then)
S3method(print,When)
S3method(print,RPolarsExpr)
S3method(print,RPolarsLazyFrame)
S3method(print,RPolarsLazyGroupBy)
S3method(print,RPolarsRField)
S3method(print,RPolarsRThreadHandle)
S3method(print,RPolarsSeries)
S3method(print,RPolarsThen)
S3method(print,RPolarsWhen)
S3method(print,polars_info)
S3method(row.names,DataFrame)
S3method(sum,DataFrame)
S3method(sum,LazyFrame)
S3method(sum,Series)
S3method(tail,DataFrame)
S3method(tail,LazyFrame)
S3method(unique,DataFrame)
S3method(unique,LazyFrame)
S3method(row.names,RPolarsDataFrame)
S3method(sum,RPolarsDataFrame)
S3method(sum,RPolarsLazyFrame)
S3method(sum,RPolarsSeries)
S3method(tail,RPolarsDataFrame)
S3method(tail,RPolarsLazyFrame)
S3method(unique,RPolarsDataFrame)
S3method(unique,RPolarsLazyFrame)
export(.pr)
export(as_polars_df)
export(as_polars_lf)
export(as_polars_series)
export(knit_print.DataFrame)
export(knit_print.RPolarsDataFrame)
export(pl)
importFrom(stats,median)
importFrom(stats,na.omit)
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
is renamed `$map_batches()`. `$map()` and `$apply()` will be removed in 0.13.0 (#534).
- Removed `$days()`, `$hours()`, `$minutes()`, `$seconds()`, `$milliseconds()`,
`$microseconds()`, `$nanoseconds()`. Those were deprecated in 0.11.0 (#550).
- `pl$concat_list()`: elements being strings are now interpreted as column names. Use `pl$lit` to
- `pl$concat_list()`: elements being strings are now interpreted as column names. Use `pl$lit` to
concat with a string.
- The class name of all objects created by polars (`DataFrame`, `LazyFrame`,
`Expr`, `Series`, etc.) has changed. They now start with `RPolars`, for example
`RPolarsDataFrame`. This will only break your code if you directly use those
class names, such as in S3 methods (#554).

## What's changed

Expand Down
10 changes: 5 additions & 5 deletions R/Field.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pl$Field = function(name, datatype) {
#'
#' @examples
#' print(pl$Field("foo", pl$List(pl$UInt64)))
print.RField = function(x, ...) {
print.RPolarsRField = function(x, ...) {
x$print()
invisible(x)
}
Expand All @@ -40,13 +40,13 @@ print.RField = function(x, ...) {
#'
#' Called by the interactive R session internally
#'
#' @param x Name of a `RField` object
#' @param x Name of a `RPolarsRField` object
#' @param pattern String used to auto-complete
#'
#' @export
#' @keywords internal
.DollarNames.RField = function(x, pattern = "") {
get_method_usages(RField, pattern = pattern)
.DollarNames.RPolarsRField = function(x, pattern = "") {
get_method_usages(RPolarsRField, pattern = pattern)
}


Expand Down Expand Up @@ -104,7 +104,7 @@ RField.property_setters$datatype = function(self, value) {
}

#' @export
"$<-.RField" = function(self, name, value) {
"$<-.RPolarsRField" = function(self, name, value) {
name = sub("<-$", "", name)

# stop if method is not a setter
Expand Down
Loading

0 comments on commit 396caf9

Please sign in to comment.