File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -363,9 +363,6 @@ tests:
363363- class : org.elasticsearch.xpack.migrate.action.ReindexDatastreamIndexTransportActionIT
364364 method : testFailIfMetadataBlockSet
365365 issue : https://github.com/elastic/elasticsearch/issues/121978
366- - class : org.elasticsearch.xpack.esql.parser.StatementParserTests
367- method : testValidFromPattern
368- issue : https://github.com/elastic/elasticsearch/issues/121990
369366
370367# Examples:
371368#
Original file line number Diff line number Diff line change @@ -78,16 +78,17 @@ public static String randomIndexPattern(Feature... features) {
7878 index .insert (0 , "-" );
7979 }
8080
81- var pattern = maybeQuote (index .toString ());
81+ var pattern = index .toString ();
82+ if (pattern .contains ("|" )) {
83+ pattern = quote (pattern );
84+ }
85+ pattern = maybeQuote (pattern );
86+
8287 if (canAdd (Features .CROSS_CLUSTER , features )) {
8388 var cluster = maybeQuote (randomIdentifier ());
8489 pattern = maybeQuote (cluster + ":" + pattern );
8590 }
8691
87- if (pattern .contains ("|" ) && pattern .contains ("\" " ) == false ) {
88- pattern = quote (pattern );
89- }
90-
9192 return pattern ;
9293 }
9394
You can’t perform that action at this time.
0 commit comments