summaryrefslogtreecommitdiffstats
path: root/tests/test_optimizer.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 07:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 07:23:18 +0000
commit9c5cf7fc4a20988d0eda33e4a3afdf7168c05104 (patch)
tree85160e0a3a39feede46b7546566279525b3af373 /tests/test_optimizer.py
parentReleasing debian version 25.31.4-1. (diff)
downloadsqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.tar.xz
sqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.zip
Merging upstream version 25.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_optimizer.py')
-rw-r--r--tests/test_optimizer.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py
index 0fa4ff6..4a41e4a 100644
--- a/tests/test_optimizer.py
+++ b/tests/test_optimizer.py
@@ -132,7 +132,6 @@ class TestOptimizer(unittest.TestCase):
func,
pretty=False,
execute=False,
- set_dialect=False,
only=None,
**kwargs,
):
@@ -158,7 +157,7 @@ class TestOptimizer(unittest.TestCase):
validate_qualify_columns
)
- if set_dialect and dialect:
+ if dialect:
func_kwargs["dialect"] = dialect
future = pool.submit(parse_and_optimize, func, sql, dialect, **func_kwargs)
@@ -207,7 +206,6 @@ class TestOptimizer(unittest.TestCase):
pretty=True,
execute=True,
schema=schema,
- set_dialect=True,
)
def test_isolate_table_selects(self):
@@ -235,7 +233,6 @@ class TestOptimizer(unittest.TestCase):
optimizer.qualify_tables.qualify_tables,
db="db",
catalog="c",
- set_dialect=True,
)
def test_normalize(self):
@@ -446,11 +443,8 @@ class TestOptimizer(unittest.TestCase):
qualify_columns,
execute=True,
schema=self.schema,
- set_dialect=True,
- )
- self.check_file(
- "qualify_columns_ddl", qualify_columns, schema=self.schema, set_dialect=True
)
+ self.check_file("qualify_columns_ddl", qualify_columns, schema=self.schema)
def test_qualify_columns__with_invisible(self):
schema = MappingSchema(self.schema, {"x": {"a"}, "y": {"b"}, "z": {"b"}})
@@ -475,7 +469,6 @@ class TestOptimizer(unittest.TestCase):
self.check_file(
"normalize_identifiers",
optimizer.normalize_identifiers.normalize_identifiers,
- set_dialect=True,
)
self.assertEqual(optimizer.normalize_identifiers.normalize_identifiers("a%").sql(), '"a%"')
@@ -484,14 +477,13 @@ class TestOptimizer(unittest.TestCase):
self.check_file(
"quote_identifiers",
optimizer.qualify_columns.quote_identifiers,
- set_dialect=True,
)
def test_pushdown_projection(self):
self.check_file("pushdown_projections", pushdown_projections, schema=self.schema)
def test_simplify(self):
- self.check_file("simplify", simplify, set_dialect=True)
+ self.check_file("simplify", simplify)
expression = parse_one("SELECT a, c, b FROM table1 WHERE 1 = 1")
self.assertEqual(simplify(simplify(expression.find(exp.Where))).sql(), "WHERE TRUE")