You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "navina (via GitHub)" <gi...@apache.org> on 2023/06/21 05:51:12 UTC

[GitHub] [pinot] navina commented on a diff in pull request #10946: Add a new SegmentPurger interface method to get record purger based on table configs and schema

navina commented on code in PR #10946:
URL: https://github.com/apache/pinot/pull/10946#discussion_r1236397175


##########
pinot-core/src/main/java/org/apache/pinot/core/minion/SegmentPurger.java:
##########
@@ -230,6 +231,10 @@ public interface RecordPurgerFactory {
      * Get the {@link RecordPurger} for the given table.
      */
     RecordPurger getRecordPurger(String rawTableName);
+
+    default RecordPurger getRecordPurger(PinotTaskConfig taskConfig, TableConfig tableConfig, Schema tableSchema) {

Review Comment:
   nit: add javadocs to public apis



##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/purge/PurgeTaskExecutor.java:
##########
@@ -46,14 +46,14 @@ protected SegmentConversionResult convert(PinotTaskConfig pinotTaskConfig, File
     String rawTableName = TableNameBuilder.extractRawTableName(tableNameWithType);
 
     SegmentPurger.RecordPurgerFactory recordPurgerFactory = MINION_CONTEXT.getRecordPurgerFactory();
+    TableConfig tableConfig = getTableConfig(tableNameWithType);
+    Schema schema = getSchema(tableNameWithType);
     SegmentPurger.RecordPurger recordPurger =
-        recordPurgerFactory != null ? recordPurgerFactory.getRecordPurger(rawTableName) : null;
+        getRecordPurger(pinotTaskConfig, recordPurgerFactory, tableConfig, schema);

Review Comment:
   +1 to Sajjad's comment about ternary operator reads better. 
   



-- 
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-unsubscribe@pinot.apache.org

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


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