@Test
  public void UDAFGroupByMultiLevelWithTimeIntervalTest() throws Exception {
    String[] expected =
        new String[] {
          "null", "88.24", "105.5", "null", "null", "125.5",
        };
    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {

      int cnt = 0;
      try (ResultSet resultSet =
          statement.executeQuery(
              "SELECT sum_udaf(temperature) "
                  + "FROM root.sg2.* "
                  + "GROUP BY ([0, 600), 100ms), LEVEL=0,1")) {
        while (resultSet.next()) {
          String actual = "" + resultSet.getString(sumUDAF("root.sg2.*.temperature"));
          Assert.assertEquals(expected[cnt], actual);
          cnt++;
        }
      }
      Assert.assertEquals(6, cnt);
    }
  }
[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