public List<Section> expandSections(List<Section> sections, int n) {
    if (n <= sections.size()) {
      return sections;
    }
    List<Section> newSections = new ArrayList<>(sections);
    for (int i = sections.size(); i <= n; i++) {
      newSections.add(sections.get(sections.size() - 1));
    }
    return newSections;
  }
reduce the number of sections to n, joining the smallest sections to the smallest adjacent

@param sections
@param n
@return
library-udf/src/main/java/org/apache/iotdb/library/match/PatternExecutor.java