private void testSessionTimeWindowSSOutOfRange(
      String sessionGap, Long displayBegin, Long displayEnd) {
    String sql;
    if (displayBegin == null) {
      sql =
          String.format(
              "select window_start_end(s3, '%s'='%s', '%s'='%s') from root.vehicle.d1",
              UDFTestConstant.ACCESS_STRATEGY_KEY,
              UDFTestConstant.ACCESS_STRATEGY_SESSION,
              UDFTestConstant.SESSION_GAP_KEY,
              sessionGap);
    } else {
      sql =
          String.format(
              "select window_start_end(s3, '%s'='%s', '%s'='%s', '%s'='%s', '%s'='%s') from root.vehicle.d1",
              UDFTestConstant.ACCESS_STRATEGY_KEY,
              UDFTestConstant.ACCESS_STRATEGY_SESSION,
              UDFTestConstant.DISPLAY_WINDOW_BEGIN_KEY,
              displayBegin,
              UDFTestConstant.DISPLAY_WINDOW_END_KEY,
              displayEnd,
              UDFTestConstant.SESSION_GAP_KEY,
              sessionGap);
    }

    try (Connection conn = EnvFactory.getEnv().getConnection();
        Statement statement = conn.createStatement();
        ResultSet resultSet = statement.executeQuery(sql)) {
      assertEquals(2, resultSet.getMetaData().getColumnCount());
      int count = 0;
      while (resultSet.next()) {
        count++;
      }
      assertEquals(count, 0);
    } catch (SQLException e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
  }
Test for SessionWindow, StateWindow and UserDefinedWindow.
integration-test/src/test/java/org/apache/iotdb/db/it/udf/IoTDBUDFOtherWindowQueryIT.java