mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-30 10:47:22 +00:00
[mssql] Support single-quoted column aliases
This commit is contained in:
parent
d0a782d8cc
commit
93c9000102
3 changed files with 30 additions and 7 deletions
|
@ -212,6 +212,21 @@ fn parse_column_aliases() {
|
|||
one_statement_parses_to("SELECT a.col + 1 newname FROM foo AS a", &sql);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_eof_after_as() {
|
||||
let res = parse_sql_statements("SELECT foo AS");
|
||||
assert_eq!(
|
||||
ParserError::ParserError("Expected an identifier after AS, found: EOF".to_string()),
|
||||
res.unwrap_err()
|
||||
);
|
||||
|
||||
let res = parse_sql_statements("SELECT 1 FROM foo AS");
|
||||
assert_eq!(
|
||||
ParserError::ParserError("Expected an identifier after AS, found: EOF".to_string()),
|
||||
res.unwrap_err()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_select_count_wildcard() {
|
||||
let sql = "SELECT COUNT(*) FROM customer";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue