1
0
Fork 0

Adding upstream version 26.1.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:59:41 +01:00
parent 09521056ff
commit d908bee480
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
119 changed files with 71635 additions and 68059 deletions

View file

@ -888,3 +888,15 @@ class TestParser(unittest.TestCase):
ast = parse_one("ALTER TABLE tbl DROP COLUMN col")
self.assertEqual(len(list(ast.find_all(exp.Table))), 1)
self.assertEqual(len(list(ast.find_all(exp.Column))), 1)
def test_udf_meta(self):
ast = parse_one("YEAR(a) /* sqlglot.anonymous */")
self.assertIsInstance(ast, exp.Anonymous)
# Meta flag is case sensitive
ast = parse_one("YEAR(a) /* sqlglot.anONymous */")
self.assertIsInstance(ast, exp.Year)
# Incomplete or incorrect anonymous meta comments are not registered
ast = parse_one("YEAR(a) /* sqlglot.anon */")
self.assertIsInstance(ast, exp.Year)