|
28 | 28 | import org.elasticsearch.xpack.core.ml.dataframe.analyses.OutlierDetectionTests; |
29 | 29 | import org.elasticsearch.xpack.core.ml.dataframe.analyses.Regression; |
30 | 30 | import org.elasticsearch.xpack.ml.extractor.DocValueField; |
| 31 | +import org.elasticsearch.xpack.ml.extractor.ExtractedField; |
31 | 32 | import org.elasticsearch.xpack.ml.extractor.ExtractedFields; |
32 | 33 | import org.elasticsearch.xpack.ml.extractor.SourceField; |
33 | 34 | import org.elasticsearch.xpack.ml.test.SearchHitBuilder; |
@@ -295,9 +296,10 @@ public void testIncludeSourceIsFalseAndNoSourceFields() throws IOException { |
295 | 296 | } |
296 | 297 |
|
297 | 298 | public void testIncludeSourceIsFalseAndAtLeastOneSourceField() throws IOException { |
| 299 | + // Explicit cast of ExtractedField args necessary for Eclipse due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=530915 |
298 | 300 | extractedFields = new ExtractedFields(Arrays.asList( |
299 | | - new DocValueField("field_1", Collections.singleton("keyword")), |
300 | | - new SourceField("field_2", Collections.singleton("text")))); |
| 301 | + (ExtractedField) new DocValueField("field_1", Collections.singleton("keyword")), |
| 302 | + (ExtractedField) new SourceField("field_2", Collections.singleton("text")))); |
301 | 303 |
|
302 | 304 | TestExtractor dataExtractor = createExtractor(false, false); |
303 | 305 |
|
@@ -391,16 +393,17 @@ public void testMissingValues_GivenShouldInclude() throws IOException { |
391 | 393 | } |
392 | 394 |
|
393 | 395 | public void testGetCategoricalFields() { |
| 396 | + // Explicit cast of ExtractedField args necessary for Eclipse due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=530915 |
394 | 397 | extractedFields = new ExtractedFields(Arrays.asList( |
395 | | - new DocValueField("field_boolean", Collections.singleton("boolean")), |
396 | | - new DocValueField("field_float", Collections.singleton("float")), |
397 | | - new DocValueField("field_double", Collections.singleton("double")), |
398 | | - new DocValueField("field_byte", Collections.singleton("byte")), |
399 | | - new DocValueField("field_short", Collections.singleton("short")), |
400 | | - new DocValueField("field_integer", Collections.singleton("integer")), |
401 | | - new DocValueField("field_long", Collections.singleton("long")), |
402 | | - new DocValueField("field_keyword", Collections.singleton("keyword")), |
403 | | - new SourceField("field_text", Collections.singleton("text")))); |
| 398 | + (ExtractedField) new DocValueField("field_boolean", Collections.singleton("boolean")), |
| 399 | + (ExtractedField) new DocValueField("field_float", Collections.singleton("float")), |
| 400 | + (ExtractedField) new DocValueField("field_double", Collections.singleton("double")), |
| 401 | + (ExtractedField) new DocValueField("field_byte", Collections.singleton("byte")), |
| 402 | + (ExtractedField) new DocValueField("field_short", Collections.singleton("short")), |
| 403 | + (ExtractedField) new DocValueField("field_integer", Collections.singleton("integer")), |
| 404 | + (ExtractedField) new DocValueField("field_long", Collections.singleton("long")), |
| 405 | + (ExtractedField) new DocValueField("field_keyword", Collections.singleton("keyword")), |
| 406 | + (ExtractedField) new SourceField("field_text", Collections.singleton("text")))); |
404 | 407 | TestExtractor dataExtractor = createExtractor(true, true); |
405 | 408 |
|
406 | 409 | assertThat(dataExtractor.getCategoricalFields(OutlierDetectionTests.createRandom()), empty()); |
|
0 commit comments