LucaCappelletti94 commented on code in PR #2077:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2077#discussion_r2616193634


##########
src/tokenizer.rs:
##########
@@ -1877,12 +1962,66 @@ impl<'a> Tokenizer<'a> {
     }
 
     /// Tokenize an identifier or keyword, after the first char is already 
consumed.
-    fn tokenize_word(&self, first_chars: impl Into<String>, chars: &mut State) 
-> String {
+    fn tokenize_word(
+        &self,
+        first_chars: impl Into<String>,
+        chars: &mut State,
+        prev_keyword: Option<Keyword>,
+    ) -> Result<String, TokenizerError> {
         let mut s = first_chars.into();
         s.push_str(&peeking_take_while(chars, |ch| {
             self.dialect.is_identifier_part(ch)
         }));
-        s
+
+        while !matches!(prev_keyword, Some(Keyword::SELECT))

Review Comment:
   At this time it passes both the pre-existing tests and the tests I added to 
try and break it.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to