Skip to content

Commit

Permalink
Enrich has no internal config, so we should not use it for parent sou…
Browse files Browse the repository at this point in the history
…rce.

This should also cover the many places in test code we use null configurations.
  • Loading branch information
craigtaverner committed Nov 14, 2024
1 parent 7709786 commit 8a85e07
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.elasticsearch.xpack.esql.Column;
import org.elasticsearch.xpack.esql.core.expression.Attribute;
import org.elasticsearch.xpack.esql.core.expression.NameId;
import org.elasticsearch.xpack.esql.core.tree.Source;
import org.elasticsearch.xpack.esql.core.type.EsField;
import org.elasticsearch.xpack.esql.session.Configuration;

Expand Down Expand Up @@ -160,7 +161,7 @@ public Block[] readCachedBlockArray() throws IOException {

@Override
public String sourceText() {
return configuration.query();
return configuration == null ? Source.EMPTY.text() : configuration.query();
}

static void throwOnNullOptionalRead(Class<?> type) throws IOException {
Expand Down

0 comments on commit 8a85e07

Please sign in to comment.