summaryrefslogtreecommitdiffstats
path: root/tests/test_expressions.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-03 09:12:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-03 09:12:28 +0000
commit67c28dbe67209effad83d93b850caba5ee1e20e3 (patch)
treedffdfbfb4f0899c92a4c978e6eac55af2ff76367 /tests/test_expressions.py
parentReleasing debian version 11.5.2-1. (diff)
downloadsqlglot-67c28dbe67209effad83d93b850caba5ee1e20e3.tar.xz
sqlglot-67c28dbe67209effad83d93b850caba5ee1e20e3.zip
Merging upstream version 11.7.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_expressions.py')
-rw-r--r--tests/test_expressions.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_expressions.py b/tests/test_expressions.py
index b09b2ab..eb0cf56 100644
--- a/tests/test_expressions.py
+++ b/tests/test_expressions.py
@@ -244,11 +244,11 @@ class TestExpressions(unittest.TestCase):
def test_function_building(self):
self.assertEqual(exp.func("max", 1).sql(), "MAX(1)")
self.assertEqual(exp.func("max", 1, 2).sql(), "MAX(1, 2)")
- self.assertEqual(exp.func("bla", 1, "foo").sql(), "BLA(1, 'foo')")
+ self.assertEqual(exp.func("bla", 1, "foo").sql(), "BLA(1, foo)")
self.assertEqual(exp.func("COUNT", exp.Star()).sql(), "COUNT(*)")
self.assertEqual(exp.func("bloo").sql(), "BLOO()")
self.assertEqual(
- exp.func("locate", "x", "xo", dialect="hive").sql("hive"), "LOCATE('x', 'xo')"
+ exp.func("locate", "'x'", "'xo'", dialect="hive").sql("hive"), "LOCATE('x', 'xo')"
)
self.assertIsInstance(exp.func("instr", "x", "b", dialect="mysql"), exp.StrPosition)
@@ -528,6 +528,7 @@ class TestExpressions(unittest.TestCase):
self.assertIsInstance(parse_one("VARIANCE_POP(a)"), exp.VariancePop)
self.assertIsInstance(parse_one("YEAR(a)"), exp.Year)
self.assertIsInstance(parse_one("HLL(a)"), exp.Hll)
+ self.assertIsInstance(parse_one("ARRAY(time, foo)"), exp.Array)
def test_column(self):
column = parse_one("a.b.c.d")