diff --git a/ibis/backends/sql/compilers/trino.py b/ibis/backends/sql/compilers/trino.py index eb2454d12279..f67dc0d9f7af 100644 --- a/ibis/backends/sql/compilers/trino.py +++ b/ibis/backends/sql/compilers/trino.py @@ -222,9 +222,7 @@ def visit_UnwrapJSONBoolean(self, op, *, arg): ) def visit_DayOfWeekIndex(self, op, *, arg): - return self.cast( - sge.paren(self.f.day_of_week(arg) + 6, copy=False) % 7, op.dtype - ) + return self.cast(sge.paren(self.f.anon.dow(arg) + 6, copy=False) % 7, op.dtype) def visit_DayOfWeekName(self, op, *, arg): return self.f.date_format(arg, "%W") diff --git a/ibis/backends/tests/snapshots/test_sql/test_to_sql_default_backend/mssql/to_sql.sql b/ibis/backends/tests/snapshots/test_sql/test_to_sql_default_backend/mssql/to_sql.sql index 8cd70499b9ad..683cc7921860 100644 --- a/ibis/backends/tests/snapshots/test_sql/test_to_sql_default_backend/mssql/to_sql.sql +++ b/ibis/backends/tests/snapshots/test_sql/test_to_sql_default_backend/mssql/to_sql.sql @@ -1,5 +1,5 @@ SELECT - COUNT(*) AS [CountStar()] + COUNT_BIG(*) AS [CountStar()] FROM ( SELECT [t0].[b] diff --git a/poetry.lock b/poetry.lock index d01e2d860449..b2cf1f30532b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6932,18 +6932,18 @@ sqlcipher = ["sqlcipher3_binary"] [[package]] name = "sqlglot" -version = "25.18.0" +version = "25.19.0" description = "An easily customizable SQL parser and transpiler" optional = false python-versions = ">=3.7" files = [ - {file = "sqlglot-25.18.0-py3-none-any.whl", hash = "sha256:d315874d88a81c48604cf4a9cd8a56e8bd3009aa294c233755ac176a9aceb153"}, - {file = "sqlglot-25.18.0.tar.gz", hash = "sha256:f79b02b378038e991633911de43eb6e44eba99510fa7144bba7e7532e3d4e00d"}, + {file = "sqlglot-25.19.0-py3-none-any.whl", hash = "sha256:07f3f7c90b909cc324e2f659e6d551adf52293afd317141db8a4a7cfe01468a2"}, + {file = "sqlglot-25.19.0.tar.gz", hash = "sha256:1cf4c4bf5a52a0e943fb182df9f6ae386470806b5ec5d57f59a07d4a6c639322"}, ] [package.extras] dev = ["duckdb (>=0.6)", "maturin (>=1.4,<2.0)", "mypy", "pandas", "pandas-stubs", "pdoc", "pre-commit", "python-dateutil", "pytz", "ruff (==0.4.3)", "types-python-dateutil", "types-pytz", "typing-extensions"] -rs = ["sqlglotrs (==0.2.9)"] +rs = ["sqlglotrs (==0.2.10)"] [[package]] name = "stack-data" @@ -7941,4 +7941,4 @@ visualization = ["graphviz"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "c103f9c7c8fd8aff126e59c9629926c3a1c2c91ea1946147b07b5fe363e4d18f" +content-hash = "dd445339d72c8e5fa9e03acc17a7ece1210abde87a8abdf82b25ca218f638139" diff --git a/pyproject.toml b/pyproject.toml index 4c739aeab77b..1a94e99253e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ atpublic = ">=2.3,<6" parsy = ">=2,<3" python-dateutil = ">=2.8.2,<3" pytz = ">=2022.7" -sqlglot = ">=23.4,<25.19" +sqlglot = ">=23.4,<25.20" toolz = ">=0.11,<1" typing-extensions = ">=4.3.0,<5" numpy = { version = ">=1.23.2,<3", optional = true } diff --git a/requirements-dev.txt b/requirements-dev.txt index ef03775ecb3d..342a58f09554 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -257,7 +257,7 @@ sortedcontainers==2.4.0 ; python_version >= "3.10" and python_version < "4.0" soupsieve==2.6 ; python_version >= "3.10" and python_version < "3.13" sphobjinv==2.3.1.1 ; python_version >= "3.10" and python_version < "3.13" sqlalchemy==2.0.32 ; python_version >= "3.10" and python_version < "3.13" -sqlglot==25.18.0 ; python_version >= "3.10" and python_version < "4.0" +sqlglot==25.19.0 ; python_version >= "3.10" and python_version < "4.0" stack-data==0.6.3 ; python_version >= "3.10" and python_version < "4.0" statsmodels==0.14.2 ; python_version >= "3.10" and python_version < "3.13" tabulate==0.9.0 ; python_version >= "3.10" and python_version < "3.13"