-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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-15760][datasource-plugin] fix sql task split error #15760 #15794
Conversation
* Fix the bug in SQL splitting by completing the task in two steps: 1. removeComment 2. split * Add a unit test for Hive SQL splitting.
hi @songwenyong cool,but i dont think this is bug ,i think this a feature, cc @caishunfeng @EricGao888 WDYT? |
It's more like an improvement for me. |
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.
Please link this pr to your issue. @songwenyong
yep, you are right |
Please change title to [Improvement-IssueId] and link this pr to issue. @songwenyong |
This PR resolves the existing issue #15760 which created by stevqin. Do I need to create a new Improvement issue? |
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #15794 +/- ##
============================================
- Coverage 39.11% 39.11% -0.01%
Complexity 4887 4887
============================================
Files 1326 1326
Lines 45206 45215 +9
Branches 4818 4818
============================================
+ Hits 17683 17685 +2
- Misses 25635 25641 +6
- Partials 1888 1889 +1 ☔ View full report in Codecov by Sentry. |
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
Quality Gate failedFailed conditions |
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
fix #15760
Fix the bug in SQL splitting by completing the task in two steps: 1. removeComment 2. split
Add a unit test for Hive SQL splitting.
Purpose of the pull request
Fix the SQL splitting bug in the
datasource-plugin
module so that the framework can correctly recognize the--
comments at the end of SQL lines.Brief change log
Modify the DataSourceProcessor.splitAndRemoveComment method to make two calls. First, call SQLParserUtils.removeComment, and then call SQLParserUtils.split
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