-
Notifications
You must be signed in to change notification settings - Fork 5k
[Improvement] Use Druid to split multiple sql #15367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement] Use Druid to split multiple sql #15367
Conversation
4720539 to
034c483
Compare
6921e9a to
550d1c6
Compare
caishunfeng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| } | ||
|
|
||
| @Override | ||
| public List<String> splitAndRemoveComment(String sql) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some new UT for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Add some UT case for Oracle, Dorid, Mysql.
|
Please add some pr description. |
550d1c6 to
f2ddfa0
Compare
Done |
f2ddfa0 to
79b6bce
Compare
caishunfeng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
56ec086 to
9c3425a
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #15367 +/- ##
============================================
- Coverage 38.11% 38.11% -0.01%
+ Complexity 4698 4697 -1
============================================
Files 1300 1299 -1
Lines 44778 44783 +5
Branches 4800 4798 -2
============================================
- Hits 17069 17068 -1
- Misses 25858 25864 +6
Partials 1851 1851 ☔ View full report in Codecov by Sentry. |
...va/org/apache/dolphinscheduler/plugin/datasource/oracle/param/OracleDataSourceProcessor.java
Fixed
Show fixed
Hide fixed
...java/org/apache/dolphinscheduler/plugin/datasource/trino/param/TrinoDataSourceProcessor.java
Fixed
Show fixed
Hide fixed
5066043 to
8532464
Compare
caishunfeng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
8532464 to
62b6b5b
Compare
d916888 to
d8e1045
Compare
d8e1045 to
e27bb5c
Compare
|
caishunfeng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM again

Purpose of the pull request
Right now, we use
;\nto split the sql and use simple way to remove the comments. This cannot work will if the sql is complex, this PR will use Druid to split sql and remove comments.Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md