You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/06 01:50:10 UTC

[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #18152: little optimize SubstitutableColumnNameToken.toString method

tuichenchuxin commented on code in PR #18152:
URL: https://github.com/apache/shardingsphere/pull/18152#discussion_r889772932


##########
shardingsphere-infra/shardingsphere-infra-rewrite/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/token/pojo/generic/SubstitutableColumnNameToken.java:
##########
@@ -76,11 +76,17 @@ public SubstitutableColumnNameToken(final int startIndex, final int stopIndex, f
     @Override
     public String toString(final RouteUnit routeUnit) {
         Map<String, String> logicAndActualTables = getLogicAndActualTables(routeUnit);
-        StringBuilder builder = lastColumn ? new StringBuilder(COLUMN_NAME_SPLITTER) : new StringBuilder();
+        StringBuilder result = new StringBuilder();

Review Comment:
   I have tried StringJoiner, but the performance is not good enough.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org