Jackie-Jiang commented on code in PR #8743:
URL: https://github.com/apache/pinot/pull/8743#discussion_r881092189


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/TableConfigUtils.java:
##########
@@ -258,32 +257,26 @@ public static void 
convertFromLegacyTableConfig(TableConfig tableConfig) {
     IndexingConfig indexingConfig = tableConfig.getIndexingConfig();
 
     if (streamIngestionConfig == null) {
-      Map<String, String> streamConfigs = indexingConfig.getStreamConfigs();
-
       // Only set the new config if the deprecated one is set.
-      if (streamConfigs != null && !streamConfigs.isEmpty()) {
+      Map<String, String> streamConfigs = indexingConfig.getStreamConfigs();
+      if (MapUtils.isNotEmpty(streamConfigs)) {
         streamIngestionConfig = new 
StreamIngestionConfig(Collections.singletonList(streamConfigs));
       }
     }
 
     if (ingestionConfig == null) {
       if (batchIngestionConfig != null || streamIngestionConfig != null) {
-        ingestionConfig = new IngestionConfig(batchIngestionConfig, 
streamIngestionConfig, null, null, null, null);
-      }
-    } else {
-      if (batchIngestionConfig != null) {
+        ingestionConfig = new IngestionConfig();

Review Comment:
   Currently empty ingestion config has the same behavior with `null`, but 
usually we expect `null` when the config does not apply



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