Skip to content

Commit d84c8dd

Browse files
committed
Small test fixes
1 parent 03f6a92 commit d84c8dd

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/DenseVectorFieldTypeIT.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void testRetrieveFieldType() {
6666

6767
try (var resp = run(query)) {
6868
assertColumnNames(resp.columns(), List.of("id", "vector"));
69-
assertColumnTypes(resp.columns(), List.of("integer", "dense_vector"));
69+
assertColumnTypes(resp.columns(), List.of("long", "double"));
7070
}
7171
}
7272

@@ -82,26 +82,15 @@ public void testRetrieveDenseVectorFieldData() {
8282
DOC_VALUES.forEach((id, vector) -> {
8383
var values = valuesList.get(id - 1);
8484
assertEquals(id.intValue(), ((Long) values.get(0)).intValue());
85-
List<Double> scores = (List<Double>) values.get(1);
86-
assertEquals(vector.size(), scores.size());
85+
List<Double> vectors = (List<Double>) values.get(1);
86+
assertEquals(vector.size(), vectors.size());
8787
for (int i = 0; i < vector.size(); i++) {
88-
assertEquals((float)vector.get(i), scores.get(i).floatValue(), 0F);
88+
assertEquals((float) vector.get(i), vectors.get(i).floatValue(), 0F);
8989
}
9090
});
9191
}
9292
}
9393

94-
public void testSorted() {
95-
var query = """
96-
FROM test
97-
""";
98-
99-
try (var resp = run(query)) {
100-
assertColumnNames(resp.columns(), List.of("id", "vector"));
101-
assertColumnTypes(resp.columns(), List.of("integer", "dense_vector"));
102-
}
103-
}
104-
10594
@Before
10695
public void setup() {
10796
var indexName = "test";

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/nulls/Coalesce.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public ExpressionEvaluator.Factory toEvaluator(ToEvaluator toEvaluator) {
210210
.toEvaluator(toEvaluator, children());
211211
case NULL -> EvalOperator.CONSTANT_NULL_FACTORY;
212212
case UNSUPPORTED, SHORT, BYTE, DATE_PERIOD, OBJECT, DOC_DATA_TYPE, SOURCE, TIME_DURATION, FLOAT, HALF_FLOAT, TSID_DATA_TYPE,
213-
SCALED_FLOAT, PARTIAL_AGG, AGGREGATE_METRIC_DOUBLE, DENSE_VECTOR -> throw new UnsupportedOperationException(
213+
SCALED_FLOAT, PARTIAL_AGG, AGGREGATE_METRIC_DOUBLE, DENSE_VECTOR -> throw new UnsupportedOperationException(
214214
dataType() + " can’t be coalesced"
215215
);
216216
};

0 commit comments

Comments
 (0)