This is an automated email from the ASF dual-hosted git repository.
yashmayya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 97cb8a82936 Fix query generator REGEXP_LIKE case sensitivity mismatch
between Pinot and H2 (#16768)
97cb8a82936 is described below
commit 97cb8a8293613ef24d07673a9485ed43641edb06
Author: Yash Mayya <[email protected]>
AuthorDate: Wed Sep 10 16:32:01 2025 +0530
Fix query generator REGEXP_LIKE case sensitivity mismatch between Pinot and
H2 (#16768)
---
.../java/org/apache/pinot/integration/tests/QueryGenerator.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/QueryGenerator.java
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/QueryGenerator.java
index 5a9b686f620..f332f263a63 100644
---
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/QueryGenerator.java
+++
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/QueryGenerator.java
@@ -1049,8 +1049,11 @@ public class QueryGenerator {
int indexToReplaceWithRegex = 1 + _random.nextInt(value.length() - 2);
String regex = value.substring(1, indexToReplaceWithRegex) + ".*" +
value.substring(indexToReplaceWithRegex + 1,
value.length() - 1);
- String regexpPredicate = String.format(" REGEXP_LIKE(%s, '%s')",
columnName, regex);
- String h2RegexpPredicate = String.format(" REGEXP_LIKE(`%s`, '%s',
'i')", columnName, regex);
+ boolean caseSensitive = _random.nextBoolean();
+ String regexpPredicate =
+ String.format(" REGEXP_LIKE(%s, '%s', '%s')", columnName, regex,
caseSensitive ? "c" : "i");
+ String h2RegexpPredicate =
+ String.format(" REGEXP_LIKE(`%s`, '%s', '%s')", columnName, regex,
caseSensitive ? "c" : "i");
return new StringQueryFragment(regexpPredicate, h2RegexpPredicate);
} else {
String equalsPredicate = String.format("%s = %s", columnName, value);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]