mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-29 10:24:06 +00:00
Move wildcard test to generic parser
This commit is contained in:
parent
80aceba630
commit
f9fb4bedfb
2 changed files with 5 additions and 13 deletions
|
@ -20,16 +20,3 @@ fn parse_simple_select() {
|
||||||
_ => assert!(false),
|
_ => assert!(false),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn roundtrip_qualified_wildcard() {
|
|
||||||
let sql = String::from("SELECT COUNT(Employee.*) FROM northwind.Order JOIN northwind.Employee ON Order.employee = Employee.id");
|
|
||||||
let ast = Parser::parse_sql(&AnsiSqlDialect {}, sql.clone()).unwrap();
|
|
||||||
assert_eq!(1, ast.len());
|
|
||||||
match ast.first().unwrap() {
|
|
||||||
SQLStatement::SQLSelect(ref query) => {
|
|
||||||
assert_eq!(sql, query.to_string());
|
|
||||||
}
|
|
||||||
_ => assert!(false),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -91,6 +91,11 @@ fn parse_select_wildcard() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn parse_count_wildcard() {
|
||||||
|
verified_only_select("SELECT COUNT(Employee.*) FROM Order JOIN Employee ON Order.employee = Employee.id");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_column_aliases() {
|
fn parse_column_aliases() {
|
||||||
let sql = "SELECT a.col + 1 AS newname FROM foo AS a";
|
let sql = "SELECT a.col + 1 AS newname FROM foo AS a";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue