fix: sqlparse fallback for formatting queries (#30578)

This commit is contained in:
Beto Dealmeida
2024-10-11 15:45:40 -04:00
committed by GitHub
parent 9a2b1a5cf7
commit 47c1e09c75
4 changed files with 125 additions and 35 deletions

View File

@@ -241,14 +241,7 @@ def test_select_star(mocker: MockerFixture) -> None:
latest_partition=False,
cols=cols,
)
assert (
sql
== """SELECT
a
FROM my_table
LIMIT ?
OFFSET ?"""
)
assert sql == "SELECT a\nFROM my_table\nLIMIT ?\nOFFSET ?"
sql = NoLimitDBEngineSpec.select_star(
database=database,
@@ -260,12 +253,7 @@ OFFSET ?"""
latest_partition=False,
cols=cols,
)
assert (
sql
== """SELECT
a
FROM my_table"""
)
assert sql == "SELECT a\nFROM my_table"
def test_extra_table_metadata(mocker: MockerFixture) -> None: