Canonicalized queries remove non-executable comments
The comments which do not alter the functionality of a query are now removed from canonicalized queries. Also fixed missing semicolon in the comment removal regex and added tests for comment removal.
This commit is contained in:
11
query_classifier/test/canonical_tests/comment.expected
Normal file
11
query_classifier/test/canonical_tests/comment.expected
Normal file
@ -0,0 +1,11 @@
|
||||
select ?;
|
||||
select ?;
|
||||
select ?;
|
||||
select /*! ? + */ ?;
|
||||
select /*!? ? + */ ?;
|
||||
select /*!? ? + */ ?;
|
||||
SELECT ? ;
|
||||
SELECT ? /*! +? */;
|
||||
SELECT ? /*!? +? */;
|
||||
SELECT ? /*M! +? */;
|
||||
SELECT ? /*M!? +? */;
|
||||
Reference in New Issue
Block a user