public PlanBuilder appendCorrelatedJoin(
      PlanBuilder subPlan,
      PlanNode subquery,
      Query query,
      JoinNode.JoinType type,
      Expression filterCondition,
      Map<ScopeAware<Expression>, Symbol> mappings) {
    return new PlanBuilder(
        subPlan.getTranslations().withAdditionalMappings(mappings),
        new CorrelatedJoinNode(
            idAllocator.genPlanNodeId(),
            subPlan.getRoot(),
            subquery,
            subPlan.getRoot().getOutputSymbols(),
            type,
            filterCondition,
            query));
  }
Plans a correlated subquery for value IN (subQuery)

@param originalExpression the original expression from which the IN predicate was derived. Used
    for subsequent translations.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SubqueryPlanner.java