-
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
Update statement route #12316
Update statement route #12316
Conversation
* @param expression binary operation expression | ||
* @return column name | ||
*/ | ||
public static Optional<String> extractColumnName(final BinaryOperationExpression expression) { |
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.
@strongduanmu Please look at this coding, do you think we can get all necessary info from statementContext
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.
@strongduanmu Please look at this coding, do you think we can get all necessary info from
statementContext
@tristaZero We already have a tool to extract columns based on expression, and we can use ColumnExtractor to replace this logic.
Codecov Report
@@ Coverage Diff @@
## master #12316 +/- ##
============================================
- Coverage 63.73% 63.64% -0.09%
- Complexity 1260 1273 +13
============================================
Files 2351 2364 +13
Lines 35754 35963 +209
Branches 6211 6253 +42
============================================
+ Hits 22787 22889 +102
- Misses 11142 11220 +78
- Partials 1825 1854 +29
Continue to review full report at Codecov.
|
* @param expression binary operation expression | ||
* @return column name | ||
*/ | ||
public static Optional<String> extractColumnName(final BinaryOperationExpression expression) { |
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.
@strongduanmu Please look at this coding, do you think we can get all necessary info from
statementContext
@tristaZero We already have a tool to extract columns based on expression, and we can use ColumnExtractor to replace this logic.
} | ||
|
||
@Override | ||
protected ShadowDetermineCondition createShadowDetermineCondition() { |
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.
@soulasuna Why not consider extracting a ShadowConditionEngine to handle these logics like ShardingConditionEngine?
Add update statement route.
For #11661.
Changes proposed in this pull request: