altmannmarcelo commented on code in PR #2034:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2034#discussion_r2362608437


##########
src/tokenizer.rs:
##########
@@ -4070,4 +4101,39 @@ mod tests {
             panic!("Tokenizer should have failed on {sql}, but it succeeded 
with {tokens:?}");
         }
     }
+    #[test]
+    fn tokenize_multiline_comment_with_c_style_comment() {
+        let sql = String::from("0/*! word */1");

Review Comment:
   @iffyio - Parsing the c_style comment unblocks sqlparser to not discard 
those as if they were a normal comment. Support for each hint will have to be 
added in a case by case bases. For example #2033 - MySQL adds a c-style comment 
if you run SHOW CREATE TABLE:
   
   ```
   mysql> SHOW CREATE TABLE b;
   
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | Table | Create Table                                                       
                                                                                
             |
   
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | b     | CREATE TABLE `b` (
     `ID` int DEFAULT NULL,
     `b` char(1) DEFAULT NULL /*!80023 INVISIBLE */
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
   
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set (0,008 sec)
   ```
   
   Without the current patch, the invisible keyword will be discarded. 



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