klsince commented on a change in pull request #7473:
URL: https://github.com/apache/pinot/pull/7473#discussion_r714976261



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/IngestionUtils.java
##########
@@ -88,20 +87,23 @@ private IngestionUtils() {
    */
   public static SegmentGeneratorConfig 
generateSegmentGeneratorConfig(TableConfig tableConfig, Schema schema)
       throws IOException, ClassNotFoundException {
-    return generateSegmentGeneratorConfig(tableConfig, schema, 
Collections.emptyMap());
+    Preconditions.checkNotNull(tableConfig.getIngestionConfig(),
+        "Must provide ingestionConfig in tableConfig for table: %s, for 
generating SegmentGeneratorConfig",
+        tableConfig.getTableName());
+    
Preconditions.checkNotNull(tableConfig.getIngestionConfig().getBatchIngestionConfig(),

Review comment:
       nit: this check might be saved, as it's checked in the method call L96? 

##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/IngestionUtils.java
##########
@@ -110,8 +112,6 @@ public static SegmentGeneratorConfig 
generateSegmentGeneratorConfig(TableConfig
 
     // apply config override provided by user.
     Map<String, String> batchConfigMap = new 
HashMap<>(batchIngestionConfig.getBatchConfigMaps().get(0));

Review comment:
       Q: is this defensive copy needed? I found the old code didn't do the 
copy.




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