public TSDataType getType(Expression expression) {
      if (typeProvider != null) {
        return typeProvider.getTreeModelType(expression.getOutputSymbol());
      }
      if (expressionTypes.get(NodeRef.of(expression)) != UNKNOWN) {
        return expressionTypes.get(NodeRef.of(expression));
      } else {
        for (Map.Entry<NodeRef<Expression>, TSDataType> entry : expressionTypes.entrySet()) {
          if (entry.getKey().getNode().equals(expression) && entry.getValue() != UNKNOWN) {
            return entry.getValue();
          }
        }
        throw new IllegalStateException(
            String.format(
                "Unknown expression type: %s, perhaps it has non existent measurement.",
                expression.getOutputSymbol()));
      }
    }
the input could be calculated expressions that we can use directly and we do not need to do
further calculation if so

@return true if the expression has been calculated
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ColumnTransformerVisitor.java