Skip to content

Commit ee4bcb9

Browse files
committed
Implement tested operations in MatchOperator
1 parent c1fac5e commit ee4bcb9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public Expression replaceChildren(List<Expression> newChildren) {
260260

261261
@Override
262262
protected NodeInfo<? extends Expression> info() {
263-
return NodeInfo.create(this, Match::new, field, query(), queryBuilder());
263+
return NodeInfo.create(this, Match::new, field(), query(), queryBuilder());
264264
}
265265

266266
protected TypeResolutions.ParamOrdinal queryParamOrdinal() {

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchOperator.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
1111
import org.elasticsearch.common.io.stream.StreamInput;
1212
import org.elasticsearch.xpack.esql.core.expression.Expression;
13+
import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
1314
import org.elasticsearch.xpack.esql.core.tree.Source;
1415
import org.elasticsearch.xpack.esql.expression.function.Example;
1516
import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
1617
import org.elasticsearch.xpack.esql.expression.function.Param;
1718
import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
1819

1920
import java.io.IOException;
21+
import java.util.List;
2022

2123
/**
2224
* This class exists to generate documentation for the match operator.
@@ -74,4 +76,14 @@ protected static Match readFrom(StreamInput in) throws IOException {
7476
public String getWriteableName() {
7577
return ENTRY.name;
7678
}
79+
80+
@Override
81+
protected NodeInfo<? extends Expression> info() {
82+
return NodeInfo.create(this, MatchOperator::new, field(), query());
83+
}
84+
85+
@Override
86+
public Expression replaceChildren(List<Expression> newChildren) {
87+
return new MatchOperator(source(), newChildren.get(0), newChildren.get(1));
88+
}
7789
}

0 commit comments

Comments
 (0)