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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

import org.elasticsearch.logsdb.datageneration.datasource.DataSource;
import org.elasticsearch.logsdb.datageneration.fields.leaf.ByteFieldDataGenerator;
import org.elasticsearch.logsdb.datageneration.fields.leaf.DoubleFieldDataGenerator;
import org.elasticsearch.logsdb.datageneration.fields.leaf.FloatFieldDataGenerator;
import org.elasticsearch.logsdb.datageneration.fields.leaf.IntegerFieldDataGenerator;
import org.elasticsearch.logsdb.datageneration.fields.leaf.KeywordFieldDataGenerator;
import org.elasticsearch.logsdb.datageneration.fields.leaf.LongFieldDataGenerator;
Expand All @@ -26,7 +28,9 @@ public enum FieldType {
UNSIGNED_LONG("unsigned_long"),
INTEGER("integer"),
SHORT("short"),
BYTE("byte");
BYTE("byte"),
DOUBLE("double"),
FLOAT("float");

private final String name;

Expand All @@ -42,6 +46,8 @@ public FieldDataGenerator generator(String fieldName, DataSource dataSource) {
case INTEGER -> new IntegerFieldDataGenerator(fieldName, dataSource);
case SHORT -> new ShortFieldDataGenerator(fieldName, dataSource);
case BYTE -> new ByteFieldDataGenerator(fieldName, dataSource);
case DOUBLE -> new DoubleFieldDataGenerator(fieldName, dataSource);
case FLOAT -> new FloatFieldDataGenerator(fieldName, dataSource);
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public DataSourceResponse.LeafMappingParametersGenerator handle(DataSourceReques

return new DataSourceResponse.LeafMappingParametersGenerator(switch (request.fieldType()) {
case KEYWORD -> keywordMapping(request, map);
case LONG, INTEGER, SHORT, BYTE, UNSIGNED_LONG -> plain(map);

case LONG, INTEGER, SHORT, BYTE, DOUBLE, FLOAT, UNSIGNED_LONG -> plain(map);
});
}

Expand Down Expand Up @@ -61,8 +60,7 @@ private Supplier<Map<String, Object>> keywordMapping(
.collect(Collectors.toSet());

if (options.isEmpty() == false) {
// TODO: re-enable once #120831 is resolved
// injected.put("copy_to", ESTestCase.randomFrom(options));
injected.put("copy_to", ESTestCase.randomFrom(options));
}
}

Expand Down