mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 11:17:23 +00:00
Remove Token::Identifier match arm from parse_value
An identifier is not a literal value, and parse_value is not called on such a token anyway.
This commit is contained in:
parent
d0a65ffd05
commit
efdbf0f9dc
1 changed files with 1 additions and 1 deletions
|
@ -734,6 +734,7 @@ impl Parser {
|
|||
Ok(values)
|
||||
}
|
||||
|
||||
/// Parse a literal value (numbers, strings, date/time, booleans)
|
||||
fn parse_value(&mut self) -> Result<Value, ParserError> {
|
||||
match self.next_token() {
|
||||
Some(t) => {
|
||||
|
@ -753,7 +754,6 @@ impl Parser {
|
|||
Ok(n) => Ok(Value::Long(n)),
|
||||
Err(e) => parser_err!(format!("Could not parse '{}' as i64: {}", n, e)),
|
||||
},
|
||||
Token::Identifier(id) => Ok(Value::String(id.to_string())),
|
||||
Token::SingleQuotedString(ref s) => {
|
||||
Ok(Value::SingleQuotedString(s.to_string()))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue