public boolean hasSingleNodeExecutionPreference(SessionInfo session, Metadata metadata) {
    // There are two kinds of aggregations the have single node execution preference:
    //
    // 1. aggregations with only empty grouping sets like
    //
    // SELECT count(*) FROM lineitem;
    //
    // there is no need for distributed aggregation. Single node FINAL aggregation will suffice,
    // since all input have to be aggregated into one line output.
    //
    // 2. aggregations that must produce default output and are not decomposable, we cannot
    // distribute them.
    return (hasEmptyGroupingSet() && !hasNonEmptyGroupingSet())
        || (hasDefaultOutput() && !isDecomposable(session, metadata));
  }
@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