From f4b5a0943a13fdbaeb9cbb771961f3a027e7ab9d Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Thu, 16 Jan 2025 21:59:18 +0000 Subject: [PATCH] [CI] Auto commit changes from spotless --- .../function/scalar/date/DateDiffTests.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateDiffTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateDiffTests.java index 10cc44ffdaecb..e2e2f0572c7aa 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateDiffTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateDiffTests.java @@ -18,7 +18,6 @@ import org.elasticsearch.xpack.esql.expression.function.TestCaseSupplier; import java.time.Instant; -import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; @@ -86,12 +85,18 @@ public static Iterable parameters() { // Error cases Instant zdtStart2 = Instant.parse("2023-12-04T10:15:00Z"); Instant zdtEnd2 = Instant.parse("2023-12-04T10:20:00Z"); - suppliers.addAll(makeSuppliers(zdtStart2, zdtEnd2, "nanoseconds", "Line -1:-1: org.elasticsearch.xpack.esql.core.InvalidArgumentException: [300000000000] out of [integer] range")); + suppliers.addAll( + makeSuppliers( + zdtStart2, + zdtEnd2, + "nanoseconds", + "Line -1:-1: org.elasticsearch.xpack.esql.core.InvalidArgumentException: [300000000000] out of [integer] range" + ) + ); return parameterSuppliersFromTypedDataWithDefaultChecksNoErrors(true, suppliers); } - private static List makeSuppliers(Instant startTimestamp, Instant endTimestamp, String unit, int expected) { // Units as Keyword case return List.of( @@ -167,6 +172,7 @@ private static List makeSuppliers(Instant startTimestamp, Inst ) ); } + @Override protected Expression build(Source source, List args) { return new DateDiff(source, args.get(0), args.get(1), args.get(2));