Initialize NullValueHandlingConfig for failed tests (#13078)

* Initialize null handling

* Refactor nullhandlingconfig init
This commit is contained in:
Atul Mohan 2022-09-15 05:47:10 -07:00 committed by GitHub
parent 1311e85f65
commit c153c2a712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -20,6 +20,7 @@
package org.apache.druid.msq.statistics; package org.apache.druid.msq.statistics;
import com.google.common.collect.ImmutableList; 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.ClusterBy;
import org.apache.druid.frame.key.KeyTestUtils; import org.apache.druid.frame.key.KeyTestUtils;
import org.apache.druid.frame.key.RowKey; 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 RowSignature signature = RowSignature.builder().add("x", ColumnType.LONG).build();
private final Comparator<RowKey> comparator = clusterBy.keyComparator(); private final Comparator<RowKey> comparator = clusterBy.keyComparator();
static {
NullHandling.initializeForTests();
}
@Test @Test
public void testEmpty() public void testEmpty()
{ {

View File

@ -20,6 +20,7 @@
package org.apache.druid.msq.statistics; package org.apache.druid.msq.statistics;
import com.google.common.collect.ImmutableList; 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.ClusterBy;
import org.apache.druid.frame.key.ClusterByPartition; import org.apache.druid.frame.key.ClusterByPartition;
import org.apache.druid.frame.key.ClusterByPartitions; import org.apache.druid.frame.key.ClusterByPartitions;
@ -41,6 +42,10 @@ public class QuantilesSketchKeyCollectorTest
private final Comparator<RowKey> comparator = clusterBy.keyComparator(); private final Comparator<RowKey> comparator = clusterBy.keyComparator();
private final int numKeys = 500_000; private final int numKeys = 500_000;
static {
NullHandling.initializeForTests();
}
@Test @Test
public void test_empty() public void test_empty()
{ {