Jackie-Jiang commented on code in PR #7908:
URL: https://github.com/apache/pinot/pull/7908#discussion_r1295208854
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -1253,6 +1254,25 @@ public static void verifyHybridTableConfigs(String
rawTableName, TableConfig off
"Time column names are different for table: %s! Offline time column
name: %s. Realtime time column name: %s",
rawTableName, offlineTimeColumnName, realtimeTimeColumnName));
}
+ TenantConfig offlineTenantConfig = offlineTableConfig.getTenantConfig();
+ TenantConfig realtimeTenantConfig = realtimeTableConfig.getTenantConfig();
+ Preconditions.checkNotNull(realtimeTenantConfig,
+ "Found null realtime table tenant config in hybrid table check for
table: %s", rawTableName);
+ Preconditions.checkNotNull(offlineTableConfig,
+ "Found null offline table tenant config in hybrid table check for
table: %s", rawTableName);
+ String offlineBroker = offlineTenantConfig.getBroker();
+ String realtimeBroker = realtimeTenantConfig.getBroker();
+ if (offlineBroker == null || realtimeBroker == null) {
Review Comment:
This is allowed for single tenant cluster. We should treat `null` as
`TagNameUtils.DEFAULT_TENANT_NAME`
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -1253,6 +1254,25 @@ public static void verifyHybridTableConfigs(String
rawTableName, TableConfig off
"Time column names are different for table: %s! Offline time column
name: %s. Realtime time column name: %s",
rawTableName, offlineTimeColumnName, realtimeTimeColumnName));
}
+ TenantConfig offlineTenantConfig = offlineTableConfig.getTenantConfig();
+ TenantConfig realtimeTenantConfig = realtimeTableConfig.getTenantConfig();
+ Preconditions.checkNotNull(realtimeTenantConfig,
+ "Found null realtime table tenant config in hybrid table check for
table: %s", rawTableName);
+ Preconditions.checkNotNull(offlineTableConfig,
+ "Found null offline table tenant config in hybrid table check for
table: %s", rawTableName);
Review Comment:
(minor) These checks are redundant as they are already checked within the
table config constructor
--
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]