private PlanBuilder planInPredicate(
      PlanBuilder subPlan,
      Expression value,
      SubqueryExpression subquery,
      Symbol output,
      Expression originalExpression,
      Analysis.PredicateCoercions predicateCoercions) {
    PlanAndMappings subqueryPlan =
        planSubquery(subquery, predicateCoercions.getSubqueryCoercion(), subPlan.getTranslations());
    PlanAndMappings valuePlan =
        planValue(
            subPlan,
            value,
            predicateCoercions.getValueType(),
            predicateCoercions.getValueCoercion());

    return new PlanBuilder(
        valuePlan.getSubPlan().getTranslations(),
        new ApplyNode(
            idAllocator.genPlanNodeId(),
            valuePlan.getSubPlan().getRoot(),
            subqueryPlan.getSubPlan().getRoot(),
            ImmutableMap.of(
                output, new ApplyNode.In(valuePlan.get(value), subqueryPlan.get(subquery))),
            valuePlan.getSubPlan().getRoot().getOutputSymbols(),
            originalExpression));
  }
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