Skip to content

Commit

Permalink
feat(datafusion): implement ops.StartsWith
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-kwitt authored and cpcloud committed Feb 16, 2023
1 parent b1d7672 commit 8099014
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ibis/backends/datafusion/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,11 @@ def string_ascii(op):
return df.functions.ascii(translate(op.arg))


@translate.register(ops.StartsWith)
def string_starts_with(op):
return df.functions.starts_with(translate(op.arg), translate(op.start))


@translate.register(ops.RegexExtract)
def regex_extract(op):
arg = translate(op.arg)
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def test_string_col_is_unicode(alltypes, df):
id='startswith-simple',
marks=[
pytest.mark.notimpl(
["dask", "datafusion"],
["dask"],
raises=com.OperationNotDefinedError,
),
pytest.mark.broken(
Expand Down

0 comments on commit 8099014

Please sign in to comment.