ankitsultana commented on code in PR #16003:
URL: https://github.com/apache/pinot/pull/16003#discussion_r2129155416
##########
pinot-timeseries/pinot-timeseries-planner/src/main/java/org/apache/pinot/tsdb/planner/physical/TableScanVisitor.java:
##########
@@ -68,6 +77,53 @@ public void assignSegmentsToPlan(BaseTimeSeriesPlanNode
planNode, TimeBuckets ti
}
}
+ /**
+ * Adds table type information (offline/realtime) to the plan node.
+ * If the plan node is a leaf node, it retrieves the table route info and
updates the table name with type.
+ * If the plan node has child nodes, it recursively processes each child
node.
+ *
+ * @param planNode The {@link BaseTimeSeriesPlanNode} to process.
+ * @return The updated {@link BaseTimeSeriesPlanNode} with table type
information.
+ */
+ public BaseTimeSeriesPlanNode addTableTypeInfoToPlan(BaseTimeSeriesPlanNode
planNode) {
+ if (planNode instanceof LeafTimeSeriesPlanNode) {
+ LeafTimeSeriesPlanNode sfpNode = (LeafTimeSeriesPlanNode) planNode;
+ TableRouteInfo routeInfo =
_tableRouteProvider.getTableRouteInfo(sfpNode.getTableName(), _tableCache,
Review Comment:
I think this is not what we were looking for. This is just replacing the
user supplied table name with tableNameWithType.
What we instead want to do is:
1. We need to get RoutingTables for both table-types if a user doesn't
provide any table-type.
2. The segments by server assignment needs to include both routing tables.
If you do that then hybrid tables will also work. The change can be made in
`assignSegmentsToPlan`.
--
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]