Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency sqlglot to >=23.4,<25.21 #10050

Merged
merged 7 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_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)

Check warning on line 427 in ibis/backends/sql/compilers/snowflake.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/sql/compilers/snowflake.py#L427

Added line #L427 was not covered by tests

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