Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: Rename structs in Rust to rename classes in R #554

Merged
merged 35 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cdbda2e
rename LazyFrame
etiennebacher Nov 29, 2023
fe66096
Merge branch 'main' into rename-classes
etiennebacher Nov 29, 2023
adf0a94
DataFrame -> RPolarsDataFrame [skip ci]
etiennebacher Nov 29, 2023
f535582
Merge branch 'rename-classes' of https://github.com/pola-rs/r-polars …
etiennebacher Nov 29, 2023
330271e
Expr -> RPolarsExpr [skip ci]
etiennebacher Nov 29, 2023
845fcda
fix examples and tests [skip ci]
etiennebacher Nov 29, 2023
c0ce021
Series -> RPolarsSeries
etiennebacher Nov 29, 2023
45de20a
bump news
etiennebacher Nov 29, 2023
4a220c3
cargo fmt
etiennebacher Nov 29, 2023
ac6efe6
update nanoarrow docs
etiennebacher Nov 29, 2023
3e3cded
forgot some RPolarsLazyFrame
etiennebacher Nov 29, 2023
c2d12e5
fix
etiennebacher Nov 29, 2023
2ad5ea7
fix
etiennebacher Nov 29, 2023
88083e4
LazyGroupBy -> RPolarsLazyGroupBy [skip ci]
etiennebacher Nov 30, 2023
a68afdd
rename Then, When, ChainedThen, ChainedWhen
etiennebacher Nov 30, 2023
044d335
fixes
etiennebacher Nov 30, 2023
3eceb77
use "sql" feature in cargo.toml
etiennebacher Nov 30, 2023
5523f66
bump news [skip ci]
etiennebacher Nov 30, 2023
bcab266
revert change in cargo.toml
etiennebacher Nov 30, 2023
8c44ff1
fix
etiennebacher Nov 30, 2023
40280c7
same
etiennebacher Nov 30, 2023
99254e5
fix extendr wrappers and zzz
etiennebacher Nov 30, 2023
53ad7e7
fix
etiennebacher Nov 30, 2023
b604e42
fix DollarNames
etiennebacher Nov 30, 2023
2456826
fix examples
etiennebacher Nov 30, 2023
1d919be
auto formatting
eitsupi Dec 1, 2023
ed4fa4b
bump package version
eitsupi Dec 1, 2023
35eebec
refactor!: RThreadHandle -> RPolarsRThreadHandle
eitsupi Dec 1, 2023
48ec87c
refactor!: DataTypeVector -> RPolarsDataTypeVector
eitsupi Dec 1, 2023
fb47b6b
refactor!: RField -> RPolarsRField
eitsupi Dec 1, 2023
73013c0
refactor!: ProtoExprArray -> RPolarsProtoExprArray
eitsupi Dec 1, 2023
8142d0d
refactor!: VecDataFrame -> RPolarsVecDataFrame
eitsupi Dec 1, 2023
f5318f2
refactor!: RNullValues -> RPolarsRNullValues
eitsupi Dec 1, 2023
f3f8aae
fix: RField -> RPolarsRField
eitsupi Dec 1, 2023
d67e37f
Merge branch 'main' into rename-classes
etiennebacher Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
226 changes: 113 additions & 113 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# 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("!=",RPolarsExpr)
S3method("!=",RPolarsSeries)
S3method("$",DataTypeVector)
S3method("$",Expr)
S3method("$",ExprBinNameSpace)
S3method("$",ExprCatNameSpace)
S3method("$",ExprDTNameSpace)
Expand All @@ -18,167 +14,171 @@ 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("$",RPolarsErr)
S3method("$",RPolarsExpr)
S3method("$",RPolarsLazyFrame)
S3method("$",RPolarsLazyGroupBy)
S3method("$",RPolarsSQLContext)
S3method("$",RPolarsSeries)
S3method("$",RPolarsStringCacheHolder)
S3method("$",RPolarsThen)
S3method("$",RPolarsWhen)
S3method("$",RThreadHandle)
S3method("$",Series)
S3method("$",Then)
S3method("$",VecDataFrame)
S3method("$",When)
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("%%",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("[[",RPolarsErr)
S3method("[[",RPolarsExpr)
S3method("[[",RPolarsLazyFrame)
S3method("[[",RPolarsLazyGroupBy)
S3method("[[",RPolarsSQLContext)
S3method("[[",RPolarsSeries)
S3method("[[",RPolarsStringCacheHolder)
S3method("[[",RPolarsThen)
S3method("[[",RPolarsWhen)
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("^",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,RPolarsSQLContext)
S3method(.DollarNames,RPolarsSeries)
S3method(.DollarNames,RPolarsThen)
S3method(.DollarNames,RPolarsWhen)
S3method(.DollarNames,RThreadHandle)
S3method(.DollarNames,Series)
S3method(.DollarNames,Then)
S3method(.DollarNames,VecDataFrame)
S3method(.DollarNames,When)
S3method(.DollarNames,method_environment)
S3method(as.character,RPolarsErr)
S3method(as.character,RPolarsSeries)
S3method(as.character,RThreadHandle)
S3method(as.character,Series)
S3method(as.data.frame,DataFrame)
S3method(as.data.frame,LazyFrame)
S3method(as.list,Expr)
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,RPolarsExpr)
S3method(print,RPolarsLazyFrame)
S3method(print,RPolarsLazyGroupBy)
S3method(print,RPolarsSeries)
S3method(print,RPolarsThen)
S3method(print,RPolarsWhen)
S3method(print,RThreadHandle)
S3method(print,Series)
S3method(print,Then)
S3method(print,When)
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
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
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).
- 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
23 changes: 12 additions & 11 deletions R/after-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ extendr_method_to_pure_functions = function(env, class_name = NULL) {
#' # show all content of .pr
#' .pr$print_env(.pr, ".pr the collection of private method calls to rust-polars")
.pr = new.env(parent = emptyenv())
.pr$Series = extendr_method_to_pure_functions(Series)
.pr$DataFrame = extendr_method_to_pure_functions(DataFrame)
.pr$Series = extendr_method_to_pure_functions(RPolarsSeries)
.pr$DataFrame = extendr_method_to_pure_functions(RPolarsDataFrame)
.pr$GroupBy = NULL # derived from DataFrame in R, has no rust calls
.pr$LazyFrame = extendr_method_to_pure_functions(LazyFrame)
.pr$LazyGroupBy = extendr_method_to_pure_functions(LazyGroupBy)
.pr$LazyFrame = extendr_method_to_pure_functions(RPolarsLazyFrame)
.pr$LazyGroupBy = extendr_method_to_pure_functions(RPolarsLazyGroupBy)
.pr$DataType = extendr_method_to_pure_functions(RPolarsDataType)
.pr$DataTypeVector = extendr_method_to_pure_functions(DataTypeVector)
.pr$RField = extendr_method_to_pure_functions(RField)
.pr$Expr = extendr_method_to_pure_functions(Expr)
.pr$Expr = extendr_method_to_pure_functions(RPolarsExpr)
.pr$ProtoExprArray = extendr_method_to_pure_functions(ProtoExprArray)
.pr$When = extendr_method_to_pure_functions(When)
.pr$Then = extendr_method_to_pure_functions(Then)
.pr$ChainedWhen = extendr_method_to_pure_functions(ChainedWhen)
.pr$ChainedThen = extendr_method_to_pure_functions(ChainedThen)
.pr$When = extendr_method_to_pure_functions(RPolarsWhen)
.pr$Then = extendr_method_to_pure_functions(RPolarsThen)
.pr$ChainedWhen = extendr_method_to_pure_functions(RPolarsChainedWhen)
.pr$ChainedThen = extendr_method_to_pure_functions(RPolarsChainedThen)
.pr$VecDataFrame = extendr_method_to_pure_functions(VecDataFrame)
.pr$RNullValues = extendr_method_to_pure_functions(RNullValues)
.pr$RPolarsErr = extendr_method_to_pure_functions(RPolarsErr)
Expand Down Expand Up @@ -267,8 +267,9 @@ DataType = clone_env_one_level_deep(RPolarsDataType)
# used for printing public environment
pl_class_names = sort(
c(
"LazyFrame", "Series", "LazyGroupBy", "DataType", "Expr", "DataFrame",
"When", "Then", "ChainedWhen", "ChainedThen", "RPolarsSQLContext"
"RPolarsLazyFrame", "RPolarsSeries", "RPolarsLazyGroupBy", "RPolarsDataType",
"RPolarsExpr", "RPolarsDataFrame", "RPolarsWhen", "RPolarsThen",
"RPolarsChainedWhen", "RPolarsChainedThen", "RPolarsSQLContext"
)
) # TODO discover all public class automatically

Expand Down
Loading
Loading