Copilot commented on code in PR #16160:
URL: https://github.com/apache/pinot/pull/16160#discussion_r2159094676


##########
pinot-perf/src/main/java/org/apache/pinot/perf/BenchmarkTextMatchQueriesSSQE.java:
##########
@@ -269,32 +289,42 @@ private String getString() {
       @Override
       public GenericRow next(GenericRow row, int i) {
         for (String strCol : _multiColIdxCols) {
-          row.putValue(strCol,
-              _strings.computeIfAbsent((int) _supplier.getAsLong(), 
_function));
+          String value = _strings.computeIfAbsent((int) _supplier.getAsLong(), 
_function);
+          row.putValue(strCol, value);
         }
         for (String strCol : _singleColIdxCols) {
           row.putValue(strCol,
               _strings.computeIfAbsent((int) _supplier.getAsLong(), 
_function));
         }
-        //row.putValue(LOW_CARDINALITY_STRING_COL, _lowCardinalityValues[i % 
_lowCardinalityValues.length]);
         row.putValue(TIMESTAMP_COL, i * 1200 * 1000L);
+
+        if (i % 100000 == 0) {
+          String[] words = new String[10];
+          for (int w = 0; w < 10; w++) {
+            words[w] = (String) row.getValue(isMultiColIdx ? 
_multiColIdxCols.get(w) : _singleColIdxCols.get(w));
+          }
+          SEARCH_WORDS.add(words);
+        }
+
         return null;
       }
 
       @Override
       public void rewind() {
-        _strings.clear();
         initStrings();
         _supplier.reset();
       }
     };
   }
 
-  private void buildSegment(String segmentName)
+  private void buildSegment(String segmentName, Distribution.DataSupplier 
supplier, int segmentNum)
       throws Exception {
-    LazyDataGenerator rows = createTestData(_numRows, _supplier);
+    LazyDataGenerator rows = createTestData(_numRows, supplier, 
_isMultiColIdx);
     SegmentGeneratorConfig config = new SegmentGeneratorConfig(_tableConfig, 
_schema);
-    config.setOutDir(INDEX_DIR.getPath());
+    String path = new File(INDEX_DIR, "" + segmentNum).getPath();
+    System.out.println(
+        "Bulding segment: " + segmentNum + " in path: " + path + " by thread: 
" + Thread.currentThread().getName());

Review Comment:
   The log message contains a spelling mistake ('Bulding' should be 
'Building'). Correcting this typo will improve clarity in debugging logs.
   ```suggestion
           "Building segment: " + segmentNum + " in path: " + path + " by 
thread: " + Thread.currentThread().getName());
   ```



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java:
##########
@@ -472,6 +473,7 @@ public MultiColumnTextMetadata getMultiColumnTextMetadata() 
{
       _multiColumnTextIndex = null;
       _multiColumnPos = null;
       _multiColumnValues = null;
+      _multiColumnTextMetadata = null;

Review Comment:
   Assigning null to a final field (_multiColumnTextMetadata) violates Java's 
final field constraints and will cause a compilation error. Consider removing 
the final modifier or revising the logic to avoid reassigning this field.
   ```suggestion
         _multiColumnTextMetadata = new 
MultiColumnTextMetadata(MultiColumnTextMetadata.VERSION_1, 
             Collections.emptyList(), Collections.emptyMap(), 
Collections.emptyMap());
   ```



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