1
0
Fork 0

Merging upstream version 18.4.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:01:12 +01:00
parent b982664fe2
commit d90681de49
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
92 changed files with 43076 additions and 40554 deletions

View file

@ -719,3 +719,18 @@ class TestParser(unittest.TestCase):
self.assertEqual(ast.find(exp.Interval).this.sql(), "'71'")
self.assertEqual(ast.find(exp.Interval).unit.assert_is(exp.Var).sql(), "days")
def test_parse_concat_ws(self):
ast = parse_one("CONCAT_WS(' ', 'John', 'Doe')")
self.assertEqual(ast.sql(), "CONCAT_WS(' ', 'John', 'Doe')")
self.assertEqual(ast.expressions[0].sql(), "' '")
self.assertEqual(ast.expressions[1].sql(), "'John'")
self.assertEqual(ast.expressions[2].sql(), "'Doe'")
# Ensure we can parse without argument when error level is ignore
ast = parse(
"CONCAT_WS()",
error_level=ErrorLevel.IGNORE,
)
self.assertEqual(ast[0].sql(), "CONCAT_WS()")