summaryrefslogtreecommitdiffstats
path: root/tests/test_expressions.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-09 04:35:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-09 04:35:58 +0000
commit0b7fdf5c8079fa3f09be1ba5823fb6274746303d (patch)
treeedc3d8cdec1a8eabd9361052fbfb7c14d719e6ce /tests/test_expressions.py
parentReleasing debian version 25.32.1-1. (diff)
downloadsqlglot-0b7fdf5c8079fa3f09be1ba5823fb6274746303d.tar.xz
sqlglot-0b7fdf5c8079fa3f09be1ba5823fb6274746303d.zip
Merging upstream version 25.34.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/test_expressions.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_expressions.py b/tests/test_expressions.py
index 62227cb..8629bdb 100644
--- a/tests/test_expressions.py
+++ b/tests/test_expressions.py
@@ -258,6 +258,14 @@ class TestExpressions(unittest.TestCase):
'SELECT * FROM "my-project"."example"."table" /* example.table */',
)
+ self.assertEqual(
+ exp.replace_tables(
+ parse_one("select * from example.table /* sqlglot.meta replace=false */"),
+ {"example.table": "a.b"},
+ ).sql(),
+ "SELECT * FROM example.table /* sqlglot.meta replace=false */",
+ )
+
def test_expand(self):
self.assertEqual(
exp.expand(
@@ -1168,7 +1176,7 @@ FROM foo""",
def test_set_meta(self):
query = parse_one("SELECT * FROM foo /* sqlglot.meta x = 1, y = a, z */")
- self.assertEqual(query.find(exp.Table).meta, {"x": "1", "y": "a", "z": True})
+ self.assertEqual(query.find(exp.Table).meta, {"x": True, "y": "a", "z": True})
self.assertEqual(query.sql(), "SELECT * FROM foo /* sqlglot.meta x = 1, y = a, z */")
def test_assert_is(self):