mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-11 14:32:04 +00:00
commit
86a2fbd8e4
2 changed files with 18 additions and 0 deletions
|
@ -1354,7 +1354,11 @@ impl Parser {
|
|||
/// Parse a restricted `SELECT` statement (no CTEs / `UNION` / `ORDER BY`),
|
||||
/// assuming the initial `SELECT` was already consumed
|
||||
pub fn parse_select(&mut self) -> Result<SQLSelect, ParserError> {
|
||||
let all = self.parse_keyword("ALL");
|
||||
let distinct = self.parse_keyword("DISTINCT");
|
||||
if all && distinct {
|
||||
return parser_err!("Cannot specify both ALL and DISTINCT in SELECT");
|
||||
}
|
||||
let projection = self.parse_select_list()?;
|
||||
|
||||
let (relation, joins) = if self.parse_keyword("FROM") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue