Skip to content

Commit

Permalink
refactor: delete some unused visit methods in sql compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist committed Mar 21, 2024
1 parent 7cc67d3 commit f2e1465
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions ibis/backends/sql/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,30 +1203,6 @@ def _add_parens(cls, op, sg_expr):
return sge.paren(sg_expr, copy=False)
return sg_expr

def visit_Filter(self, op, *, parent, predicates):
predicates = (
self._add_parens(raw_predicate, predicate)
for raw_predicate, predicate in zip(op.predicates, predicates)
)
try:
return parent.where(*predicates, copy=False)
except AttributeError:
return (
sg.select(STAR, copy=False)
.from_(parent, copy=False)
.where(*predicates, copy=False)
)

def visit_Sort(self, op, *, parent, keys):
try:
return parent.order_by(*keys, copy=False)
except AttributeError:
return (
sg.select(STAR, copy=False)
.from_(parent, copy=False)
.order_by(*keys, copy=False)
)

def visit_Union(self, op, *, left, right, distinct):
if isinstance(left, (sge.Table, sge.Subquery)):
left = sg.select(STAR, copy=False).from_(left, copy=False)
Expand Down

0 comments on commit f2e1465

Please sign in to comment.