@Override
  public List<PlanNode> visitPatternRecognition(PatternRecognitionNode node, PlanContext context) {
    context.clearExpectedOrderingScheme();
    if (node.getChildren().isEmpty()) {
      return Collections.singletonList(node);
    }
    boolean canSplitPushDown = (node.getChild() instanceof GroupNode);
    List<PlanNode> childrenNodes = node.getChild().accept(this, context);
    if (childrenNodes.size() == 1) {
      node.setChild(childrenNodes.get(0));
      return Collections.singletonList(node);
    } else if (!canSplitPushDown) {
      CollectNode collectNode =
          new CollectNode(queryId.genPlanNodeId(), node.getChildren().get(0).getOutputSymbols());
      childrenNodes.forEach(collectNode::addChild);
      node.setChild(collectNode);
      return Collections.singletonList(node);
    } else {
      return splitForEachChild(node, childrenNodes);
    }
  }
This class is used to generate distributed plan for table model.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java