Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.elasticsearch.compute.data.DoubleBlock;
import org.elasticsearch.compute.data.IntBlock;
import org.elasticsearch.compute.data.LongBlock;
import org.elasticsearch.compute.lucene.UnsupportedValueSource;
import org.elasticsearch.xcontent.ToXContent;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.XContentParser;
Expand Down Expand Up @@ -151,7 +150,7 @@ protected XContentBuilder valueToXContent(XContentBuilder builder, ToXContent.Pa
@Override
protected XContentBuilder valueToXContent(XContentBuilder builder, ToXContent.Params params, int valueIndex)
throws IOException {
return builder.value(UnsupportedValueSource.UNSUPPORTED_OUTPUT);
return builder.value((String) null);
}
};
case SOURCE -> new PositionToXContent(block) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.elasticsearch.compute.data.IntBlock;
import org.elasticsearch.compute.data.LongBlock;
import org.elasticsearch.compute.data.Page;
import org.elasticsearch.compute.lucene.UnsupportedValueSource;
import org.elasticsearch.xcontent.XContentParser;
import org.elasticsearch.xcontent.XContentParserConfiguration;
import org.elasticsearch.xpack.esql.EsqlIllegalArgumentException;
Expand Down Expand Up @@ -128,7 +127,7 @@ private static Object valueAt(DataType dataType, Block block, int offset, BytesR
case GEO_POINT, GEO_SHAPE, CARTESIAN_POINT, CARTESIAN_SHAPE -> spatialToString(
((BytesRefBlock) block).getBytesRef(offset, scratch)
);
case UNSUPPORTED -> UnsupportedValueSource.UNSUPPORTED_OUTPUT;
case UNSUPPORTED -> (String) null;
case SOURCE -> {
BytesRef val = ((BytesRefBlock) block).getBytesRef(offset, scratch);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.elasticsearch.compute.data.IntBlock;
import org.elasticsearch.compute.data.LongBlock;
import org.elasticsearch.compute.data.Page;
import org.elasticsearch.compute.lucene.UnsupportedValueSource;
import org.elasticsearch.compute.operator.AbstractPageMappingOperator;
import org.elasticsearch.compute.operator.DriverProfile;
import org.elasticsearch.compute.operator.DriverStatus;
Expand Down Expand Up @@ -157,9 +156,7 @@ private Page randomPage(List<ColumnInfoImpl> columns) {
);
case DATETIME -> ((LongBlock.Builder) builder).appendLong(randomInstant().toEpochMilli());
case BOOLEAN -> ((BooleanBlock.Builder) builder).appendBoolean(randomBoolean());
case UNSUPPORTED -> ((BytesRefBlock.Builder) builder).appendBytesRef(
new BytesRef(UnsupportedValueSource.UNSUPPORTED_OUTPUT)
);
case UNSUPPORTED -> ((BytesRefBlock.Builder) builder).appendNull();
case VERSION -> ((BytesRefBlock.Builder) builder).appendBytesRef(new Version(randomIdentifier()).toBytesRef());
case GEO_POINT -> ((BytesRefBlock.Builder) builder).appendBytesRef(GEO.asWkb(GeometryTestUtils.randomPoint()));
case CARTESIAN_POINT -> ((BytesRefBlock.Builder) builder).appendBytesRef(CARTESIAN.asWkb(ShapeTestUtils.randomPoint()));
Expand Down Expand Up @@ -660,7 +657,8 @@ static Page valuesToPage(BlockFactory blockFactory, List<ColumnInfoImpl> columns
case LONG, COUNTER_LONG -> ((LongBlock.Builder) builder).appendLong(((Number) value).longValue());
case INTEGER, COUNTER_INTEGER -> ((IntBlock.Builder) builder).appendInt(((Number) value).intValue());
case DOUBLE, COUNTER_DOUBLE -> ((DoubleBlock.Builder) builder).appendDouble(((Number) value).doubleValue());
case KEYWORD, TEXT, UNSUPPORTED -> ((BytesRefBlock.Builder) builder).appendBytesRef(new BytesRef(value.toString()));
case KEYWORD, TEXT -> ((BytesRefBlock.Builder) builder).appendBytesRef(new BytesRef(value.toString()));
case UNSUPPORTED -> ((BytesRefBlock.Builder) builder).appendNull();
case IP -> ((BytesRefBlock.Builder) builder).appendBytesRef(stringToIP(value.toString()));
case DATETIME -> {
long longVal = dateTimeToLong(value.toString());
Expand Down