Skip to content

Commit c040e23

Browse files
bugfix and fix UTs
1 parent 0866016 commit c040e23

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/ExpressionBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ public Expression visitRlikeListExpression(EsqlBaseParser.RlikeListExpressionCon
789789
Expression left = expression(ctx.valueExpression());
790790
List<RLikePattern> rLikePatterns = ctx.string()
791791
.stream()
792-
.map(x -> new RLikePattern(visitString(x).fold(FoldContext.small()).toString()))
792+
.map(x -> new RLikePattern(BytesRefs.toString(visitString(x).fold(FoldContext.small()))))
793793
.toList();
794794
// for now we will use the old WildcardLike function for one argument case to allow compatibility in mixed version deployments
795795
Expression e = rLikePatterns.size() == 1

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
* index emits documents a fair random order. Multi-shard and multi-node tests doubly so.</li>
172172
* </ul>
173173
*/
174-
@TestLogging(value = "org.elasticsearch.xpack.esql:TRACE,org.elasticsearch.compute:TRACE", reason = "debug")
174+
// @TestLogging(value = "org.elasticsearch.xpack.esql:TRACE,org.elasticsearch.compute:TRACE", reason = "debug")
175175
public class CsvTests extends ESTestCase {
176176

177177
private static final Logger LOGGER = LogManager.getLogger(CsvTests.class);

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ public void testLikeRLike() {
12271227
assertEquals(".*bar.*", rlike.pattern().asJavaRegex());
12281228

12291229
expectError("from a | where foo like 12", "no viable alternative at input 'foo like 12'");
1230-
expectError("from a | where foo rlike 12", "mismatched input '12'");
1230+
expectError("from a | where foo rlike 12", "no viable alternative at input 'foo rlike 12'");
12311231

12321232
expectError(
12331233
"from a | where foo like \"(?i)(^|[^a-zA-Z0-9_-])nmap($|\\\\.)\"",

0 commit comments

Comments
 (0)