@Override
  public ColumnTransformer visitCaseWhenThenExpression(
      CaseWhenThenExpression caseWhenThenExpression, ColumnTransformerVisitorContext context) {
    if (!context.cache.containsKey(caseWhenThenExpression)
        && !generateIdentityColumnTransformerIfPossible(caseWhenThenExpression, context)) {
      if (context.hasSeen.containsKey(caseWhenThenExpression)) {
        IdentityColumnTransformer identity =
            new IdentityColumnTransformer(
                TypeFactory.getType(context.getType(caseWhenThenExpression)),
                context.originSize + context.commonTransformerList.size());
        ColumnTransformer columnTransformer = context.hasSeen.get(caseWhenThenExpression);
        columnTransformer.addReferenceCount();
        context.commonTransformerList.add(columnTransformer);
        context.leafList.add(identity);
        context.inputDataTypes.add(context.getType(caseWhenThenExpression));
        context.cache.put(caseWhenThenExpression, identity);
      } else {
        List<ColumnTransformer> whenList = new ArrayList<>();
        List<ColumnTransformer> thenList = new ArrayList<>();
        for (WhenThenExpression whenThenExpression :
            caseWhenThenExpression.getWhenThenExpressions()) {
          whenList.add(this.process(whenThenExpression.getWhen(), context));
          thenList.add(this.process(whenThenExpression.getThen(), context));
        }
        ColumnTransformer elseColumnTransformer =
            this.process(caseWhenThenExpression.getElseExpression(), context);
        context.cache.put(
            caseWhenThenExpression,
            new TreeCaseWhenThenColumnTransformer(
                TypeFactory.getType(context.getType(caseWhenThenExpression)),
                whenList,
                thenList,
                elseColumnTransformer));
      }
    }

    ColumnTransformer res = context.cache.get(caseWhenThenExpression);
    res.addReferenceCount();
    return res;
  }
Responsible for constructing {@link ColumnTransformer} through Expression.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ColumnTransformerVisitor.java