Skip to content

Commit 86c0c19

Browse files
bpinteadnhatn
authored andcommitted
Update err message
1 parent b2adbe8 commit 86c0c19

File tree

1 file changed

+4
-4
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/regex

1 file changed

+4
-4
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/regex/RegexMatch.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import java.io.IOException;
2626

27-
import static org.elasticsearch.TransportVersions.ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY_8_19;
2827
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.DEFAULT;
2928
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isString;
3029

@@ -75,14 +74,15 @@ public String nodeString() {
7574
void serializeCaseInsensitivity(StreamOutput out) throws IOException {
7675
var transportVersion = out.getTransportVersion();
7776
if (transportVersion.onOrAfter(TransportVersions.ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY)
78-
|| transportVersion.isPatchFrom(ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY_8_19)) {
77+
|| transportVersion.isPatchFrom(TransportVersions.ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY_8_19)) {
7978
out.writeBoolean(caseInsensitive());
8079
} else if (caseInsensitive()) {
8180
// The plan has been optimized to run a case-insensitive match, which the remote peer cannot be notified of. Simply avoiding
8281
// the serialization of the boolean would result in wrong results.
8382
throw new EsqlIllegalArgumentException(
84-
name() + " with case insensitivity is not supported in peer node's version [{}]. Upgrade to version [{}] or newer.",
83+
name() + " with case insensitivity is not supported in peer node's version [{}]. Upgrade to version [{}, {}] or newer.",
8584
out.getTransportVersion(),
85+
TransportVersions.ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY_8_19,
8686
TransportVersions.ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY
8787
);
8888
} // else: write nothing, the remote peer can execute the case-sensitive query
@@ -91,6 +91,6 @@ void serializeCaseInsensitivity(StreamOutput out) throws IOException {
9191
static boolean deserializeCaseInsensitivity(StreamInput in) throws IOException {
9292
var transportVersion = in.getTransportVersion();
9393
return (transportVersion.onOrAfter(TransportVersions.ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY)
94-
|| transportVersion.isPatchFrom(ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY_8_19)) && in.readBoolean();
94+
|| transportVersion.isPatchFrom(TransportVersions.ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY_8_19)) && in.readBoolean();
9595
}
9696
}

0 commit comments

Comments
 (0)