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

Background execution and R process pool #311

Merged
merged 79 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
d577bc4
Prototype execution in background thread
Sicheng-Pan Jun 25, 2023
9918a64
Refactor rthreadhandle prototype
Sicheng-Pan Jun 26, 2023
cb41db2
Prototype background R process
Sicheng-Pan Jul 2, 2023
eae0ebc
Made a functional R subprocess!
Sicheng-Pan Jul 2, 2023
9b1ad25
Refactor code for background handler
Sicheng-Pan Jul 3, 2023
18f98c1
Implement R process pool
Sicheng-Pan Jul 4, 2023
f907a22
Merge branch 'main' into lazy_in_background
Sicheng-Pan Jul 4, 2023
fdee6b5
Attempt to (de)serialize series from polars
Sicheng-Pan Jul 4, 2023
4f5886b
Rename R background module file
Sicheng-Pan Jul 4, 2023
fd3a9fb
Implement expr and lf
Sicheng-Pan Jul 5, 2023
4c8e06c
Merge branch 'main' into lazy_in_background
Sicheng-Pan Jul 5, 2023
41f180a
Implement R wrappers for thread handle and global R pool config
Sicheng-Pan Jul 5, 2023
020f902
Use private function to handle request in subprocess
Sicheng-Pan Jul 5, 2023
513fee6
Fix handle display
Sicheng-Pan Jul 6, 2023
717ecd7
Fix error handling in background process
Sicheng-Pan Jul 6, 2023
44799fc
Fix more error handling issues
Sicheng-Pan Jul 6, 2023
5b9ffed
Use shared memory for IPC communication
Sicheng-Pan Jul 11, 2023
6452598
make build export NOT_CRAN=true
sorhawell Jul 11, 2023
c60e596
functions to load and check polars in an R session
sorhawell Jul 11, 2023
49181f7
now it work
sorhawell Jul 11, 2023
ecd7199
update tip to readme
sorhawell Jul 11, 2023
0100441
add test_serde_df add benchmark script
sorhawell Jul 11, 2023
c68a443
Merge branch 'main' into lazy_in_background
Sicheng-Pan Jul 11, 2023
3c1e045
Minor refactor
Sicheng-Pan Jul 11, 2023
07d150d
rename
sorhawell Jul 12, 2023
397c4dd
add build and submit_polars + fix minors
sorhawell Jul 12, 2023
196e548
Merge remote-tracking branch 'origin/not_cran_dev_builds' into lazy_i…
Sicheng-Pan Jul 15, 2023
4557b1b
Implement apply-in-background
Sicheng-Pan Jul 15, 2023
daa90c8
Write unit tests
Sicheng-Pan Jul 15, 2023
78a03c8
Benchmark rbackground
Sicheng-Pan Jul 16, 2023
d990822
add expectations print + is_finished handle
sorhawell Jul 17, 2023
7a02517
add more scenarios
sorhawell Jul 17, 2023
f4b1f0f
Improve display of joined handle
Sicheng-Pan Jul 18, 2023
57def1f
RThreadHandle_is_finished.Rd
sorhawell Jul 18, 2023
3fee2c5
try remove NOT_CRAN
sorhawell Jul 18, 2023
d0758f0
try quote R -e arg
sorhawell Jul 18, 2023
3cbaceb
remove R native pipe operator
sorhawell Jul 18, 2023
5f05fce
try not use arg method
sorhawell Jul 18, 2023
0694664
write failed cmd string in error
sorhawell Jul 18, 2023
4ef435e
drop cmd_string
sorhawell Jul 18, 2023
c7653c2
try add line ending
sorhawell Jul 19, 2023
88d8b52
try not redirect std
sorhawell Jul 19, 2023
88048f1
dunno
sorhawell Jul 19, 2023
3d81fcf
Revert "RThreadHandle_is_finished.Rd"
sorhawell Jul 19, 2023
0781242
revert experiments
sorhawell Jul 19, 2023
65bb48f
Try std::env::current_exe
Sicheng-Pan Jul 20, 2023
ca17fa3
Merge remote-tracking branch 'origin/main' into lazy_in_background
Sicheng-Pan Jul 23, 2023
b03de39
Update extendr
Sicheng-Pan Jul 23, 2023
00c2b4d
Try environment variable
Sicheng-Pan Jul 23, 2023
97b2fb9
change low io high cpu example
sorhawell Jul 23, 2023
980abe8
update benchmark
sorhawell Jul 24, 2023
bd15917
improve Expr_map doc
sorhawell Jul 24, 2023
d21a881
collect_in_background docs
sorhawell Jul 24, 2023
75d0252
update oxygen
sorhawell Jul 24, 2023
c2b6237
super minor, Rctx::Handled
sorhawell Jul 24, 2023
0dee41a
Track R environment in Rust
Sicheng-Pan Jul 25, 2023
d4dbb5f
Remove old PolarsBackgroundHandler
Sicheng-Pan Jul 27, 2023
d9e2dab
chore rextendr 0.3.1.9000 nanoarrow .Rd
sorhawell Jul 27, 2023
388297a
avoid Rctx.into() -> RpolarsErr
sorhawell Jul 27, 2023
87adf0d
Merge apply_in_background to apply
Sicheng-Pan Jul 30, 2023
a2c30ae
Improve background error handling
Sicheng-Pan Jul 30, 2023
13bd3c7
make: redefine install, add install to docs
sorhawell Jul 30, 2023
d0f1765
merge main
sorhawell Aug 1, 2023
ecd6a7c
Merge branch 'main' into lazy_in_background
sorhawell Aug 1, 2023
bc4bb4c
more docs + fix RBackgroundPool
sorhawell Aug 1, 2023
08d8eab
impl thread queue in RBackGroundPool
sorhawell Aug 2, 2023
4fea62d
spawn processes in paralell
sorhawell Aug 2, 2023
2777c94
add test 3d to benchmark
sorhawell Aug 2, 2023
95122a5
increase default pool size to 4
sorhawell Aug 2, 2023
bc12766
update unit test
sorhawell Aug 2, 2023
1cdefe4
add parallel examples to map and apply
sorhawell Aug 7, 2023
1616095
merge main + update docs
sorhawell Aug 7, 2023
90d8be7
merge main + update news + roxygen
sorhawell Aug 8, 2023
afee8a9
polish news [skip ci]
sorhawell Aug 8, 2023
61cc469
add links
sorhawell Aug 8, 2023
8af927f
try rename all-features to full features
sorhawell Aug 8, 2023
46058db
fmt
sorhawell Aug 8, 2023
f352e0b
merge main + solve conflicts + docs + fix a utests
sorhawell Aug 9, 2023
b6916e4
fmt + roxygen
sorhawell Aug 9, 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
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ Collate:
'groupby.R'
'info.R'
'ipc.R'
'lazyframe__background.R'
'lazyframe__groupby.R'
'lazyframe__lazy.R'
'namespace.R'
'options.R'
'parquet.R'
'pkg-knitr.R'
'pkg-nanoarrow.R'
'rbackground.R'
'rlang.R'
'rust_result.R'
's3_methods.R'
'series__series.R'
'translation.R'
'vctrs.R'
'zzz.R'
Config/rextendr/version: 0.3.1
Config/rextendr/version: 0.3.1.9000
VignetteBuilder: knitr
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ requirements-rs:
.PHONY: build
build: ## Compile polars R package with all features and generate Rd files
export RPOLARS_ALL_FEATURES=true \
&& export RPOLARS_PROFILE=release-optimized \
&& Rscript -e 'if (!(require(arrow)&&require(nanoarrow))) warning("could not load arrow/nanoarrow, igonore changes to nanoarrow.Rd"); rextendr::document()'

.PHONY: install
install:
export RPOLARS_ALL_FEATURES=true \
&& R CMD INSTALL --no-multiarch --with-keep.source .

.PHONY: all
all: fmt build test README.md LICENSE.note ## build -> test -> Update README.md, LICENSE.note

.PHONY: docs
docs: build README.md docs/docs/reference_home.md ## Generate docs
docs: build install README.md docs/docs/reference_home.md ## Generate docs
cp docs/mkdocs.orig.yml docs/mkdocs.yml
Rscript -e 'altdoc::update_docs(custom_reference = "docs/make-docs.R")'
cd docs && ../$(VENV_BIN)/python3 -m mkdocs build
Expand All @@ -76,10 +80,6 @@ LICENSE.note: src/rust/Cargo.lock ## Update LICENSE.note
test: build ## Run fast unittests
Rscript -e 'devtools::load_all(); devtools::test()'

.PHONY: install
install: ## Install this R package locally
Rscript -e 'devtools::install(pkg = ".", dependencies = TRUE)'

.PHONY: fmt
fmt: fmt-rs fmt-r ## Format files

Expand Down
11 changes: 7 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ S3method("$",FeatureInfo)
S3method("$",GroupBy)
S3method("$",LazyFrame)
S3method("$",LazyGroupBy)
S3method("$",PolarsBackgroundHandle)
S3method("$",ProtoExprArray)
S3method("$",RField)
S3method("$",RNullValues)
S3method("$",RPolarsDataType)
S3method("$",RPolarsErr)
S3method("$",RThreadHandle)
S3method("$",Series)
S3method("$",VecDataFrame)
S3method("$",When)
Expand Down Expand Up @@ -63,12 +63,12 @@ S3method("[[",FeatureInfo)
S3method("[[",GroupBy)
S3method("[[",LazyFrame)
S3method("[[",LazyGroupBy)
S3method("[[",PolarsBackgroundHandle)
S3method("[[",ProtoExprArray)
S3method("[[",RField)
S3method("[[",RNullValues)
S3method("[[",RPolarsDataType)
S3method("[[",RPolarsErr)
S3method("[[",RThreadHandle)
S3method("[[",Series)
S3method("[[",VecDataFrame)
S3method("[[",When)
Expand All @@ -80,9 +80,9 @@ S3method(.DollarNames,DataFrame)
S3method(.DollarNames,Expr)
S3method(.DollarNames,GroupBy)
S3method(.DollarNames,LazyFrame)
S3method(.DollarNames,PolarsBackgroundHandle)
S3method(.DollarNames,RField)
S3method(.DollarNames,RPolarsErr)
S3method(.DollarNames,RThreadHandle)
S3method(.DollarNames,Series)
S3method(.DollarNames,VecDataFrame)
S3method(.DollarNames,When)
Expand All @@ -91,6 +91,7 @@ S3method(.DollarNames,WhenThenThen)
S3method(.DollarNames,method_environment)
S3method(.DollarNames,polars_option_list)
S3method(as.character,RPolarsErr)
S3method(as.character,RThreadHandle)
S3method(as.character,Series)
S3method(as.data.frame,DataFrame)
S3method(as.data.frame,LazyFrame)
Expand Down Expand Up @@ -128,10 +129,10 @@ S3method(print,GroupBy)
S3method(print,LazyFrame)
S3method(print,LazyGroupBy)
S3method(print,PTime)
S3method(print,PolarsBackgroundHandle)
S3method(print,RField)
S3method(print,RPolarsDataType)
S3method(print,RPolarsErr)
S3method(print,RThreadHandle)
S3method(print,Series)
S3method(print,When)
S3method(print,WhenThen)
Expand All @@ -149,6 +150,8 @@ S3method(unique,LazyFrame)
export("%**%")
export("%**%.Expr")
export(.pr)
export(RThreadHandle_is_finished)
export(RThreadHandle_join)
export(knit_print.DataFrame)
export(pl)
importFrom(stats,median)
Expand Down
4 changes: 2 additions & 2 deletions R/after-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ extendr_method_to_pure_functions = function(env, class_name = NULL) {
.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$PolarsBackgroundHandle = extendr_method_to_pure_functions(PolarsBackgroundHandle)
.pr$DataType = extendr_method_to_pure_functions(RPolarsDataType)
.pr$DataTypeVector = extendr_method_to_pure_functions(DataTypeVector)
.pr$RField = extendr_method_to_pure_functions(RField)
Expand All @@ -94,6 +93,7 @@ extendr_method_to_pure_functions = function(env, class_name = NULL) {
.pr$VecDataFrame = extendr_method_to_pure_functions(VecDataFrame)
.pr$RNullValues = extendr_method_to_pure_functions(RNullValues)
.pr$RPolarsErr = extendr_method_to_pure_functions(RPolarsErr)
.pr$RThreadHandle = extendr_method_to_pure_functions(RThreadHandle)



Expand Down Expand Up @@ -265,7 +265,7 @@ DataType = clone_env_one_level_deep(RPolarsDataType)
# used for printing public environment
pl_class_names = sort(
c(
"LazyFrame", "Series", "LazyGroupBy", "DataType", "Expr", "DataFrame", "PolarsBackgroundHandle",
"LazyFrame", "Series", "LazyGroupBy", "DataType", "Expr", "DataFrame",
"When", "WhenThen", "WhenThenThen"
)
) # TODO discover all public class automatically
Expand Down
44 changes: 31 additions & 13 deletions R/expr__expr.R
Original file line number Diff line number Diff line change
Expand Up @@ -644,31 +644,40 @@ construct_ProtoExprArray = function(...) {
## TODO Contribute polars, seems polars now prefer word f or function in map/apply/rolling/apply
# over lambda. However lambda is still in examples.
## TODO Better explain aggregate list
#' Expr_map
#' Map an expression with an R function.
#' @keywords Expr
#'
#' @param f a function mapping a series
#' @param f a function to map with
#' @param output_type NULL or one of pl$dtypes$..., the output datatype, NULL is the same as input.
#' This is used to inform schema of the actual return type of the R function. Setting this wrong
#' could theoretically have some downstream implications to the query.
#' @param agg_list Aggregate list. Map from vector to group in groupby context.
#' Likely not so useful.
#' @param in_background Boolean. Whether to execute the map in a background R process. Combined wit
#' setting e.g. `pl$set_global_rpool_cap(4)` it can speed up some slow R functions as they can run
#' in parallel R sessions. The communication speed between processes is quite slower than between
#' threads. Will likely only give a speed-up in a "low IO - high CPU" usecase. A single map will not
#'be paralleled, only in case of multiple `$map`(s) in the query these can be run in parallel.
#'
#' @rdname Expr_map
#' @return Expr
#' @aliases Expr_map
#' @details user function return should be a series or any Robj convertible into a Series.
#' In PyPolars likely return must be Series. User functions do fully support `browser()`, helpful to
#' investigate.
#' @details Sometime some specific R function is just necessary to perform a column transformation.
#' Using R maps is slower than native polars. User function must take one polars `Series` as input
#' and the return should be a `Series` or any Robj convertible into a `Series` (e.g. vectors).
#' Map fully supports `browser()`. If `in_background = FALSE` the function can access any global
#' variable of the R session. But all R maps in the query sequentially share the same main R
#' session. Any native polars computations can still be executed meanwhile. In
#' `in_background = TRUE` the map will run in one or more other R sessions and will not have access
#' to global variables. Use `pl$set_global_rpool_cap(4)` and `pl$get_global_rpool_cap()` to see and
#' view number of parallel R sessions.
#' @name Expr_map
#' @examples
#' pl$DataFrame(iris)$select(pl$col("Sepal.Length")$map(\(x) {
#' paste("cheese", as.character(x$to_vector()))
#' }, pl$dtypes$Utf8))
Expr_map = function(f, output_type = NULL, agg_list = FALSE) {
.pr$Expr$map(self, f, output_type, agg_list)
Expr_map = function(f, output_type = NULL, agg_list = FALSE, in_background = FALSE) {
map_fn = ifelse(in_background, .pr$Expr$map_in_background, .pr$Expr$map)
map_fn(self, f, output_type, agg_list)
}



#' Expr_apply
#' @keywords Expr
#'
Expand All @@ -683,6 +692,11 @@ Expr_map = function(f, output_type = NULL, agg_list = FALSE) {
#' if FALSE will convert to a Polars Null and carry on.
#' @param allow_fail_eval bool (default FALSE), if TRUE will not raise user function error
#' but convert result to a polars Null and carry on.
#' @param in_background Boolean. Whether to execute the map in a background R process. Combined wit
#' setting e.g. `pl$set_global_rpool_cap(4)` it can speed up some slow R functions as they can run
#' in parallel R sessions. The communication speed between processes is quite slower than between
#' threads. Will likely only give a speed-up in a "low IO - high CPU" usecase. A single map will not
#'be paralleled, only in case of multiple `$map`(s) in the query these can be run in parallel.
#'
#' @details
#'
Expand Down Expand Up @@ -773,7 +787,11 @@ Expr_map = function(f, output_type = NULL, agg_list = FALSE) {
#' system.time({
#' r_vec * 2L
#' })
Expr_apply = function(f, return_type = NULL, strict_return_type = TRUE, allow_fail_eval = FALSE) {
Expr_apply = function(f, return_type = NULL, strict_return_type = TRUE, allow_fail_eval = FALSE, in_background = FALSE) {
if (in_background) {
return(.pr$Expr$apply_in_background(self, f, return_type))
}

# use series apply
wrap_f = function(s) {
s$apply(f, return_type, strict_return_type, allow_fail_eval)
Expand Down
114 changes: 66 additions & 48 deletions R/extendr-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#' @useDynLib polars, .registration = TRUE
NULL

test_rpolarserr <- function() .Call(wrap__test_rpolarserr)

rlazy_csv_reader <- function(path, sep, has_header, ignore_errors, skip_rows, n_rows, cache, overwrite_dtype, low_memory, comment_char, quote_char, null_values, infer_schema_length, skip_rows_after_header, encoding, row_count_name, row_count_offset, parse_dates) .Call(wrap__rlazy_csv_reader, path, sep, has_header, ignore_errors, skip_rows, n_rows, cache, overwrite_dtype, low_memory, comment_char, quote_char, null_values, infer_schema_length, skip_rows_after_header, encoding, row_count_name, row_count_offset, parse_dates)

import_arrow_ipc <- function(path, n_rows, cache, rechunk, row_name, row_count, memmap) .Call(wrap__import_arrow_ipc, path, n_rows, cache, rechunk, row_name, row_count, memmap)
Expand Down Expand Up @@ -59,43 +57,21 @@ test_robj_to_u32 <- function(robj) .Call(wrap__test_robj_to_u32, robj)

test_print_string <- function(s) invisible(.Call(wrap__test_print_string, s))

RPolarsErr <- new.env(parent = emptyenv())

RPolarsErr$new <- function() .Call(wrap__RPolarsErr__new)

RPolarsErr$contexts <- function() .Call(wrap__RPolarsErr__contexts, self)

RPolarsErr$pretty_msg <- function() .Call(wrap__RPolarsErr__pretty_msg, self)

RPolarsErr$bad_arg <- function(s) .Call(wrap__RPolarsErr__bad_arg, self, s)

RPolarsErr$bad_robj <- function(r) .Call(wrap__RPolarsErr__bad_robj, self, r)

RPolarsErr$bad_val <- function(s) .Call(wrap__RPolarsErr__bad_val, self, s)

RPolarsErr$hint <- function(s) .Call(wrap__RPolarsErr__hint, self, s)

RPolarsErr$mistyped <- function(s) .Call(wrap__RPolarsErr__mistyped, self, s)

RPolarsErr$misvalued <- function(s) .Call(wrap__RPolarsErr__misvalued, self, s)

RPolarsErr$plain <- function(s) .Call(wrap__RPolarsErr__plain, self, s)
test_rpolarserr <- function() .Call(wrap__test_rpolarserr)

RPolarsErr$rcall <- function(c) .Call(wrap__RPolarsErr__rcall, self, c)
setup_renv <- function() .Call(wrap__setup_renv)

RPolarsErr$get_rcall <- function() .Call(wrap__RPolarsErr__get_rcall, self)
set_global_rpool_cap <- function(c) .Call(wrap__set_global_rpool_cap, c)

RPolarsErr$rinfo <- function(i) .Call(wrap__RPolarsErr__rinfo, self, i)
get_global_rpool_cap <- function() .Call(wrap__get_global_rpool_cap)

RPolarsErr$get_rinfo <- function() .Call(wrap__RPolarsErr__get_rinfo, self)
handle_background_request <- function(server_name) .Call(wrap__handle_background_request, server_name)

RPolarsErr$when <- function(s) .Call(wrap__RPolarsErr__when, self, s)
test_rbackgroundhandler <- function(lambda, arg) .Call(wrap__test_rbackgroundhandler, lambda, arg)

#' @export
`$.RPolarsErr` <- function (self, name) { func <- RPolarsErr[[name]]; environment(func) <- environment(); func }
test_rthreadhandle <- function() .Call(wrap__test_rthreadhandle)

#' @export
`[[.RPolarsErr` <- `$.RPolarsErr`
test_serde_df <- function(df) .Call(wrap__test_serde_df, df)

DataFrame <- new.env(parent = emptyenv())

Expand Down Expand Up @@ -271,6 +247,58 @@ RField$set_datatype_mut <- function(datatype) invisible(.Call(wrap__RField__set_
#' @export
`[[.RField` <- `$.RField`

RPolarsErr <- new.env(parent = emptyenv())

RPolarsErr$new <- function() .Call(wrap__RPolarsErr__new)

RPolarsErr$contexts <- function() .Call(wrap__RPolarsErr__contexts, self)

RPolarsErr$pretty_msg <- function() .Call(wrap__RPolarsErr__pretty_msg, self)

RPolarsErr$bad_arg <- function(s) .Call(wrap__RPolarsErr__bad_arg, self, s)

RPolarsErr$bad_robj <- function(r) .Call(wrap__RPolarsErr__bad_robj, self, r)

RPolarsErr$bad_val <- function(s) .Call(wrap__RPolarsErr__bad_val, self, s)

RPolarsErr$hint <- function(s) .Call(wrap__RPolarsErr__hint, self, s)

RPolarsErr$mistyped <- function(s) .Call(wrap__RPolarsErr__mistyped, self, s)

RPolarsErr$misvalued <- function(s) .Call(wrap__RPolarsErr__misvalued, self, s)

RPolarsErr$plain <- function(s) .Call(wrap__RPolarsErr__plain, self, s)

RPolarsErr$rcall <- function(c) .Call(wrap__RPolarsErr__rcall, self, c)

RPolarsErr$get_rcall <- function() .Call(wrap__RPolarsErr__get_rcall, self)

RPolarsErr$rinfo <- function(i) .Call(wrap__RPolarsErr__rinfo, self, i)

RPolarsErr$get_rinfo <- function() .Call(wrap__RPolarsErr__get_rinfo, self)

RPolarsErr$when <- function(s) .Call(wrap__RPolarsErr__when, self, s)

#' @export
`$.RPolarsErr` <- function (self, name) { func <- RPolarsErr[[name]]; environment(func) <- environment(); func }

#' @export
`[[.RPolarsErr` <- `$.RPolarsErr`

RThreadHandle <- new.env(parent = emptyenv())

RThreadHandle$join <- function() .Call(wrap__RThreadHandle__join, self)

RThreadHandle$is_finished <- function() .Call(wrap__RThreadHandle__is_finished, self)

RThreadHandle$thread_description <- function() .Call(wrap__RThreadHandle__thread_description, self)

#' @export
`$.RThreadHandle` <- function (self, name) { func <- RThreadHandle[[name]]; environment(func) <- environment(); func }

#' @export
`[[.RThreadHandle` <- `$.RThreadHandle`

Expr <- new.env(parent = emptyenv())

Expr$col <- function(name) .Call(wrap__Expr__col, name)
Expand Down Expand Up @@ -687,6 +715,10 @@ Expr$print <- function() invisible(.Call(wrap__Expr__print, self))

Expr$map <- function(lambda, output_type, agg_list) .Call(wrap__Expr__map, self, lambda, output_type, agg_list)

Expr$map_in_background <- function(lambda, output_type, agg_list) .Call(wrap__Expr__map_in_background, self, lambda, output_type, agg_list)

Expr$apply_in_background <- function(lambda, output_type) .Call(wrap__Expr__apply_in_background, self, lambda, output_type)

Expr$is_unique <- function() .Call(wrap__Expr__is_unique, self)

Expr$approx_unique <- function() .Call(wrap__Expr__approx_unique, self)
Expand Down Expand Up @@ -877,12 +909,12 @@ LazyFrame$debug_plan <- function() .Call(wrap__LazyFrame__debug_plan, self)

LazyFrame$describe_optimized_plan <- function() .Call(wrap__LazyFrame__describe_optimized_plan, self)

LazyFrame$collect_background <- function() .Call(wrap__LazyFrame__collect_background, self)

LazyFrame$collect <- function() .Call(wrap__LazyFrame__collect, self)

LazyFrame$collect_handled <- function() .Call(wrap__LazyFrame__collect_handled, self)

LazyFrame$collect_in_background <- function() .Call(wrap__LazyFrame__collect_in_background, self)

LazyFrame$first <- function() .Call(wrap__LazyFrame__first, self)

LazyFrame$last <- function() .Call(wrap__LazyFrame__last, self)
Expand Down Expand Up @@ -1079,20 +1111,6 @@ Series$from_arrow <- function(name, array) .Call(wrap__Series__from_arrow, name,
#' @export
`[[.Series` <- `$.Series`

PolarsBackgroundHandle <- new.env(parent = emptyenv())

PolarsBackgroundHandle$new <- function(lazy_df) .Call(wrap__PolarsBackgroundHandle__new, lazy_df)

PolarsBackgroundHandle$join <- function() .Call(wrap__PolarsBackgroundHandle__join, self)

PolarsBackgroundHandle$is_exhausted <- function() .Call(wrap__PolarsBackgroundHandle__is_exhausted, self)

#' @export
`$.PolarsBackgroundHandle` <- function (self, name) { func <- PolarsBackgroundHandle[[name]]; environment(func) <- environment(); func }

#' @export
`[[.PolarsBackgroundHandle` <- `$.PolarsBackgroundHandle`

FeatureInfo <- new.env(parent = emptyenv())

FeatureInfo$new <- function() .Call(wrap__FeatureInfo__new)
Expand Down
Loading
Loading