|
@@ -50,6 +50,7 @@ import org.elasticsearch.xpack.esql.enrich.EnrichLookupService;
|
|
|
import org.elasticsearch.xpack.esql.enrich.EnrichPolicyResolver;
|
|
|
import org.elasticsearch.xpack.esql.enrich.LookupFromIndexService;
|
|
|
import org.elasticsearch.xpack.esql.execution.PlanExecutor;
|
|
|
+import org.elasticsearch.xpack.esql.expression.function.UnsupportedAttribute;
|
|
|
import org.elasticsearch.xpack.esql.inference.InferenceRunner;
|
|
|
import org.elasticsearch.xpack.esql.session.Configuration;
|
|
|
import org.elasticsearch.xpack.esql.session.EsqlSession.PlanRunner;
|
|
@@ -324,12 +325,12 @@ public class TransportEsqlQueryAction extends HandledTransportAction<EsqlQueryRe
|
|
|
private EsqlQueryResponse toResponse(Task task, EsqlQueryRequest request, Configuration configuration, Result result) {
|
|
|
List<ColumnInfoImpl> columns = result.schema().stream().map(c -> {
|
|
|
List<String> originalTypes;
|
|
|
- if (c.originalTypes() == null) {
|
|
|
- originalTypes = null;
|
|
|
- } else {
|
|
|
+ if (c instanceof UnsupportedAttribute ua) {
|
|
|
// Sort the original types so they are easier to test against and prettier.
|
|
|
- originalTypes = new ArrayList<>(c.originalTypes());
|
|
|
+ originalTypes = new ArrayList<>(ua.originalTypes());
|
|
|
Collections.sort(originalTypes);
|
|
|
+ } else {
|
|
|
+ originalTypes = null;
|
|
|
}
|
|
|
return new ColumnInfoImpl(c.name(), c.dataType().outputType(), originalTypes);
|
|
|
}).toList();
|