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

Bump sqlglot from 26.1.3 to 26.3.8 #1431

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ classifiers = [
]
dependencies = [
"databricks-sdk>=0.29,<0.42",
"sqlglot==26.1.3",
"sqlglot==26.3.8",
"databricks-labs-blueprint[yaml]>=0.2.3",
"databricks-labs-lsql>=0.7.5,<0.14.0", # TODO: Limit the LSQL version until dependencies are correct.
"cryptography>=41.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ select charindex('an', 'banana', 3),
charindex('ab', 'abababab'), n, h, CHARINDEX(n, h) FROM pos;

-- databricks sql:
SELECT CHARINDEX('an', 'banana', 3), CHARINDEX('ab', 'abababab'), n, h, CHARINDEX(n, h) FROM pos;
SELECT LOCATE('an', 'banana', 3), LOCATE('ab', 'abababab'), n, h, LOCATE(n, h) FROM pos;
15 changes: 0 additions & 15 deletions tests/unit/transpiler/test_databricks.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
"""
Test Cases to validate source Snowflake dialect
"""
from pathlib import Path

import pytest

from ..conftest import FunctionalTestFile, get_functional_test_files_from_directory

path = Path(__file__).parent / Path('../../resources/functional/snowflake/')
functional_tests = get_functional_test_files_from_directory(path, "snowflake", "databricks", False)
test_names = [f.test_name for f in functional_tests]


@pytest.mark.parametrize("sample", functional_tests, ids=test_names)
def test_snowflake(dialect_context, sample: FunctionalTestFile):
validate_source_transpile, _ = dialect_context
validate_source_transpile(databricks_sql=sample.databricks_sql, source={"snowflake": sample.source}, pretty=True)


def test_parse_parameter(dialect_context):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.mark.parametrize("sample", functional_tests_expected_exceptions, ids=test_names_expected_exceptions)
def test_databricks_expected_exceptions(dialect_context, sample: FunctionalTestFileWithExpectedException):
def test_snowflake_expected_exceptions(dialect_context, sample: FunctionalTestFileWithExpectedException):
validate_source_transpile, _ = dialect_context
with pytest.raises(type(sample.expected_exception)):
validate_source_transpile(databricks_sql=sample.databricks_sql, source={"snowflake": sample.source})
Loading