From 267f4bc6e7b33fa8c26e7d36d45ee1efb21a21d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:18:20 +0000 Subject: [PATCH] fix(deps): update dependency sqlglot to >=22,<22.5 (#8635) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Phillip Cloud <417981+cpcloud@users.noreply.github.com> --- ibis/backends/bigquery/compiler.py | 5 +---- ibis/backends/postgres/compiler.py | 3 --- ibis/backends/sql/dialects.py | 1 - poetry.lock | 9 +++++---- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/ibis/backends/bigquery/compiler.py b/ibis/backends/bigquery/compiler.py index 69dec3405704..a359b4204889 100644 --- a/ibis/backends/bigquery/compiler.py +++ b/ibis/backends/bigquery/compiler.py @@ -154,9 +154,6 @@ def visit_BoundingBox(self, op, *, arg): visit_GeoXMax = visit_GeoXMin = visit_GeoYMax = visit_GeoYMin = visit_BoundingBox - def visit_ArrayStringJoin(self, op, *, arg, sep): - return self.f.anon.array_to_string(arg, sep) - def visit_GeoSimplify(self, op, *, arg, tolerance, preserve_collapsed): if ( not isinstance(op.preserve_collapsed, ops.Literal) @@ -236,7 +233,7 @@ def visit_StrRight(self, op, *, arg, nchars): return self.f.substr(arg, -self.f.least(self.f.length(arg), nchars)) def visit_StringJoin(self, op, *, arg, sep): - return self.f.anon.array_to_string(self.f.array(*arg), sep) + return self.f.array_to_string(self.f.array(*arg), sep) def visit_DayOfWeekIndex(self, op, *, arg): return self.f.mod(self.f.extract(self.v.dayofweek, arg) + 5, 7) diff --git a/ibis/backends/postgres/compiler.py b/ibis/backends/postgres/compiler.py index e904952624f9..ddec4183a112 100644 --- a/ibis/backends/postgres/compiler.py +++ b/ibis/backends/postgres/compiler.py @@ -345,9 +345,6 @@ def visit_MapGet(self, op, *, arg, key, default): def visit_MapMerge(self, op, *, left, right): return sge.DPipe(this=left, expression=right) - def visit_ArrayStringJoin(self, op, *, arg, sep): - return self.f.anon.array_to_string(arg, sep) - def visit_TypeOf(self, op, *, arg): typ = self.cast(self.f.pg_typeof(arg), dt.string) return self.if_( diff --git a/ibis/backends/sql/dialects.py b/ibis/backends/sql/dialects.py index 9c25df5428f6..8ff063fd5552 100644 --- a/ibis/backends/sql/dialects.py +++ b/ibis/backends/sql/dialects.py @@ -46,7 +46,6 @@ class Generator(Postgres.Generator): TRANSFORMS = Postgres.Generator.TRANSFORMS.copy() | { sge.ApproxDistinct: rename_func("approx_count_distinct"), sge.Pow: rename_func("power"), - sge.ArrayJoin: rename_func("array_to_string"), } diff --git a/poetry.lock b/poetry.lock index 652b8460dd12..4ce53795981f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5359,6 +5359,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -6379,13 +6380,13 @@ sqlcipher = ["sqlcipher3_binary"] [[package]] name = "sqlglot" -version = "22.3.1" +version = "22.4.0" description = "An easily customizable SQL parser and transpiler" optional = false python-versions = ">=3.7" files = [ - {file = "sqlglot-22.3.1-py3-none-any.whl", hash = "sha256:6f9db7146213fda05bb161e7827cb7684bb3496038290b570617f5f739886941"}, - {file = "sqlglot-22.3.1.tar.gz", hash = "sha256:ee2985b40601c7b553f17c2c13685f9f831bdfe3edba78fb7b385fc55c5a8a30"}, + {file = "sqlglot-22.4.0-py3-none-any.whl", hash = "sha256:9f5fb0e7c35b24bf2b30976b248f28bdfd8187d533a49ba15368aa0135837cf8"}, + {file = "sqlglot-22.4.0.tar.gz", hash = "sha256:959b93e0ea31fbd8ae51e38bb9f395d2cb1bc97cd39ecd1972135a70cb5b1815"}, ] [package.extras] @@ -7330,4 +7331,4 @@ visualization = ["graphviz"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "e888e14a4579d64f3d711a40b9105681ebd30caa464897c9f26f1b2755b78164" +content-hash = "5d1db97841f7821384f75ccc37fb2ee22397f6bd175a9e37ca5b0f6b03f1bf29" diff --git a/pyproject.toml b/pyproject.toml index 2ac3a06c8559..8b92bec88942 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ pyarrow-hotfix = ">=0.4,<1" python-dateutil = ">=2.8.2,<3" pytz = ">=2022.7" rich = ">=12.4.4,<14" -sqlglot = ">=22,<22.4" +sqlglot = ">=22.4,<22.6" toolz = ">=0.11,<1" typing-extensions = ">=4.3.0,<5" black = { version = ">=22.1.0,<25", optional = true } diff --git a/requirements-dev.txt b/requirements-dev.txt index c0b040403672..a43e7c5e10fd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -235,7 +235,7 @@ sortedcontainers==2.4.0 ; python_version >= "3.9" and python_version < "4.0" soupsieve==2.5 ; python_version >= "3.10" and python_version < "3.13" sphobjinv==2.3.1 ; python_version >= "3.10" and python_version < "3.13" sqlalchemy==2.0.28 ; python_version >= "3.9" and python_version < "4.0" -sqlglot==22.3.1 ; python_version >= "3.9" and python_version < "4.0" +sqlglot==22.4.0 ; python_version >= "3.9" and python_version < "4.0" stack-data==0.6.3 ; python_version >= "3.9" and python_version < "4.0" statsmodels==0.14.1 ; python_version >= "3.10" and python_version < "3.13" stdlib-list==0.10.0 ; python_version >= "3.9" and python_version < "4.0"