private void executeQueryInSI(PatternContext queryCtx) {
    int dsi = 0;
    if (queryCtx.getDatasetSize() == null) {
      queryCtx.setDatasetSize(
          queryCtx.getDataPoints().get(queryCtx.getDataPoints().size() - 1).getX()
              - queryCtx.getDataPoints().get(0).getX());
    }
    List<Double> dataTangents = extractTangents(queryCtx.getDataPoints());
    List<Section> dataSections =
        findCurveSections(
            dataTangents,
            queryCtx.getDataPoints(),
            PatternMatchConfig.DIVIDE_SECTION_MIN_HEIGHT_DATA);
    for (dsi = 0; dsi < dataSections.size(); dsi++) {
      for (int i = 0; i < this.sections.size(); i++) {
        for (int j = 0; j < this.sections.get(i).getNext().size(); j++) {
          this.sections.get(i).getNext().get(j).setTimes(1);
        }
      }
      if (!matchIn(
          this.sections.get(0),
          dataSections,
          dsi,
          new ArrayList<>(),
          queryCtx,
          this.sections.get(this.sections.size() - 1))) {
        break;
      }
    }
  }
Execute the query in a particular smooth iteration
library-udf/src/main/java/org/apache/iotdb/library/match/PatternExecutor.java