From c153c2a712fda09b7ea78a74f533578e57bdcb9f Mon Sep 17 00:00:00 2001 From: Atul Mohan Date: Thu, 15 Sep 2022 05:47:10 -0700 Subject: [PATCH] Initialize NullValueHandlingConfig for failed tests (#13078) * Initialize null handling * Refactor nullhandlingconfig init --- .../druid/msq/statistics/DelegateOrMinKeyCollectorTest.java | 5 +++++ .../msq/statistics/QuantilesSketchKeyCollectorTest.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/DelegateOrMinKeyCollectorTest.java b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/DelegateOrMinKeyCollectorTest.java index f5a07de1af5..09b52a37157 100644 --- a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/DelegateOrMinKeyCollectorTest.java +++ b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/DelegateOrMinKeyCollectorTest.java @@ -20,6 +20,7 @@ package org.apache.druid.msq.statistics; import com.google.common.collect.ImmutableList; +import org.apache.druid.common.config.NullHandling; import org.apache.druid.frame.key.ClusterBy; import org.apache.druid.frame.key.KeyTestUtils; import org.apache.druid.frame.key.RowKey; @@ -41,6 +42,10 @@ public class DelegateOrMinKeyCollectorTest private final RowSignature signature = RowSignature.builder().add("x", ColumnType.LONG).build(); private final Comparator comparator = clusterBy.keyComparator(); + static { + NullHandling.initializeForTests(); + } + @Test public void testEmpty() { diff --git a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/QuantilesSketchKeyCollectorTest.java b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/QuantilesSketchKeyCollectorTest.java index 0555c7c5d55..974f79c7bfb 100644 --- a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/QuantilesSketchKeyCollectorTest.java +++ b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/statistics/QuantilesSketchKeyCollectorTest.java @@ -20,6 +20,7 @@ package org.apache.druid.msq.statistics; import com.google.common.collect.ImmutableList; +import org.apache.druid.common.config.NullHandling; import org.apache.druid.frame.key.ClusterBy; import org.apache.druid.frame.key.ClusterByPartition; import org.apache.druid.frame.key.ClusterByPartitions; @@ -41,6 +42,10 @@ public class QuantilesSketchKeyCollectorTest private final Comparator comparator = clusterBy.keyComparator(); private final int numKeys = 500_000; + static { + NullHandling.initializeForTests(); + } + @Test public void test_empty() {