Skip to content

Commit

Permalink
fix(snowflake): use regexp_instr != 0 instead of REGEXP keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Jul 8, 2023
1 parent 0a0cda6 commit 06e2be4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ibis/backends/snowflake/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ def _map_get(t, op):
ops.DateFromYMD: fixed_arity(sa.func.date_from_parts, 3),
ops.StringToTimestamp: fixed_arity(sa.func.to_timestamp_tz, 2),
ops.RegexExtract: _regex_extract,
ops.RegexSearch: fixed_arity(sa.sql.operators.custom_op("REGEXP"), 2),
ops.RegexSearch: fixed_arity(
lambda arg, pattern: sa.func.regexp_instr(arg, pattern) != 0, 2
),
ops.RegexReplace: fixed_arity(sa.func.regexp_replace, 3),
ops.ExtractMicrosecond: fixed_arity(
lambda arg: sa.cast(
Expand Down

0 comments on commit 06e2be4

Please sign in to comment.