Skip to content

Commit 69a10d9

Browse files
fix(deps): update dependency sqlglot to >=23.4,<25.12 (#9834)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Phillip Cloud <417981+cpcloud@users.noreply.github.com>
1 parent 3780a13 commit 69a10d9

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

ibis/backends/duckdb/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from ibis.backends import CanCreateDatabase, CanCreateSchema, UrlFromPath
2929
from ibis.backends.duckdb.converter import DuckDBPandasData
3030
from ibis.backends.sql import SQLBackend
31-
from ibis.backends.sql.compilers.base import STAR, C
31+
from ibis.backends.sql.compilers.base import STAR, AlterTable, C
3232
from ibis.common.dispatch import lazy_singledispatch
3333
from ibis.expr.operations.udf import InputType
3434
from ibis.util import deprecated
@@ -236,7 +236,7 @@ def create_table(
236236
)
237237
else:
238238
cur.execute(
239-
sge.AlterTable(
239+
AlterTable(
240240
this=initial_table,
241241
actions=[sge.RenameTable(this=final_table)],
242242
).sql(self.name)

ibis/backends/pyspark/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from ibis.backends.pyspark.converter import PySparkPandasData
2626
from ibis.backends.pyspark.datatypes import PySparkSchema, PySparkType
2727
from ibis.backends.sql import SQLBackend
28+
from ibis.backends.sql.compilers.base import AlterTable
2829
from ibis.expr.operations.udf import InputType
2930
from ibis.legacy.udf.vectorized import _coerce_to_series
3031
from ibis.util import deprecated
@@ -659,10 +660,8 @@ def rename_table(self, old_name: str, new_name: str) -> None:
659660
"""
660661
old = sg.table(old_name, quoted=True)
661662
new = sg.table(new_name, quoted=True)
662-
query = sge.AlterTable(
663-
this=old,
664-
exists=False,
665-
actions=[sge.RenameTable(this=new, exists=True)],
663+
query = AlterTable(
664+
this=old, exists=False, actions=[sge.RenameTable(this=new, exists=True)]
666665
)
667666
with self._safe_raw_sql(query):
668667
pass

ibis/backends/sql/compilers/base.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
from ibis.expr.operations.udf import InputType
3434
from ibis.expr.rewrites import lower_stringslice
3535

36+
try:
37+
from sqlglot.expressions import Alter
38+
except ImportError:
39+
from sqlglot.expressions import AlterTable
40+
else:
41+
42+
def AlterTable(*args, kind="TABLE", **kwargs):
43+
return Alter(*args, kind=kind, **kwargs)
44+
45+
3646
if TYPE_CHECKING:
3747
from collections.abc import Callable, Iterable, Mapping
3848

ibis/backends/trino/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from ibis import util
2222
from ibis.backends import CanCreateDatabase, CanCreateSchema, CanListCatalog
2323
from ibis.backends.sql import SQLBackend
24-
from ibis.backends.sql.compilers.base import C
24+
from ibis.backends.sql.compilers.base import AlterTable, C
2525

2626
if TYPE_CHECKING:
2727
from collections.abc import Iterator, Mapping
@@ -514,7 +514,7 @@ def create_table(
514514

515515
# rename the new table to the original table name
516516
cur.execute(
517-
sge.AlterTable(
517+
AlterTable(
518518
this=table_ref,
519519
exists=True,
520520
actions=[sge.RenameTable(this=orig_table_ref, exists=True)],

poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ atpublic = ">=2.3,<6"
4141
parsy = ">=2,<3"
4242
python-dateutil = ">=2.8.2,<3"
4343
pytz = ">=2022.7"
44-
sqlglot = ">=23.4,<25.11"
44+
sqlglot = ">=23.4,<25.12"
4545
toolz = ">=0.11,<1"
4646
typing-extensions = ">=4.3.0,<5"
4747
numpy = { version = ">=1.23.2,<3", optional = true }

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ sortedcontainers==2.4.0 ; python_version >= "3.10" and python_version < "4.0"
257257
soupsieve==2.5 ; python_version >= "3.10" and python_version < "3.13"
258258
sphobjinv==2.3.1.1 ; python_version >= "3.10" and python_version < "3.13"
259259
sqlalchemy==2.0.32 ; python_version >= "3.10" and python_version < "3.13"
260-
sqlglot==25.10.0 ; python_version >= "3.10" and python_version < "4.0"
260+
sqlglot==25.11.0 ; python_version >= "3.10" and python_version < "4.0"
261261
stack-data==0.6.3 ; python_version >= "3.10" and python_version < "4.0"
262262
statsmodels==0.14.2 ; python_version >= "3.10" and python_version < "3.13"
263263
tabulate==0.9.0 ; python_version >= "3.10" and python_version < "3.13"

0 commit comments

Comments
 (0)