From a87d02127c72aa5e307af94b12b6be25150349be Mon Sep 17 00:00:00 2001 From: Justin Borromeo Date: Fri, 22 Mar 2019 15:54:42 -0700 Subject: [PATCH] Fix checkstyle and test --- .../druid/query/scan/ScanQueryRunnerFactory.java | 13 +++++++------ .../query/scan/ScanQueryRunnerFactoryTest.java | 8 +++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/processing/src/main/java/org/apache/druid/query/scan/ScanQueryRunnerFactory.java b/processing/src/main/java/org/apache/druid/query/scan/ScanQueryRunnerFactory.java index e00ad34cbba..fa70627f84d 100644 --- a/processing/src/main/java/org/apache/druid/query/scan/ScanQueryRunnerFactory.java +++ b/processing/src/main/java/org/apache/druid/query/scan/ScanQueryRunnerFactory.java @@ -177,20 +177,21 @@ public class ScanQueryRunnerFactory implements QueryRunnerFactory - Sequences.map( // (3) + Sequences.map( Sequences.simple(runnerGroup), - (input) -> Sequences.concat( // (2) - Sequences.map( // (1) + (input) -> Sequences.concat( + Sequences.map( input.run(queryPlus, responseContext), srv -> Sequences.simple(srv.toSingleEventScanResultValues()) ) @@ -246,7 +247,7 @@ public class ScanQueryRunnerFactory implements QueryRunnerFactory srvs = new ArrayList<>(numElements); List expectedEventTimestamps = new ArrayList<>(); for (int i = 0; i < numElements; i++) { - long timestamp = (ThreadLocalRandom.current().nextLong()); + long timestamp = DateTimes.of("2015-01-01").plusHours(i).getMillis(); expectedEventTimestamps.add(timestamp); srvs.add(ScanQueryTestHelper.generateScanResultValue(timestamp, resultFormat, 1)); } @@ -122,7 +124,7 @@ public class ScanQueryRunnerFactoryTest factory.sortAndLimitScanResultValuesPriorityQueue( inputSequence, query, - null + ImmutableList.of(new SegmentDescriptor(new Interval(DateTimes.of("2010-01-01"), DateTimes.of("2019-01-01").plusHours(1)), "1", 0)) ).toList(); // check each scan result value has one event