Skip to content

Commit

Permalink
fix(deps): update dependency sqlglot to >=23.4,<25.21 (#10050)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Phillip Cloud <[email protected]>
  • Loading branch information
renovate[bot] and cpcloud authored Sep 7, 2024
1 parent 3d8280b commit 422d361
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 24 deletions.
3 changes: 3 additions & 0 deletions ibis/backends/sql/compilers/impala.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ def visit_Date(self, op, *, arg):
def visit_RegexReplace(self, op, *, arg, pattern, replacement):
return self.f.regexp_replace(arg, pattern, replacement, dialect=self.dialect)

def visit_RegexExtract(self, op, *, arg, pattern, index):
return self.f.anon.regexp_extract(arg, pattern, index)

def visit_Round(self, op, *, arg, digits):
rounded = self.f.round(*filter(None, (arg, digits)))

Expand Down
8 changes: 1 addition & 7 deletions ibis/backends/sql/compilers/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,7 @@ def visit_ArrayPosition(self, op, *, arg, other):

def visit_RegexExtract(self, op, *, arg, pattern, index):
# https://docs.snowflake.com/en/sql-reference/functions/regexp_substr
return sge.RegexpExtract(
this=arg,
expression=pattern,
position=sge.convert(1),
group=index,
parameters=sge.convert("ce"),
)
return self.f.anon.regexp_substr(arg, pattern, 1, 1, "ce", index)

def visit_ArrayZip(self, op, *, arg):
return self.if_(
Expand Down
2 changes: 2 additions & 0 deletions ibis/backends/sql/dialects.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def new_name(names: set[str], name: str) -> str:

class Flink(Hive):
UNESCAPED_SEQUENCES = {"\\\\d": "\\d"}
REGEXP_EXTRACT_DEFAULT_GROUP = 0

class Generator(Hive.Generator):
UNNEST_WITH_ORDINALITY = False
Expand Down Expand Up @@ -308,6 +309,7 @@ class Tokenizer(Hive.Tokenizer):

class Impala(Hive):
NULL_ORDERING = "nulls_are_large"
REGEXP_EXTRACT_DEFAULT_GROUP = 0

class Generator(Hive.Generator):
TRANSFORMS = Hive.Generator.TRANSFORMS.copy() | {
Expand Down
10 changes: 0 additions & 10 deletions ibis/backends/tests/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,6 @@ def string_temp_table(backend, con):
raises=AssertionError,
reason="Spark SQL LTRIM doesn't accept characters to trim",
),
pytest.mark.notimpl(
["bigquery", "snowflake"],
raises=AssertionError,
reason="does a full `strip` instead",
),
],
),
param(
Expand All @@ -1274,11 +1269,6 @@ def string_temp_table(backend, con):
raises=AssertionError,
reason="Spark SQL RTRIM doesn't accept characters to trim",
),
pytest.mark.notimpl(
["bigquery", "snowflake"],
raises=AssertionError,
reason="does a full `strip` instead",
),
],
),
param(
Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ atpublic = ">=2.3,<6"
parsy = ">=2,<3"
python-dateutil = ">=2.8.2,<3"
pytz = ">=2022.7"
sqlglot = ">=23.4,<25.20"
sqlglot = ">=23.4,<25.21"
toolz = ">=0.11,<1"
typing-extensions = ">=4.3.0,<5"
numpy = { version = ">=1.23.2,<3", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.0 ; python_version >= "3.10" and python_version < "4.0"
sqlglot==25.20.1 ; 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"
Expand Down

0 comments on commit 422d361

Please sign in to comment.