Merging upstream version 18.4.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b982664fe2
commit
d90681de49
92 changed files with 43076 additions and 40554 deletions
|
@ -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()")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue