Skip to content

Commit e75a94e

Browse files
add missing part of the backport of elastic#126456
1 parent b6ea656 commit e75a94e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,14 @@ private String mainPropertyFor(TestConfig config) {
358358
}
359359

360360
private static String sampleDataTextFor(DataType type) {
361-
var value = sampleDataFor(type);
361+
return sampleDataForValue(sampleDataFor(type));
362+
}
363+
364+
private static String sampleDataForValue(Object value) {
362365
if (value instanceof String) {
363366
return "\"" + value + "\"";
367+
} else if (value instanceof List<?> list) {
368+
return "[" + list.stream().map(LookupJoinTypesIT::sampleDataForValue).collect(Collectors.joining(", ")) + "]";
364369
}
365370
return String.valueOf(value);
366371
}
@@ -379,6 +384,7 @@ private static Object sampleDataFor(DataType type) {
379384
case VERSION -> "1.2.19";
380385
case GEO_POINT, CARTESIAN_POINT -> "POINT (1.0 2.0)";
381386
case GEO_SHAPE, CARTESIAN_SHAPE -> "POLYGON ((0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0))";
387+
case DENSE_VECTOR -> List.of(0.2672612f, 0.5345224f, 0.8017837f);
382388
default -> throw new IllegalArgumentException("Unsupported type: " + type);
383389
};
384390
}

0 commit comments

Comments
 (0)