public boolean isDecomposable(SessionInfo session, Metadata metadata) {
    boolean hasOrderBy =
        getAggregations().values().stream()
            .map(Aggregation::getOrderingScheme)
            .anyMatch(Optional::isPresent);

    boolean hasDistinct = getAggregations().values().stream().anyMatch(Aggregation::isDistinct);

    /*boolean decomposableFunctions = getAggregations().values().stream()
    .map(Aggregation::getResolvedFunction)
    .map(resolvedFunction -> metadata.getAggregationFunctionMetadata(session, resolvedFunction))
    .allMatch(AggregationFunctionMetadata::isDecomposable);*/

    return !hasOrderBy && !hasDistinct;
  }
@return whether this node should produce default output in case of no input pages. For example
    for query:
    <p>SELECT count(*) FROM nation WHERE nationkey < 0
    <p>A default output of "0" is expected to be produced by FINAL aggregation operator.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/AggregationNode.java