From d182e9e0e395ff5c1c11de87ff132800c64db1e8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:11:34 +0000 Subject: [PATCH] fix(deps): update dependency sqlglot to >=23.4,<25.15 (#9864) 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/sql/datatypes.py | 5 +++++ poetry.lock | 8 ++++---- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ibis/backends/sql/datatypes.py b/ibis/backends/sql/datatypes.py index a55556b7b812..c6ba528b70a1 100644 --- a/ibis/backends/sql/datatypes.py +++ b/ibis/backends/sql/datatypes.py @@ -1057,7 +1057,12 @@ class ClickHouseType(SqlglotType): @classmethod def from_ibis(cls, dtype: dt.DataType) -> sge.DataType: typ = super().from_ibis(dtype) + + if typ.this == typecode.NULLABLE: + return typ + # nested types cannot be nullable in clickhouse + typ.args["nullable"] = False if dtype.nullable and not ( dtype.is_map() or dtype.is_array() or dtype.is_struct() ): diff --git a/poetry.lock b/poetry.lock index 40f335649ba7..993351974548 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6866,13 +6866,13 @@ sqlcipher = ["sqlcipher3_binary"] [[package]] name = "sqlglot" -version = "25.12.0" +version = "25.14.0" description = "An easily customizable SQL parser and transpiler" optional = false python-versions = ">=3.7" files = [ - {file = "sqlglot-25.12.0-py3-none-any.whl", hash = "sha256:b0a9e512dbc8e2acec90b1d3ed27624f8f0f4ceaae30ac88817bec72ff3e89ca"}, - {file = "sqlglot-25.12.0.tar.gz", hash = "sha256:3106c2a8fe0209b5d1a4fdfc9e92ad0afa4ce5d2154276c5fa58b47dcf7c5b7d"}, + {file = "sqlglot-25.14.0-py3-none-any.whl", hash = "sha256:37ceb08e7527659cc3a08bad1010a84953183a5f7edd1bb3ab5969586875bce2"}, + {file = "sqlglot-25.14.0.tar.gz", hash = "sha256:202c49fb1e3957364ec0dad3a0d48af29972047c34b31e7b000a518f609c0063"}, ] [package.extras] @@ -7859,4 +7859,4 @@ visualization = ["graphviz"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "fb9a8cd17d3e458531f5b910a4f255a417b2c9360e881a108597a329a4c20fa4" +content-hash = "0091a532918425018f171ae14f5605729ffd025fcfda58e2be1b795afc8a8e3c" diff --git a/pyproject.toml b/pyproject.toml index 05b72b19e76b..469c2796e417 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.13" +sqlglot = ">=23.4,<25.15" 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 17ec423dcea3..1b86a1b16560 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.5 ; 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.12.0 ; python_version >= "3.10" and python_version < "4.0" +sqlglot==25.14.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"