private Type coerceToSingleType(
        StackableAstVisitorContext<Context> context,
        Node node,
        String message,
        Expression first,
        Expression second) {
      Type firstType = UNKNOWN;
      if (first != null) {
        firstType = process(first, context);
      }
      Type secondType = UNKNOWN;
      if (second != null) {
        secondType = process(second, context);
      }

      if (!firstType.equals(secondType)) {
        throw new SemanticException(String.format("%s: %s vs %s", message, firstType, secondType));
      }

      return firstType;
    }
@return the common supertype between the value type and subquery type
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalyzer.java