chesnokoff commented on code in PR #12723:
URL: https://github.com/apache/ignite/pull/12723#discussion_r2792434697
##########
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/H2QueryInfo.java:
##########
@@ -258,19 +270,85 @@ public String planWithoutScanCount(String plan) {
* @param startPattern Start pattern.
* @param endMarker End marker.
*/
- private void removePattern(StringBuilder sb, String startPattern, String
endMarker) {
- int start = sb.lastIndexOf(startPattern);
+ private void removeLineWithPattern(StringBuilder sb, String startPattern,
String endMarker) {
+ int searchFrom = 0;
+ int start = sb.indexOf(startPattern, searchFrom);
while (start != -1) {
+ while (start > 0 && sb.charAt(start) != '\n')
+ --start;
+
int end = sb.indexOf(endMarker, start);
if (end == -1)
break;
sb.delete(start, end + endMarker.length());
- start = sb.lastIndexOf(startPattern);
+ searchFrom = start;
+ start = sb.indexOf(startPattern, searchFrom);
+ }
+ }
+
+ /**
+ * Normalizes H2 auto-generated numeric aliases (e.g. "_1", "_4") in a
plan to make plan history stable
+ * across repeated executions of the same logical query.
+ */
+ private String planWithoutSystemAliases(String plan) {
Review Comment:
Goal is to find aliases like _123 and replace them with __A1, __A2, __A3 and
so on
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]