-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Code optimization for shardingsphere-shadow project. (#11282) #11285
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11285 +/- ##
============================================
- Coverage 63.49% 63.46% -0.04%
Complexity 1026 1026
============================================
Files 2200 2206 +6
Lines 33608 33683 +75
Branches 5881 5895 +14
============================================
+ Hits 21340 21376 +36
- Misses 10567 10601 +34
- Partials 1701 1706 +5
Continue to review full report at Codecov.
|
@@ -41,4 +41,8 @@ public final boolean isNeedRewrite(final SQLStatementContext sqlStatementContext | |||
} | |||
|
|||
protected abstract boolean isNeedRewriteForShadow(SQLStatementContext sqlStatementContext); | |||
|
|||
protected String getShadowColumn() { | |||
return shadowRule.getColumn(); |
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.
Why do we need another function?
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.
Each subclass is called multiple times, and protected methods are extracted from the parent class.
Code optimization for shardingsphere-shadow project.
For #11282
Changes proposed in this pull request: