vrajat commented on code in PR #15773:
URL: https://github.com/apache/pinot/pull/15773#discussion_r2113918435
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java:
##########
@@ -517,4 +519,42 @@ public void forceCommit(String tableNameWithType,
Set<String> segmentNames) {
});
}
}
+
+ // TODO: LogicalTableContext has to be cached.
https://github.com/apache/pinot/issues/15859
+ @Nullable
+ @Override
+ public LogicalTableContext getLogicalTableContext(String logicalTableName) {
+ Schema schema = ZKMetadataProvider.getSchema(getPropertyStore(),
logicalTableName);
+ if (schema == null) {
+ LOGGER.warn("Failed to find schema for logical table: {}, skipping",
logicalTableName);
+ return null;
+ }
+ LogicalTableConfig logicalTableConfig =
ZKMetadataProvider.getLogicalTableConfig(getPropertyStore(),
+ logicalTableName);
+ if (logicalTableConfig == null) {
+ LOGGER.warn("Failed to find logical table config for logical table: {},
skipping", logicalTableName);
+ return null;
+ }
+
+ TableConfig offlineTableConfig = null;
+ if (logicalTableConfig.getRefOfflineTableName() != null) {
+ offlineTableConfig =
ZKMetadataProvider.getOfflineTableConfig(getPropertyStore(),
+ logicalTableConfig.getRefOfflineTableName());
+ if (offlineTableConfig == null) {
Review Comment:
Yes. Some parts of query planning require configs that can only be set in
physical tables. If there are no offline or realtime tables. then the
corresponding reference table name will be null. There are validations for
these conditions in CRUD APIs.
--
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]