Skip to content

Commit 8608bfb

Browse files
Address code review comments
1 parent 2584aa4 commit 8608bfb

File tree

4 files changed

+12
-35
lines changed

4 files changed

+12
-35
lines changed

muted-tests.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -412,36 +412,3 @@ tests:
412412
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
413413
method: test {yaml=reference/search/retriever/line_906}
414414
issue: https://github.com/elastic/elasticsearch/issues/131041
415-
- class: org.elasticsearch.xpack.esql.optimizer.PhysicalPlanOptimizerTests
416-
method: testPushDownUpperCaseChangeRLike
417-
issue: https://github.com/elastic/elasticsearch/issues/131386
418-
- class: org.elasticsearch.xpack.esql.optimizer.PhysicalPlanOptimizerTests
419-
method: testChangeCaseAsInsensitiveWildcardLikeNotPushedDown
420-
issue: https://github.com/elastic/elasticsearch/issues/131386
421-
- class: org.elasticsearch.xpack.esql.optimizer.PhysicalPlanOptimizerTests
422-
method: testPushDownUpperCaseChangeLike
423-
issue: https://github.com/elastic/elasticsearch/issues/131386
424-
- class: org.elasticsearch.xpack.esql.optimizer.PhysicalPlanOptimizerTests
425-
method: testPushDownLowerCaseChangeRLike
426-
issue: https://github.com/elastic/elasticsearch/issues/131386
427-
- class: org.elasticsearch.xpack.esql.optimizer.PhysicalPlanOptimizerTests
428-
method: testPushDownLowerCaseChangeLike
429-
issue: https://github.com/elastic/elasticsearch/issues/131386
430-
- class: org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests
431-
method: testReplaceUpperStringCasinqgWithInsensitiveRLike
432-
issue: https://github.com/elastic/elasticsearch/issues/131386
433-
- class: org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests
434-
method: testReplaceLowerStringCasingWithInsensitiveRLike
435-
issue: https://github.com/elastic/elasticsearch/issues/131386
436-
- class: org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests
437-
method: testReplaceLowerStringCasingWithInsensitiveLike
438-
issue: https://github.com/elastic/elasticsearch/issues/131386
439-
- class: org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests
440-
method: testReplaceUpperStringCasingWithInsensitiveLike
441-
issue: https://github.com/elastic/elasticsearch/issues/131386
442-
- class: org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests
443-
method: testReplaceStringCasingAndLikeWithLocalRelation
444-
issue: https://github.com/elastic/elasticsearch/issues/131386
445-
- class: org.elasticsearch.xpack.esql.optimizer.LocalLogicalPlanOptimizerTests
446-
method: testReplaceStringCasingAndRLikeWithLocalRelation
447-
issue: https://github.com/elastic/elasticsearch/issues/131386

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LocalLogicalPlanOptimizer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ private static Batch<LogicalPlan> localOperators() {
7474
}
7575

7676
// add rule that should only apply locally
77-
// Disabled until Unicode CASE_INSENSITIVE support is added to Lucine 9.0
78-
// waiting on https://github.com/elastic/elasticsearch/issues/131386
77+
// Waiting on https://github.com/elastic/elasticsearch/issues/131386
7978
// newRules.add(new ReplaceStringCasingWithInsensitiveRegexMatch());
8079

8180
return operators.with(newRules.toArray(Rule[]::new));

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ public void testIsNotNullOnCase_With_IS_NULL() {
646646
* \_Filter[RLIKE(first_name{f}#4, "VALÜ*", true)]
647647
* \_EsRelation[test][_meta_field{f}#9, emp_no{f}#3, first_name{f}#4, gen..]
648648
*/
649+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
649650
public void testReplaceUpperStringCasinqgWithInsensitiveRLike() {
650651
var plan = localPlan("FROM test | WHERE TO_UPPER(TO_LOWER(TO_UPPER(first_name))) RLIKE \"VALÜ*\"");
651652

@@ -660,6 +661,7 @@ public void testReplaceUpperStringCasinqgWithInsensitiveRLike() {
660661
}
661662

662663
// same plan as above, but lower case pattern
664+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
663665
public void testReplaceLowerStringCasingWithInsensitiveRLike() {
664666
var plan = localPlan("FROM test | WHERE TO_LOWER(TO_UPPER(first_name)) RLIKE \"valü*\"");
665667

@@ -677,6 +679,7 @@ public void testReplaceLowerStringCasingWithInsensitiveRLike() {
677679
* LocalRelation[[_meta_field{f}#9, emp_no{f}#3, first_name{f}#4, gender{f}#5, hire_date{f}#10, job{f}#11, job.raw{f}#12, langu
678680
* ages{f}#6, last_name{f}#7, long_noidx{f}#13, salary{f}#8],EMPTY]
679681
*/
682+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
680683
public void testReplaceStringCasingAndRLikeWithLocalRelation() {
681684
var plan = localPlan("FROM test | WHERE TO_LOWER(TO_UPPER(first_name)) RLIKE \"VALÜ*\"");
682685

@@ -685,6 +688,7 @@ public void testReplaceStringCasingAndRLikeWithLocalRelation() {
685688
}
686689

687690
// same plan as in testReplaceUpperStringCasingWithInsensitiveRLike, but with LIKE instead of RLIKE
691+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
688692
public void testReplaceUpperStringCasingWithInsensitiveLike() {
689693
var plan = localPlan("FROM test | WHERE TO_UPPER(TO_LOWER(TO_UPPER(first_name))) LIKE \"VALÜ*\"");
690694

@@ -699,6 +703,7 @@ public void testReplaceUpperStringCasingWithInsensitiveLike() {
699703
}
700704

701705
// same plan as above, but lower case pattern
706+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
702707
public void testReplaceLowerStringCasingWithInsensitiveLike() {
703708
var plan = localPlan("FROM test | WHERE TO_LOWER(TO_UPPER(first_name)) LIKE \"valü*\"");
704709

@@ -716,6 +721,7 @@ public void testReplaceLowerStringCasingWithInsensitiveLike() {
716721
* LocalRelation[[_meta_field{f}#9, emp_no{f}#3, first_name{f}#4, gender{f}#5, hire_date{f}#10, job{f}#11, job.raw{f}#12, langu
717722
* ages{f}#6, last_name{f}#7, long_noidx{f}#13, salary{f}#8],EMPTY]
718723
*/
724+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
719725
public void testReplaceStringCasingAndLikeWithLocalRelation() {
720726
var plan = localPlan("FROM test | WHERE TO_LOWER(TO_UPPER(first_name)) LIKE \"VALÜ*\"");
721727

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,6 +2228,7 @@ private void doTestPushDownCaseChangeRegexMatch(String query, String expected) {
22282228
assertThat(stripThrough(singleValue.toString()), is(stripThrough(expected)));
22292229
}
22302230

2231+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
22312232
public void testPushDownLowerCaseChangeRLike() {
22322233
doTestPushDownCaseChangeRegexMatch("""
22332234
FROM test
@@ -2253,6 +2254,7 @@ public void testPushDownLowerCaseChangeRLike() {
22532254
""");
22542255
}
22552256

2257+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
22562258
public void testPushDownUpperCaseChangeRLike() {
22572259
doTestPushDownCaseChangeRegexMatch("""
22582260
FROM test
@@ -2278,6 +2280,7 @@ public void testPushDownUpperCaseChangeRLike() {
22782280
""");
22792281
}
22802282

2283+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
22812284
public void testPushDownLowerCaseChangeLike() {
22822285
doTestPushDownCaseChangeRegexMatch("""
22832286
FROM test
@@ -2301,6 +2304,7 @@ public void testPushDownLowerCaseChangeLike() {
23012304
""");
23022305
}
23032306

2307+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
23042308
public void testPushDownUpperCaseChangeLike() {
23052309
doTestPushDownCaseChangeRegexMatch("""
23062310
FROM test
@@ -2336,6 +2340,7 @@ public void testPushDownUpperCaseChangeLike() {
23362340
* \_FieldExtractExec[first_name{f}#5, emp_no{f}#4]<[],[]>
23372341
* \_EsQueryExec[test], indexMode[standard], query[][_doc{f}#26], limit[], sort[] estimatedRowSize[332]
23382342
*/
2343+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/131041")
23392344
public void testChangeCaseAsInsensitiveWildcardLikeNotPushedDown() {
23402345
var esql = """
23412346
FROM test

0 commit comments

Comments
 (0)