alamb commented on code in PR #5914:
URL: https://github.com/apache/arrow-datafusion/pull/5914#discussion_r1160735063
##########
datafusion/sql/src/expr/arrow_cast.rs:
##########
@@ -393,6 +418,44 @@ impl<'a> Tokenizer<'a> {
})?;
return Ok(Token::Integer(val));
}
+ // if it started with a double quote `"`, try parsing it as a
double quoted string
+ else if c == '"' {
+ let len = self.word.chars().count();
+
+ // to verify it's double quoted
+ if let Some(last_c) = self.word.chars().last() {
+ if last_c != '"' || len < 2 {
+ return Err(make_error(
+ self.val,
+ &format!("parsing {} as double quoted string: last
char must be \"", self.word),
+ ));
+ }
+ }
+
+ if len == 2 {
Review Comment:
👍 nice error messages
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]