Skip to content

Commit

Permalink
bugfix in whenten conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
sorhawell committed Aug 4, 2023
1 parent 723f488 commit 26d54db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rust/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ fn internal_rust_wrap_e(robj: Robj, str_to_lit: bool) -> RResult<Robj> {
match robj.rtype() {
ExternalPtr if robj.inherits("Expr") => Ok(robj),
ExternalPtr if robj.inherits("WhenThen") | robj.inherits("WhenThenThen") => {
unpack(R!("polars:::({{robj}}$otherwise(pl$lit(NULL)))"))
unpack(R!("polars:::result({{robj}}$otherwise(pl$lit(NULL)))"))
}
ExternalPtr if robj.inherits("When") => {
rerr().plain("Cannot use a When-statement as Expr without a $then()")
Expand Down

0 comments on commit 26d54db

Please sign in to comment.