vrajat commented on code in PR #13221:
URL: https://github.com/apache/pinot/pull/13221#discussion_r1618199869
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/plannode/StageNodeSerDeUtils.java:
##########
@@ -28,70 +29,11 @@ private StageNodeSerDeUtils() {
}
public static AbstractPlanNode deserializeStageNode(Plan.StageNode
protoNode) {
- AbstractPlanNode planNode = newNodeInstance(protoNode.getNodeName(),
protoNode.getStageId());
- planNode.setDataSchema(extractDataSchema(protoNode));
- planNode.fromObjectField(protoNode.getObjectField());
- for (Plan.StageNode protoChild : protoNode.getInputsList()) {
- planNode.addInput(deserializeStageNode(protoChild));
- }
- return planNode;
+ return new DeserializationVisitor().process(protoNode);
Review Comment:
This is also not really a visitor. Changed all methods to static and added a
private constructor.
--
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]