gortiz commented on code in PR #13943: URL: https://github.com/apache/pinot/pull/13943#discussion_r1796836057
########## pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerManager.java: ########## @@ -484,79 +507,119 @@ private PartitionTableInfo getPartitionTableInfo(String tableName, String partit fullyReplicatedServers.retainAll(realtimePartitionInfo._fullyReplicatedServers); Preconditions.checkState(!fullyReplicatedServers.isEmpty(), "Failed to find fully replicated server for partition: %s in hybrid table: %s", i, tableName); - partitionInfoMap[i] = new PartitionInfo(fullyReplicatedServers, offlinePartitionInfo._segments, - realtimePartitionInfo._segments); + partitionInfoMap[i] = new PartitionInfo( + fullyReplicatedServers, offlinePartitionInfo._segments, realtimePartitionInfo._segments); } - return new PartitionTableInfo(partitionInfoMap, timeBoundaryInfo); + return new PartitionTableInfo(partitionInfoMap, timeBoundaryInfo, offlineTpi.getPartitionColumn(), + numPartitions, offlineTpi.getPartitionFunctionName()); } else if (offlineRoutingExists) { - return getOfflinePartitionTableInfo(offlineTableName, partitionKey, numPartitions, partitionFunction); + return getOfflinePartitionTableInfo(offlineTableName); } else { - return getRealtimePartitionTableInfo(realtimeTableName, partitionKey, numPartitions, partitionFunction); + return getRealtimePartitionTableInfo(realtimeTableName); } } else { if (tableType == TableType.OFFLINE) { - return getOfflinePartitionTableInfo(tableName, partitionKey, numPartitions, partitionFunction); + return getOfflinePartitionTableInfo(tableName); } else { - return getRealtimePartitionTableInfo(tableName, partitionKey, numPartitions, partitionFunction); + return getRealtimePartitionTableInfo(tableName); } } } - private TablePartitionInfo getTablePartitionInfo(String tableNameWithType, String partitionKey, int numPartitions, - String partitionFunction) { - TablePartitionInfo tablePartitionInfo = _routingManager.getTablePartitionInfo(tableNameWithType); - Preconditions.checkState(tablePartitionInfo != null, "Failed to find table partition info for table: %s", - tableNameWithType); - Preconditions.checkState(tablePartitionInfo.getPartitionColumn().equals(partitionKey), + private static void verifyCompatibility(TablePartitionInfo offlineTpi, TablePartitionInfo realtimeTpi) { + Preconditions.checkState(offlineTpi.getTableNameWithType().equals(realtimeTpi.getTableNameWithType()), Review Comment: Removed. I don't remember why I've added it. At least in the current code they always come from the same raw 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