Skip to content

Commit d8e139d

Browse files
committed
Fix value generation for dense vectors
1 parent d827c6d commit d8e139d

File tree

1 file changed

+2
-2
lines changed
  • x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql

1 file changed

+2
-2
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/EsqlTestUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
import java.time.Duration;
106106
import java.time.Period;
107107
import java.util.ArrayList;
108+
import java.util.Arrays;
108109
import java.util.Collection;
109110
import java.util.EnumSet;
110111
import java.util.HashMap;
@@ -828,8 +829,7 @@ public static Literal randomLiteral(DataType type) {
828829
throw new UncheckedIOException(e);
829830
}
830831
}
831-
// TODO Need to get the dimensions
832-
case DENSE_VECTOR -> randomArray(10, 10, i -> new Float[10], ESTestCase::randomFloat);
832+
case DENSE_VECTOR -> Arrays.asList(randomArray(10, 10, i -> new Double[10], ESTestCase::randomDouble));
833833
case UNSUPPORTED, OBJECT, DOC_DATA_TYPE, TSID_DATA_TYPE, PARTIAL_AGG -> throw new IllegalArgumentException(
834834
"can't make random values for [" + type.typeName() + "]"
835835
);

0 commit comments

Comments
 (0)