abhishekbafna commented on code in PR #15994: URL: https://github.com/apache/pinot/pull/15994#discussion_r2149609754
########## pinot-common/src/main/java/org/apache/pinot/common/utils/LogicalTableConfigUtils.java: ########## @@ -139,13 +139,22 @@ public static void validateLogicalTableConfig( "Invalid logical table. Reason: 'physicalTableConfigMap' should not be null or empty"); } + String databaseName = DatabaseUtils.extractDatabaseFromFullyQualifiedTableName(logicalTableConfig.getTableName()); Set<String> offlineTableNames = new HashSet<>(); Set<String> realtimeTableNames = new HashSet<>(); for (Map.Entry<String, PhysicalTableConfig> entry : logicalTableConfig.getPhysicalTableConfigMap().entrySet()) { String physicalTableName = entry.getKey(); PhysicalTableConfig physicalTableConfig = entry.getValue(); + // validate database name matches + String physicalTableDatabaseName = DatabaseUtils.extractDatabaseFromFullyQualifiedTableName(physicalTableName); + if (!StringUtils.equalsIgnoreCase(databaseName, physicalTableDatabaseName)) { + throw new IllegalArgumentException( + "Invalid logical table. Reason: 'physicalTableName' should have the same database name as logical table: " Review Comment: I will replace it with actual table name. -- 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