Skip to content

Commit 21377de

Browse files
committed
Fix cartesian point unit test cases
1 parent 8fe057f commit 21377de

File tree

1 file changed

+5
-5
lines changed
  • x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext

1 file changed

+5
-5
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext/DecayTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static Iterable<Object[]> parameters() {
5959

6060
// CartesianPoint
6161
testCaseSuppliers.addAll(
62-
cartesianPointTestCase(new Point(5.0, 5.0), new Point(0.0, 0.0), "10m", "0m", 0.25, "linear", 0.46966991411008935)
62+
cartesianPointTestCase("POINT (5 5)", "POINT (0 0)", "10m", "0m", 0.25, "linear", 0.46966991411008935)
6363
);
6464

6565
// Datetime
@@ -365,8 +365,8 @@ private static List<TestCaseSupplier> geoPointOffsetKeywordTestCase(
365365
}
366366

367367
private static List<TestCaseSupplier> cartesianPointTestCase(
368-
Point value,
369-
Point origin,
368+
String valueWkt,
369+
String originWkt,
370370
String scale,
371371
String offset,
372372
double decay,
@@ -385,8 +385,8 @@ private static List<TestCaseSupplier> cartesianPointTestCase(
385385
),
386386
() -> new TestCaseSupplier.TestCase(
387387
List.of(
388-
new TestCaseSupplier.TypedData(new BytesRef(CARTESIAN.asWkt(value)), DataType.CARTESIAN_POINT, "value"),
389-
new TestCaseSupplier.TypedData(new BytesRef(CARTESIAN.asWkt(origin)), DataType.CARTESIAN_POINT, "origin"),
388+
new TestCaseSupplier.TypedData(CARTESIAN.wktToWkb(valueWkt), DataType.CARTESIAN_POINT, "value"),
389+
new TestCaseSupplier.TypedData(CARTESIAN.wktToWkb(originWkt), DataType.CARTESIAN_POINT, "origin"),
390390
new TestCaseSupplier.TypedData(scale, DataType.TEXT, "scale"),
391391
new TestCaseSupplier.TypedData(offset, DataType.TEXT, "offset"),
392392
new TestCaseSupplier.TypedData(decay, DataType.DOUBLE, "decay"),

0 commit comments

Comments
 (0)