Skip to content

Commit

Permalink
perf(sql): prevent sqlglot from extensive deepcopying every time we c…
Browse files Browse the repository at this point in the history
…reate a sqlglot object
  • Loading branch information
kszucs committed Mar 8, 2024
1 parent 182b6a5 commit 556d73b
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 60 deletions.
2 changes: 1 addition & 1 deletion ibis/backends/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def compile(
):
"""Compile an Ibis expression to a SQL string."""
query = self._to_sqlglot(expr, limit=limit, params=params, **kwargs)
sql = query.sql(dialect=self.dialect, pretty=True)
sql = query.sql(dialect=self.dialect, pretty=True, copy=False)
self._log(sql)
return sql

Expand Down
Loading

0 comments on commit 556d73b

Please sign in to comment.