tarun11Mavani commented on code in PR #16344:
URL: https://github.com/apache/pinot/pull/16344#discussion_r2306197970


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -1524,14 +1528,49 @@ public static TableConfig 
createTableConfigFromOldFormat(TableConfig tableConfig
     if (clone.getFieldConfigList() != null) {
       List<FieldConfig> cleanFieldConfigList = new ArrayList<>();
       for (FieldConfig fieldConfig : clone.getFieldConfigList()) {
-        cleanFieldConfigList.add(new FieldConfig.Builder(fieldConfig)
-            .withIndexTypes(null).withProperties(null).build());
+        cleanFieldConfigList.add(
+            new 
FieldConfig.Builder(fieldConfig).withIndexTypes(null).withProperties(null).build());
       }
       clone.setFieldConfigList(cleanFieldConfigList);
     }
     return clone;
   }
 
+  public static boolean isCommitTimeCompactionEnabled(TableConfig tableConfig) 
{
+    if (tableConfig.getUpsertConfig() == null) {
+      return false;
+    }
+    return tableConfig.getUpsertConfig().isEnableCommitTimeCompaction();
+  }
+
+  /**
+   * Validates that commit-time compaction is compatible with column major 
segment builder settings.
+   *
+   * @param tableConfig The table configuration to validate
+   * @throws IllegalStateException if commit-time compaction is enabled with 
column major segment builder
+   */
+  public static void validateCommitTimeCompactionConfig(TableConfig 
tableConfig) {
+    boolean commitTimeCompactionEnabled = 
isCommitTimeCompactionEnabled(tableConfig);
+
+    if (commitTimeCompactionEnabled) {
+      boolean isColumnMajorEnabled = false;
+      if (tableConfig.getIngestionConfig() != null
+          && tableConfig.getIngestionConfig().getStreamIngestionConfig() != 
null) {
+        isColumnMajorEnabled =

Review Comment:
   I will be removing this check in follow up PR. I want to break the PR in 
smaller piece to avoid a large PR. 
   I will be raising a new PR immediately after this is merged.



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