mcvsubbu commented on a change in pull request #4791: Support STRING and BYTES 
for no dictionary columns in realtime consuming segments
URL: https://github.com/apache/incubator-pinot/pull/4791#discussion_r365477359
 
 

 ##########
 File path: 
pinot-core/src/test/java/org/apache/pinot/core/common/RealtimeNoDictionaryTest.java
 ##########
 @@ -95,10 +107,57 @@ private DataFetcher makeDataFetcher(long seed) {
     dataSourceBlock.put(FLOAT_COL_NAME, new ColumnDataSource(floatSpec, 
NUM_ROWS, 0, floatRawIndex, null, null, null, null));
     dataSourceBlock
         .put(DOUBLE_COL_NAME, new ColumnDataSource(doubleSpec, NUM_ROWS, 0, 
doubleRawIndex, null, null, null, null));
+    dataSourceBlock
+        .put(STRING_COL_NAME, new ColumnDataSource(stringSpec, NUM_ROWS, 0, 
stringRawIndex, null, null, null, null));
 
     return new DataFetcher(dataSourceBlock);
   }
 
+  @Test
+  public void testString() {
+    long seed = new Random().nextLong();
+    DataFetcher dataFetcher = makeDataFetcher(seed);
+    int[] docIds = new int[NUM_ROWS];
+    int numDocIds = _random.nextInt(NUM_ROWS) + 1;
+    for (int i = 0; i < numDocIds; i++) {
+      docIds[i] = _random.nextInt(NUM_ROWS);
+    }
+    try {
+      int[] intValues = new int[NUM_ROWS];
+      dataFetcher.fetchIntValues(INT_COL_NAME, docIds, numDocIds, intValues);
 
 Review comment:
   why are we testing this again? This functionality is already tested in 
testIntValues() right? You only need to add testStringValue() and 
testBytesValue(). Since these data types cannot be fetched as any other,we only 
need to iterate the fetcher through the corresponding value types

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to