Skip to content

Commit

Permalink
fix(duckdb): pass global replace flag to ops.RegexReplace translati…
Browse files Browse the repository at this point in the history
…on rule
  • Loading branch information
cpcloud authored and kszucs committed Feb 12, 2024
1 parent 367282f commit e46260d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ibis/backends/duckdb/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ def visit_TimestampNow(self, op):
def visit_RegexExtract(self, op, *, arg, pattern, index):
return self.f.regexp_extract(arg, pattern, index, dialect=self.dialect)

@visit_node.register(ops.RegexReplace)
def visit_RegexReplace(self, op, *, arg, pattern, replacement):
return self.f.regexp_replace(
arg, pattern, replacement, "g", dialect=self.dialect
)

@visit_node.register(ops.Quantile)
@visit_node.register(ops.MultiQuantile)
def visit_Quantile(self, op, *, arg, quantile, where):
Expand Down

0 comments on commit e46260d

Please sign in to comment.