Skip to content

Commit a66e89b

Browse files
Fix serialization error
1 parent c17c993 commit a66e89b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/LookupFromIndexService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.elasticsearch.transport.TransportService;
3434
import org.elasticsearch.xpack.esql.EsqlIllegalArgumentException;
3535
import org.elasticsearch.xpack.esql.action.EsqlQueryAction;
36+
import org.elasticsearch.xpack.esql.core.expression.FieldAttribute;
3637
import org.elasticsearch.xpack.esql.core.expression.NamedExpression;
3738
import org.elasticsearch.xpack.esql.core.tree.Source;
3839
import org.elasticsearch.xpack.esql.core.type.DataType;
@@ -205,6 +206,10 @@ static TransportRequest readFrom(StreamInput in, BlockFactory blockFactory) thro
205206
List<LookupFromIndexOperator.MatchConfig> matchFields = null;
206207
if (in.getTransportVersion().onOrAfter(TransportVersions.ESQL_LOOKUP_JOIN_ON_MANY_FIELDS)) {
207208
matchFields = in.readCollectionAsList(LookupFromIndexOperator.MatchConfig::new);
209+
} else {
210+
// For older versions, we only support a single match field.
211+
matchFields = new ArrayList<>(1);
212+
matchFields.add(new LookupFromIndexOperator.MatchConfig(new FieldAttribute.FieldName(matchField), 0, inputDataType));
208213
}
209214
TransportRequest result = new TransportRequest(
210215
sessionId,

0 commit comments

Comments
 (0)