private void checkGroupingSetsCount(GroupBy node) {
      // If groupBy is distinct then crossProduct will be overestimated if there are duplicate
      // grouping sets.
      int crossProduct = 1;
      for (GroupingElement element : node.getGroupingElements()) {
        try {
          int product = 0;
          if (element instanceof SimpleGroupBy) {
            product = 1;
          } else if (element instanceof GroupingSets) {
            GroupingSets groupingSets = (GroupingSets) element;
            switch (groupingSets.getType()) {
              case CUBE:
                int exponent = ((GroupingSets) element).getSets().size();
                if (exponent > 30) {
                  throw new ArithmeticException();
                }
                product = 1 << exponent;
                break;
              case ROLLUP:
                product = groupingSets.getSets().size() + 1;
                break;
              case EXPLICIT:
                product = groupingSets.getSets().size();
                break;
            }
          } else {
            throw new UnsupportedOperationException(
                "Unsupported grouping element type: " + element.getClass().getName());
          }
          crossProduct = Math.multiplyExact(crossProduct, product);
        } catch (ArithmeticException e) {
          throw new SemanticException(
              String.format("GROUP BY has more than %s grouping sets", Integer.MAX_VALUE));
        }
        //        if (crossProduct > getMaxGroupingSets(session)) {
        //          throw semanticException(TOO_MANY_GROUPING_SETS, node,
        //              "GROUP BY has %s grouping sets but can contain at most %s", crossProduct,
        // getMaxGroupingSets(session));
        //        }
      }
    }
Check if there is Columns function in expression, and verify they are same if there are multi
Column functions.

@param expression input expression
@return if there is Columns function in expression
@throws SemanticException if there are multi Columns functions but different
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java