mihaibudiu commented on code in PR #4434:
URL: https://github.com/apache/calcite/pull/4434#discussion_r2162929799
##########
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:
https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE
This has nothing to do with Calcite, LIKE is a standard SQL function.
--
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]