Skip to content

Commit a806691

Browse files
NickCrewscpcloud
authored andcommitted
refactor(compiler): fix Compiler.dialect type hint, remove unneeded duckdb compilation rule for RegexReplace (#10400)
1 parent 210ab3c commit a806691

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

ibis/backends/sql/compilers/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def impl(self, op, *, left, right):
522522

523523
@property
524524
@abc.abstractmethod
525-
def dialect(self) -> str:
525+
def dialect(self) -> type[sg.Dialect]:
526526
"""Backend dialect."""
527527

528528
@property

ibis/backends/sql/compilers/duckdb.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,6 @@ def visit_TimestampNow(self, op):
523523
"""DuckDB current timestamp defaults to timestamp + tz."""
524524
return self.cast(super().visit_TimestampNow(op), dt.timestamp)
525525

526-
def visit_RegexReplace(self, op, *, arg, pattern, replacement):
527-
return self.f.regexp_replace(arg, pattern, replacement, "g")
528-
529526
def visit_First(self, op, *, arg, where, order_by, include_null):
530527
if not include_null:
531528
cond = arg.is_(sg.not_(NULL, copy=False))

0 commit comments

Comments
 (0)