abhioncbr commented on code in PR #10656:
URL: https://github.com/apache/pinot/pull/10656#discussion_r1204607591
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/TableConfigUtils.java:
##########
@@ -444,4 +447,36 @@ public static boolean
hasPreConfiguredInstancePartitions(TableConfig tableConfig
return hasPreConfiguredInstancePartitions(tableConfig)
&&
tableConfig.getInstancePartitionsMap().containsKey(instancePartitionsType);
}
+
+ /**
+ * Get the partition column from InstanceAssignmentConfigUtils
+ * @param tableConfig table config
+ * @return partition column
+ */
+ public static String getPartitionColumn(TableConfig tableConfig) {
+ String partitionColumn = null;
+
+ // check getInstanceAssignmentConfigMap is null or empty,
+ if (!MapUtils.isEmpty(tableConfig.getInstanceAssignmentConfigMap())) {
+ for (String key : tableConfig.getInstanceAssignmentConfigMap().keySet())
{
+ //check getInstanceAssignmentConfigMap has the key of TableType
+ if (Objects.equals(key, tableConfig.getTableType().toString())) {
Review Comment:
I have made the changes. Thanks
--
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]