From 9427afc80e7982de483bfd941d4ba07c7d7640f9 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 8 Feb 2024 07:49:38 -0500 Subject: [PATCH] revert: fix(deps): update dependency sqlglot to v21 (#8278) --- ibis/backends/snowflake/__init__.py | 2 +- .../test_sql/test_union_aliasing/trino/out.sql | 4 ++-- poetry.lock | 10 +++++----- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ibis/backends/snowflake/__init__.py b/ibis/backends/snowflake/__init__.py index 0409365478f4..b02cf825412b 100644 --- a/ibis/backends/snowflake/__init__.py +++ b/ibis/backends/snowflake/__init__.py @@ -1004,7 +1004,7 @@ def insert( query = sg.exp.insert( expression=self.compile(obj), into=table, - columns=[sg.column(col, quoted=True) for col in obj.columns], + columns=[sg.to_identifier(col, quoted=True) for col in obj.columns], dialect=self.name, ) with self.begin() as con: diff --git a/ibis/backends/tests/snapshots/test_sql/test_union_aliasing/trino/out.sql b/ibis/backends/tests/snapshots/test_sql/test_union_aliasing/trino/out.sql index 8dd0e17e3ea2..beed99d33761 100644 --- a/ibis/backends/tests/snapshots/test_sql/test_union_aliasing/trino/out.sql +++ b/ibis/backends/tests/snapshots/test_sql/test_union_aliasing/trino/out.sql @@ -16,8 +16,8 @@ WITH t0 AS ( t1.field_of_study AS field_of_study, t1.years AS years, t1.degrees AS degrees, - ARBITRARY(t1.degrees) OVER (PARTITION BY t1.field_of_study ORDER BY t1.years ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS earliest_degrees, - ARBITRARY(t1.degrees) OVER (PARTITION BY t1.field_of_study ORDER BY t1.years ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS latest_degrees + FIRST_VALUE(t1.degrees) OVER (PARTITION BY t1.field_of_study ORDER BY t1.years ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS earliest_degrees, + LAST_VALUE(t1.degrees) OVER (PARTITION BY t1.field_of_study ORDER BY t1.years ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS latest_degrees FROM t1 ), t3 AS ( SELECT diff --git a/poetry.lock b/poetry.lock index 6c99f080e3d4..4436f5975738 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6484,17 +6484,17 @@ sqlalchemy = ">=1.0.0" [[package]] name = "sqlglot" -version = "21.0.1" +version = "20.8.0" description = "An easily customizable SQL parser and transpiler" optional = false python-versions = ">=3.7" files = [ - {file = "sqlglot-21.0.1-py3-none-any.whl", hash = "sha256:eed0f1b1506e25e34d91a24eb8c90eb078ec2dcee9e541d1fbc75f0e55e0f543"}, - {file = "sqlglot-21.0.1.tar.gz", hash = "sha256:747cc1cc1b69024bbce8e38581115bf0888fb6748cbad6d09f8153fc1dc82af8"}, + {file = "sqlglot-20.8.0-py3-none-any.whl", hash = "sha256:cb73b81a26da462c34b12b98cf193d679d4b5693703d309db236d9784cef60bb"}, + {file = "sqlglot-20.8.0.tar.gz", hash = "sha256:5636e97fab9efdb4a8690c0e32bbd2d657fe91eb650f10e913a56b4bd979faef"}, ] [package.extras] -dev = ["duckdb (>=0.6)", "maturin (>=1.4,<2.0)", "mypy", "pandas", "pdoc", "pre-commit", "pyspark", "python-dateutil", "ruff", "types-python-dateutil", "typing-extensions"] +dev = ["autoflake", "black", "duckdb (>=0.6)", "isort", "maturin (>=1.4,<2.0)", "mypy (>=0.990)", "pandas", "pdoc", "pre-commit", "pyspark", "python-dateutil", "types-python-dateutil"] rs = ["sqlglotrs (==0.1.0)"] [[package]] @@ -7445,4 +7445,4 @@ visualization = ["graphviz"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f5d82772af26d262eb3df745659750bd76602bfaaea7e0b7799486a76b3e3ceb" +content-hash = "3e9fad9badab8b70856437d3bd009797e7910bb8bfd358960f072593249a2af6" diff --git a/pyproject.toml b/pyproject.toml index 8bebb366c760..62bd330ed647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ pyarrow-hotfix = ">=0.4,<1" python-dateutil = ">=2.8.2,<3" pytz = ">=2022.7" rich = ">=12.4.4,<14" -sqlglot = ">=18.12.0,<=21.0.1" +sqlglot = ">=18.12.0,<=20.11" 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 dcf0f12ef5c5..4cf8ab14dfef 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -242,7 +242,7 @@ sqlalchemy-exasol==4.6.3 ; python_version >= "3.9" and python_version < "4.0" sqlalchemy-risingwave==1.0.0 ; python_version >= "3.9" and python_version < "4.0" sqlalchemy-views==0.3.2 ; python_version >= "3.9" and python_version < "4.0" sqlalchemy==1.4.51 ; python_version >= "3.9" and python_version < "4.0" -sqlglot==21.0.1 ; python_version >= "3.9" and python_version < "4.0" +sqlglot==20.8.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"