HexyinUESTC commented on code in PR #43038: URL: https://github.com/apache/doris/pull/43038#discussion_r1825425466
########## fe/fe-core/src/main/java/org/apache/doris/qe/MysqlConnectProcessor.java: ########## @@ -195,6 +198,24 @@ private void handleExecute() { handleExecute(preparedStatementContext.command, stmtId, preparedStatementContext); } + private String parseRealSql(String origStmt, Map<PlaceholderId, Expression> idExpressionMap) { + if (idExpressionMap.isEmpty()) { + return origStmt; + } + // To maintain the original order of replace, sort the entries accordingly. + List<Map.Entry<PlaceholderId, Expression>> sortedEntries = new ArrayList<>(idExpressionMap.entrySet()); + sortedEntries.sort(Comparator.comparingInt(entry -> entry.getKey().asInt())); + for (Map.Entry<PlaceholderId, Expression> entry : sortedEntries) { + Expression expr = entry.getValue(); + String value = ""; + if (!expr.isNullLiteral()) { Review Comment: If expr is a NullLiteral, toString() will return "NULL". -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org