Skip to content

Commit cc81380

Browse files
committed
Merge branch 'non-issue/esql-fix-dense-vector-no-dims' into feature/esql-knn-function-minimal-support
2 parents 9227dc7 + d3262a4 commit cc81380

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2577,6 +2577,11 @@ public BlockLoader blockLoader(MappedFieldType.BlockLoaderContext blContext) {
25772577
return null;
25782578
}
25792579

2580+
if (dims == null) {
2581+
// No data has been indexed yet
2582+
return BlockLoader.CONSTANT_NULLS;
2583+
}
2584+
25802585
if (indexed) {
25812586
return new BlockDocValuesReader.DenseVectorBlockLoader(name(), dims);
25822587
}

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/RestEsqlTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ public void testMultipleBatchesWithLookupJoin() throws IOException {
10221022
var query = requestObjectBuilder().query(format(null, "from * | lookup join {} on integer {}", testIndexName(), sort));
10231023
Map<String, Object> result = runEsql(query);
10241024
var columns = as(result.get("columns"), List.class);
1025-
assertEquals(21, columns.size());
1025+
assertEquals(22, columns.size());
10261026
var values = as(result.get("values"), List.class);
10271027
assertEquals(10, values.size());
10281028
}

0 commit comments

Comments
 (0)