You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/06/05 03:46:03 UTC

[GitHub] [druid] mghosh4 commented on a change in pull request #9861: Empty partitionDimension has less rollup compared to when explicitly specified

mghosh4 commented on a change in pull request #9861:
URL: https://github.com/apache/druid/pull/9861#discussion_r435674449



##########
File path: indexing-service/src/test/java/org/apache/druid/indexing/common/task/IndexTaskTest.java
##########
@@ -1783,6 +1788,36 @@ public void testIndexTaskWithSingleDimPartitionsSpecThrowingException() throws E
     task.isReady(createActionClient(task));
   }
 
+  @Test
+  public void testShardSpecSelectionWithNullPartitionDimension()
+  {
+    ShardSpec spec1 = new HashBasedNumberedShardSpec(0, 2, null, jsonMapper);
+    ShardSpec spec2 = new HashBasedNumberedShardSpec(1, 2, null, jsonMapper);
+
+    Map<Interval, List<ShardSpec>> shardSpecMap = new HashMap<>();
+    shardSpecMap.put(Intervals.of("2014-01-01T00:00:00.000Z/2014-01-02T00:00:00.000Z"), Lists.newArrayList(spec1, spec2));
+
+    IndexTask.ShardSpecs shardSpecs = new IndexTask.ShardSpecs(shardSpecMap, Granularity.fromString("HOUR"));

Review comment:
       Fixed

##########
File path: indexing-service/src/test/java/org/apache/druid/indexing/common/task/IndexTaskTest.java
##########
@@ -1783,6 +1788,36 @@ public void testIndexTaskWithSingleDimPartitionsSpecThrowingException() throws E
     task.isReady(createActionClient(task));
   }
 
+  @Test
+  public void testShardSpecSelectionWithNullPartitionDimension()
+  {
+    ShardSpec spec1 = new HashBasedNumberedShardSpec(0, 2, null, jsonMapper);
+    ShardSpec spec2 = new HashBasedNumberedShardSpec(1, 2, null, jsonMapper);
+
+    Map<Interval, List<ShardSpec>> shardSpecMap = new HashMap<>();
+    shardSpecMap.put(Intervals.of("2014-01-01T00:00:00.000Z/2014-01-02T00:00:00.000Z"), Lists.newArrayList(spec1, spec2));
+
+    IndexTask.ShardSpecs shardSpecs = new IndexTask.ShardSpecs(shardSpecMap, Granularity.fromString("HOUR"));
+    String visitor_id = "visitor_id";
+    String client_type = "client_type";

Review comment:
       Fixed




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org