Fix #17635 - Semicolon repeatedly suffixed onto SQL if query ends in comment#18264
Conversation
1e28bf1 to
0f47d83
Compare
0f47d83 to
9b30512
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #18264 +/- ##
============================================
+ Coverage 54.95% 54.97% +0.02%
- Complexity 16428 16434 +6
============================================
Files 631 631
Lines 64544 64550 +6
============================================
+ Hits 35467 35487 +20
+ Misses 29077 29063 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
|
@kamil-tekiela You did some refactoring to this code, how can this be merged without needing to use that very costy str_contains function ? |
|
|
…SQL query Signed-off-by: Lakshaya Tohan <lakshaya.tohan@gmail.com>
9b30512 to
e2bfbc5
Compare
|
Hi @kamil-tekiela |
|
I don't think this should be merged because the semicolon is still added in the wrong place. This is really a job for the sql-parser and it can already do it (although there is a bug), but ImportSql is not the only place where this method is called from, so this needs a bit more refactoring. |
|
Okay, if we can have a regression test first that would be good. Because the current code seems fine |
Description
Added check for addition of semicolon only when it is missing while editing and/or running an SQL query.
Fixes #17635
Before submitting pull request, please review the following checklist:
Signed-off-byline as described in our DCO. This ensures that the work you're submitting is your own creation.