Skip to content

Commit

Permalink
fix: use correct arguments for Ibis' *trim expressions
Browse files Browse the repository at this point in the history
This PR fixes the usage of Ibis` `*trim` functions, which do not take
any arguments but always remove whitespace instead. Unfortunately, this
only changes the error that is produced since `*trim` is currently
translated to Substrait correctly (see
ibis-project/ibis-substrait#1224).

Signed-off-by: Ingo Müller <ingomueller@google.com>
  • Loading branch information
ingomueller-net committed Dec 11, 2024
1 parent a22e7d4 commit e6c4d87
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ def rpad_expr(nation, orders):


def ltrim_expr(nation, orders):
new_col = nation.n_name.lstrip("A").name("ltrim_N_NAME")
new_col = nation.n_name.lstrip().name("ltrim_N_NAME")
return nation[nation.n_name, new_col]


def rtrim_expr(nation, orders):
new_col = nation.n_name.rstrip("A").name("rtrim_N_NAME")
new_col = nation.n_name.rstrip().name("rtrim_N_NAME")
return nation[nation.n_name, new_col]


def trim_expr(nation, orders):
new_col = nation.n_name.strip("A").name("trim_N_NAME")
new_col = nation.n_name.strip().name("trim_N_NAME")
return nation[nation.n_name, new_col]


Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e6c4d87

Please sign in to comment.