Skip to content

Commit 17efe43

Browse files
committed
Merge remote-tracking branch 'nik9000/esql_report_original' into esql_report_original
2 parents d3f3430 + 351e15b commit 17efe43

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

docs/changelog/124913.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124913
2+
summary: Report `original_types`
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/ColumnInfoImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import org.elasticsearch.xpack.esql.core.type.DataType;
2222

2323
import java.io.IOException;
24-
import java.util.ArrayList;
25-
import java.util.Collections;
2624
import java.util.List;
2725
import java.util.Objects;
2826

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
import java.io.IOException;
5757
import java.time.ZoneOffset;
5858
import java.util.ArrayList;
59-
import java.util.Collection;
6059
import java.util.Collections;
6160
import java.util.List;
6261
import java.util.Locale;
@@ -317,20 +316,17 @@ private EsqlExecutionInfo createEsqlExecutionInfo(EsqlQueryRequest request) {
317316
}
318317

319318
private EsqlQueryResponse toResponse(Task task, EsqlQueryRequest request, Configuration configuration, Result result) {
320-
List<ColumnInfoImpl> columns = result.schema()
321-
.stream()
322-
.map(c -> {
323-
List<String> originalTypes;
324-
if (c.originalTypes() == null) {
325-
originalTypes = null;
326-
} else {
327-
// Sort the original types so they are easier to test against and prettier.
328-
originalTypes = new ArrayList<>(c.originalTypes());
329-
Collections.sort(originalTypes);
330-
}
331-
return new ColumnInfoImpl(c.name(), c.dataType().outputType(), originalTypes);
332-
})
333-
.toList();
319+
List<ColumnInfoImpl> columns = result.schema().stream().map(c -> {
320+
List<String> originalTypes;
321+
if (c.originalTypes() == null) {
322+
originalTypes = null;
323+
} else {
324+
// Sort the original types so they are easier to test against and prettier.
325+
originalTypes = new ArrayList<>(c.originalTypes());
326+
Collections.sort(originalTypes);
327+
}
328+
return new ColumnInfoImpl(c.name(), c.dataType().outputType(), originalTypes);
329+
}).toList();
334330
EsqlQueryResponse.Profile profile = configuration.profile() ? new EsqlQueryResponse.Profile(result.profiles()) : null;
335331
threadPool.getThreadContext().addResponseHeader(AsyncExecutionId.ASYNC_EXECUTION_IS_RUNNING_HEADER, "?0");
336332
if (task instanceof EsqlQueryTask asyncTask && request.keepOnCompletion()) {

0 commit comments

Comments
 (0)