hqx871 commented on code in PR #13303:
URL: https://github.com/apache/druid/pull/13303#discussion_r1098755961
##########
core/src/test/java/org/apache/druid/timeline/partition/DimensionRangeShardSpecTest.java:
##########
@@ -136,6 +136,61 @@ public void testShardSpecLookup()
);
}
+ @Test
+ public void testShardSpecLookupWithNull()
+ {
+ setDimensions("dim1", "dim2");
+
+ final DimensionRangeShardSpec shard0 = new DimensionRangeShardSpec(
+ dimensions,
+ null,
+ StringTuple.create("India", null),
+ 1,
+ 1
+ );
+
+ final DimensionRangeShardSpec shard1 = new DimensionRangeShardSpec(
+ dimensions,
+ StringTuple.create("India", null),
+ StringTuple.create("Spain", "Valencia"),
+ 10,
+ 1
+ );
+
+ final DimensionRangeShardSpec shard2 = new DimensionRangeShardSpec(
+ dimensions,
+ StringTuple.create("Spain", "Valencia"),
+ StringTuple.create("Tokyo", null),
+ 10,
+ 1
+ );
+
+ final DimensionRangeShardSpec shard3 = new DimensionRangeShardSpec(
+ dimensions,
+ StringTuple.create("Tokyo", null),
+ null,
+ 100,
+ 1
+ );
+ final ShardSpecLookup lookup = shard0.getLookup(Arrays.asList(shard0,
shard1, shard2, shard3));
Review Comment:
I learned this from somewhere else, like
HashBucketShardSpecTest.testShardSpecLookup
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]