From 8e8d7667cb89ea810f167339cff8ea2b57369abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Mon, 8 Jul 2019 17:33:44 +0200 Subject: [PATCH] [Tests] Fix type inference issue (#44063) --- .../elasticsearch/xpack/sql/execution/search/QuerierTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java index a6caad899dd..f8bcff4ce52 100644 --- a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java +++ b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java @@ -75,7 +75,8 @@ public class QuerierTests extends ESTestCase { for (int j = 0; j < noColumns; j++) { boolean order = randomBoolean(); ordering[j] = order; - tuples.add(new Tuple<>(j, order ? Comparator.naturalOrder() : Comparator.reverseOrder())); + Comparator comp = order ? Comparator.naturalOrder() : Comparator.reverseOrder(); + tuples.add(new Tuple<>(j, comp)); } // Insert random no of documents (rows) with random 0/1 values for each field