gortiz commented on code in PR #13221: URL: https://github.com/apache/pinot/pull/13221#discussion_r1617511201
########## 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: Given this class has no state, can we keep a singleton instance here in order to do not allocate here? -- 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