mihaibudiu commented on code in PR #4434:
URL: https://github.com/apache/calcite/pull/4434#discussion_r2162066247
##########
elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/QueryBuilders.java:
##########
@@ -499,12 +501,27 @@ static class RegexpQueryBuilder extends QueryBuilder {
private final String value;
RegexpQueryBuilder(final String fieldName, final String value) {
+ requireNonNull(fieldName, "fieldName");
+ requireNonNull(value, "value");
this.fieldName = fieldName;
- this.value = value;
+ // replace % to * and _ to ? for sql with like operator
+ this.value = replaceWildcard(replaceWildcard(value, "%", "*"), "_", "?");
Review Comment:
this does not seem to handle correctly escaped pattern symbols in LIKE.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]