From 7f19b5a756de9dd70ebfe57273ac1c56363c730a Mon Sep 17 00:00:00 2001 From: Mark Tozzi Date: Fri, 8 Dec 2023 12:27:48 -0500 Subject: [PATCH] fixed small things from PR feedback --- .../xpack/esql/expression/function/TestCaseSupplier.java | 1 - .../function/scalar/convert/ToUnsignedLongTests.java | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java index 6165ce0f0f578..41cf0198e5d87 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java @@ -957,7 +957,6 @@ public TypedData(Object data, String name) { public String toString() { if (type == DataTypes.UNSIGNED_LONG && data instanceof Long longData) { return type.toString() + "(" + NumericUtils.unsignedLongAsBigInteger(longData).toString() + ")"; - } } return type.toString() + "(" + (data == null ? "null" : data.toString()) + ")"; } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongTests.java index 523906007dd2e..8d5ee002a8f78 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongTests.java @@ -43,7 +43,7 @@ public static Iterable parameters() { suppliers, read, DataTypes.UNSIGNED_LONG, - (n) -> n, + n -> n, BigInteger.ZERO, UNSIGNED_LONG_MAX, List.of() @@ -118,7 +118,7 @@ public static Iterable parameters() { suppliers, evaluatorName.apply("Long"), DataTypes.UNSIGNED_LONG, - (n) -> BigInteger.valueOf(n), + BigInteger::valueOf, 0L, Long.MAX_VALUE, List.of() @@ -142,7 +142,7 @@ public static Iterable parameters() { suppliers, evaluatorName.apply("Int"), DataTypes.UNSIGNED_LONG, - (n) -> BigInteger.valueOf(n), + BigInteger::valueOf, 0, Integer.MAX_VALUE, List.of()