terrymanu commented on a change in pull request #7476:
URL: https://github.com/apache/shardingsphere/pull/7476#discussion_r489415698
##########
File path:
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/ProjectionsTokenGenerator.java
##########
@@ -67,4 +90,41 @@ private String getDerivedProjectionText(final Projection
projection) {
}
return projection.getExpression() + " AS " +
projection.getAlias().get() + " ";
}
+
+ private String getDerivedProjectionTextFromColumnOrderByItemSegment(final
DerivedProjection projection, final TableExtractUtils utils, final RouteUnit
routeUnit) {
+ Preconditions.checkState(projection.getAlias().isPresent());
+ Preconditions.checkState(projection.getProjection() instanceof
ColumnOrderByItemSegment);
+ ColumnOrderByItemSegment columnOrderByItemSegment =
(ColumnOrderByItemSegment) projection.getProjection();
+ ColumnOrderByItemSegment newColumnOrderByItem =
generateNewColumnOrderByItem(columnOrderByItemSegment, routeUnit, utils);
+ return newColumnOrderByItem.getText() + " AS " +
projection.getAlias().get() + " ";
Review comment:
How about to avoid using `+` with string
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]