|
@@ -279,7 +279,7 @@ sql_parser_tests = [
|
|
|
{
|
|
|
"type": "select_stmt",
|
|
|
"select_cols": [{"type": "select_all_column"}],
|
|
|
- "table_name": "t2",
|
|
|
+ "table_names": ["t2"],
|
|
|
"where": {},
|
|
|
}
|
|
|
],
|
|
@@ -296,7 +296,7 @@ sql_parser_tests = [
|
|
|
"alias": "t",
|
|
|
}
|
|
|
],
|
|
|
- "table_name": "t2",
|
|
|
+ "table_names": ["t2"],
|
|
|
"where": {
|
|
|
"type": "大于",
|
|
|
"left": {"type": "identifier", "value": "col1"},
|
|
@@ -316,7 +316,7 @@ sql_parser_tests = [
|
|
|
"target": {"type": "identifier", "value": "Sname"},
|
|
|
}
|
|
|
],
|
|
|
- "table_name": "Student",
|
|
|
+ "table_names": ["Student"],
|
|
|
"where": {
|
|
|
"type": "且",
|
|
|
"left": {
|
|
@@ -362,7 +362,7 @@ sql_parser_tests = [
|
|
|
},
|
|
|
}
|
|
|
],
|
|
|
- "table_name": "Student",
|
|
|
+ "table_names": ["Student"],
|
|
|
"where": {
|
|
|
"type": "包含于",
|
|
|
"left": {"type": "identifier", "value": "Sno"},
|
|
@@ -374,7 +374,7 @@ sql_parser_tests = [
|
|
|
"target": {"type": "identifier", "value": "Sno"},
|
|
|
}
|
|
|
],
|
|
|
- "table_name": "SC",
|
|
|
+ "table_names": ["SC"],
|
|
|
"where": {
|
|
|
"type": "相等",
|
|
|
"left": {
|
|
@@ -409,7 +409,7 @@ sql_parser_tests = [
|
|
|
},
|
|
|
}
|
|
|
],
|
|
|
- "table_name": "Student",
|
|
|
+ "table_names": ["Student"],
|
|
|
"join_options": {
|
|
|
"type": "join_options",
|
|
|
"join_with": {"type": "identifier", "value": "SC"},
|
|
@@ -451,7 +451,7 @@ sql_parser_tests = [
|
|
|
},
|
|
|
}
|
|
|
],
|
|
|
- "table_name": "Student",
|
|
|
+ "table_names": ["Student"],
|
|
|
"join_options": {
|
|
|
"type": "join_options",
|
|
|
"join_with": {"type": "identifier", "value": "SC"},
|
|
@@ -499,4 +499,6 @@ sql_checker_tests = [
|
|
|
('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`'),
|
|
|
+
|
|
|
]
|