mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-03 22:08:16 +00:00
Support SELECT ALL
Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
This commit is contained in:
parent
4f944dd4aa
commit
55fc8c5a57
2 changed files with 18 additions and 0 deletions
|
@ -135,6 +135,20 @@ fn parse_select_distinct() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_select_all() {
|
||||
one_statement_parses_to("SELECT ALL name FROM customer", "SELECT name FROM customer");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_select_all_distinct() {
|
||||
let result = parse_sql_statements("SELECT ALL DISTINCT name FROM customer");
|
||||
assert_eq!(
|
||||
ParserError::ParserError("Cannot specify both ALL and DISTINCT in SELECT".to_string()),
|
||||
result.unwrap_err(),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_select_wildcard() {
|
||||
let sql = "SELECT * FROM foo";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue