private PlanAndMappings planSubquery(
      Expression subquery, Optional<Type> coercion, TranslationMap outerContext) {
    Type type = analysis.getType(subquery);
    Symbol column = symbolAllocator.newSymbol("row", type);

    RelationPlan relationPlan = planSubquery(subquery, outerContext);

    PlanBuilder subqueryPlan =
        newPlanBuilder(
            relationPlan,
            analysis,
            ImmutableMap.of(scopeAwareKey(subquery, analysis, relationPlan.getScope()), column));

    RelationType descriptor = relationPlan.getDescriptor();
    ImmutableList.Builder<Expression> fields = ImmutableList.builder();
    for (int i = 0; i < descriptor.getAllFieldCount(); i++) {
      Field field = descriptor.getFieldByIndex(i);
      if (!field.isHidden()) {
        fields.add(relationPlan.getFieldMappings().get(i).toSymbolReference());
      }
    }

    List<Expression> fieldsList = fields.build();
    // Attention: remove this check after supporting RowType
    checkArgument(fieldsList.size() == 1, "For now, only single column subqueries are supported.");
    /*subqueryPlan =
    subqueryPlan.withNewRoot(
        new ProjectNode(
            idAllocator.genPlanNodeId(),
            relationPlan.getRoot(),
            Assignments.of(column, new Cast(new Row(fields.build()), toSqlType(type)))));*/

    subqueryPlan =
        subqueryPlan.withNewRoot(
            new ProjectNode(
                idAllocator.genPlanNodeId(),
                relationPlan.getRoot(),
                Assignments.of(column, fieldsList.get(0))));

    return coerceIfNecessary(subqueryPlan, column, subquery, coercion);
  }
Adds a negation of the given input and remaps the provided expression to the negated expression
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SubqueryPlanner.java