walterddr commented on code in PR #9943:
URL: https://github.com/apache/pinot/pull/9943#discussion_r1043750198


##########
pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/queries/ResourceBasedQueriesTest.java:
##########
@@ -85,16 +89,25 @@ public void setUp()
       Map<String, Schema> schemaMap = new HashMap<>();
       for (Map.Entry<String, QueryTestCase.Table> tableEntry : 
testCase._tables.entrySet()) {
         String tableName = testCaseName + "_" + tableEntry.getKey();
-        // TODO: able to choose table type, now default to OFFLINE
+        // Testing only OFFLINE table b/c Hybrid table test is a special case 
to test separately.
         String tableNameWithType = 
TableNameBuilder.forType(TableType.OFFLINE).tableNameWithType(tableName);
         org.apache.pinot.spi.data.Schema pinotSchema = 
constructSchema(tableName, tableEntry.getValue()._schema);
         schemaMap.put(tableName, pinotSchema);
         factory1.registerTable(pinotSchema, tableNameWithType);
         factory2.registerTable(pinotSchema, tableNameWithType);
         List<QueryTestCase.ColumnAndType> columnAndTypes = 
tableEntry.getValue()._schema;
-        // TODO: able to select add rows to server1 or server2 (now default 
server1)
-        // TODO: able to select add rows to existing segment or create new one 
(now default create one segment)
-        factory1.addSegment(tableNameWithType, toRow(columnAndTypes, 
tableEntry.getValue()._inputs));
+        List<GenericRow> genericRows = toRow(columnAndTypes, 
tableEntry.getValue()._inputs);
+        List<GenericRow> rows = new ArrayList<>();
+        for (GenericRow row : genericRows) {
+          if (RANDOM.nextBoolean()) {

Review Comment:
   @agavra suggested offline to me using 
   ```
         "tbl1" : {
           "schema": [
             {"name": "col1", "type": "STRING"},
             {"name": "col2", "type": "INT"}
           ],
           "inputs": [ 
             ["foo", 1],
             ["bar", 2]
           ],
           "partitionColumns": ["col2"] // this will be used to determine 
partitioning, and then partitions can get round-robin assign to servers.
   ```



-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to