myuan 2 lat temu
rodzic
commit
a3c9021347
1 zmienionych plików z 27 dodań i 14 usunięć
  1. 27 14
      tests_config.py

+ 27 - 14
tests_config.py

@@ -485,20 +485,33 @@ sql_parser_tests = [
             }
         ],
     ),
-    ('drop table t1;', [{"type": "drop_stmt", "table_name": "t1"}]),
+    ("drop table t1;", [{"type": "drop_stmt", "table_name": "t1"}]),
+    (
+        "select * from tb1, tb2;",
+        [
+            {
+                "type": "select_stmt",
+                "select_cols": [{"type": "select_all_column"}],
+                "table_names": ["tb1", "tb2"],
+                "where": {},
+            }
+        ],
+    ),
 ]
 
 sql_checker_tests = [
-    ('drop table person;', True),
-    ('create table person(name string, age int, classId int);', True),
-    ('select age from person;', True),
-    ('select * from person;', True),
-    ('select gender from person;', 'column `"gender"` not exists in `person`'),
-    ('select 123 from person;', True),
-
-    ('drop table class;', True),
-    ('create table class (id int, grade int, faculty string);', True),
-    ('select * from class where grade = 2 and faculty = \'Computer Science\';', True),
-    ('select * from class where grade = 2 and count=33;', 'column `"count"` not exists in `class`'),
-
-]
+    ("drop table person;", True),
+    ("create table person(name string, age int, classId int);", True),
+    ("select age from person;", True),
+    ("select * from person;", True),
+    ("select gender from person;", 'column `gender` not exists in `person`'),
+    ("select 123 from person;", True),
+    ("drop table class;", True),
+    ("create table class (id int, grade int, faculty string);", True),
+    ("select * from class where grade = 2 and faculty = 'Computer Science';", True),
+    (
+        "select * from class where grade = 2 and count=33;",
+        'column `count` not exists in `class`',
+    ),
+    ("select age, class.grade from class, person;", True),
+]