jon-wei commented on a change in pull request #6757: Set is_available to false
by default for published segment
URL: https://github.com/apache/incubator-druid/pull/6757#discussion_r243134649
##########
File path:
sql/src/test/java/org/apache/druid/sql/calcite/schema/SystemSchemaTest.java
##########
@@ -447,19 +472,138 @@ public Object get(String name)
final List<Object[]> rows = segmentsTable.scan(dataContext).toList();
- Assert.assertEquals(6, rows.size());
+ // total segments = 8
+ // segment wikipedia1, wikipedia2, wikipedia3 are published but unavailable
+ // segments test1, test2 are published and available
+ // segment test3 is served by historical but unpublished or unused
+ // segments test4, test5 are not published but available (realtime
segments)
+
+ Assert.assertEquals(8, rows.size());
Object[] row0 = rows.get(0);
- //segment 6 is published and unavailable, num_replicas is 0
- Assert.assertEquals(1L, row0[9]);
- Assert.assertEquals(0L, row0[7]);
+ //segment 0 is published and unavailable, num_replicas is 0
+ Assert.assertEquals(
+
"wikipedia1_2018-08-07T23:00:00.000Z_2018-08-08T00:00:00.000Z_2018-08-07T23:00:00.059Z",
+ row0[0]
+ );
+ Assert.assertEquals("wikipedia1", row0[1]);
+ Assert.assertEquals("2018-08-07T23:00:00.000Z", row0[2]);
+ Assert.assertEquals("2018-08-08T00:00:00.000Z", row0[3]);
+ Assert.assertEquals(47406L, row0[4]);
+ Assert.assertEquals("2018-08-07T23:00:00.059Z", row0[5]);
+ Assert.assertEquals(0L, row0[6]); //partition_num
Review comment:
Suggest using a ShardSpec type other than "None" for some segments to test
that partition_num is being handled correctly
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]