diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-09-30 05:07:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-09-30 05:07:28 +0000 |
commit | 5a674d94c3ab243e2dd6a00f9edf6cc50b018512 (patch) | |
tree | 0b6fe74b5b346f0b048162b56a12885f1a2c2912 /tests/test_parser.py | |
parent | Releasing debian version 6.2.1-1. (diff) | |
download | sqlglot-5a674d94c3ab243e2dd6a00f9edf6cc50b018512.tar.xz sqlglot-5a674d94c3ab243e2dd6a00f9edf6cc50b018512.zip |
Merging upstream version 6.2.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r-- | tests/test_parser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py index 9e430e2..4c46531 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -21,6 +21,11 @@ class TestParser(unittest.TestCase): self.assertIsNotNone(parse_one("date").find(exp.Column)) + def test_float(self): + self.assertEqual(parse_one(".2"), parse_one("0.2")) + self.assertEqual(parse_one("int 1"), parse_one("CAST(1 AS INT)")) + self.assertEqual(parse_one("int.5"), parse_one("CAST(0.5 AS INT)")) + def test_table(self): tables = [t.sql() for t in parse_one("select * from a, b.c, .d").find_all(exp.Table)] self.assertEqual(tables, ["a", "b.c", "d"]) |