@Test
  public void groupByLevelWithSameColumn() throws SQLException {
    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {

      try (ResultSet resultSet =
          statement.executeQuery(
              "SELECT count_udaf(status),count_udaf(status) "
                  + "FROM root.** "
                  + "GROUP BY LEVEL=0")) {

        ResultSetMetaData metaData = resultSet.getMetaData();
        Assert.assertEquals(metaData.getColumnName(1), metaData.getColumnName(2));
        Assert.assertEquals(countUDAF("root.*.*.status"), metaData.getColumnName(1));
        Assert.assertEquals(2, metaData.getColumnCount());
      }
    }
  }
[root.sg.d1.temperature, root.sg.d2.temperature] with level = 2

<p>Result is [root.*.d1.temperature, root.*.d2.temperature]
integration-test/src/test/java/org/apache/iotdb/db/it/udaf/IoTDBUDAFGroupByLevelIT.java