Skip to content

Commit

Permalink
fix(sqlalchemy): use the backend's compiler instead of AlchemyCompiler
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Jan 13, 2023
1 parent 9d63fd6 commit 9f4ff54
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ibis/backends/base/sql/alchemy/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ def _table_array_view(t, op):


def _exists_subquery(t, op):
from ibis.backends.base.sql.alchemy.query_builder import AlchemyCompiler

ctx = t.context

# TODO(kszucs): avoid converting the predicates to expressions
Expand All @@ -142,7 +140,7 @@ def _exists_subquery(t, op):
)

sub_ctx = ctx.subcontext()
clause = AlchemyCompiler.to_sql(filtered, sub_ctx, exists=True)
clause = ctx.compiler.to_sql(filtered, sub_ctx, exists=True)

if isinstance(op, ops.NotExistsSubquery):
clause = sa.not_(clause)
Expand Down

0 comments on commit 9f4ff54

Please sign in to comment.