Skip to content

Commit a63ca2c

Browse files
committed
Fix LookupJoinTypesIT
1 parent 06cbea9 commit a63ca2c

File tree

2 files changed

+10
-2
lines changed
  • x-pack/plugin/esql/src

2 files changed

+10
-2
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
}

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/join/Join.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import static org.elasticsearch.xpack.esql.core.type.DataType.COUNTER_LONG;
4040
import static org.elasticsearch.xpack.esql.core.type.DataType.DATE_NANOS;
4141
import static org.elasticsearch.xpack.esql.core.type.DataType.DATE_PERIOD;
42+
import static org.elasticsearch.xpack.esql.core.type.DataType.DENSE_VECTOR;
4243
import static org.elasticsearch.xpack.esql.core.type.DataType.DOC_DATA_TYPE;
4344
import static org.elasticsearch.xpack.esql.core.type.DataType.GEO_POINT;
4445
import static org.elasticsearch.xpack.esql.core.type.DataType.GEO_SHAPE;
@@ -78,7 +79,8 @@ public class Join extends BinaryPlan implements PostAnalysisVerificationAware, S
7879
DOC_DATA_TYPE,
7980
TSID_DATA_TYPE,
8081
PARTIAL_AGG,
81-
AGGREGATE_METRIC_DOUBLE };
82+
AGGREGATE_METRIC_DOUBLE,
83+
DENSE_VECTOR };
8284

8385
private final JoinConfig config;
8486
private List<Attribute> lazyOutput;

0 commit comments

Comments
 (0)