saurabhd336 commented on code in PR #12208:
URL: https://github.com/apache/pinot/pull/12208#discussion_r1439359658


##########
pinot-controller/src/main/java/org/apache/pinot/controller/recommender/data/writer/CsvWriter.java:
##########
@@ -38,6 +38,13 @@ protected String generateRow(DataGenerator generator) {
     return StringUtils.join(values, ",");
   }
 
+  @Override
+  protected void preprocess(java.io.FileWriter writer)
+      throws Exception {
+    final String headers = 
StringUtils.join(_spec.getGenerator().nextRow().keySet(), ",");

Review Comment:
   I think this will be wrong since we'll end up calling nextRow() for each 
file, instead we should do it just once. Maybe override init() in this class 
and store the headers?



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

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to