Skip to content

Commit 9e3b2ec

Browse files
bugfix and fix UTs
1 parent 9e87a37 commit 9e3b2ec

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
@@ -170,7 +170,7 @@
170170
* index emits documents a fair random order. Multi-shard and multi-node tests doubly so.</li>
171171
* </ul>
172172
*/
173-
@TestLogging(value = "org.elasticsearch.xpack.esql:TRACE,org.elasticsearch.compute:TRACE", reason = "debug")
173+
// @TestLogging(value = "org.elasticsearch.xpack.esql:TRACE,org.elasticsearch.compute:TRACE", reason = "debug")
174174
public class CsvTests extends ESTestCase {
175175

176176
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
@@ -1188,7 +1188,7 @@ public void testLikeRLike() {
11881188
assertEquals(".*bar.*", rlike.pattern().asJavaRegex());
11891189

11901190
expectError("from a | where foo like 12", "no viable alternative at input 'foo like 12'");
1191-
expectError("from a | where foo rlike 12", "mismatched input '12'");
1191+
expectError("from a | where foo rlike 12", "no viable alternative at input 'foo rlike 12'");
11921192

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

0 commit comments

Comments
 (0)