void materializeSubQueries(Session session) {

    HashSet subqueryPopFlags = new HashSet();

    for (int i = 0; i < subqueries.length; i++) {
      SubQuery sq = subqueries[i];

      // VIEW working tables may be reused in a single query but they are filled only once
      if (!subqueryPopFlags.add(sq)) {
        continue;
      }

      if (!sq.isCorrelated()) {
        sq.materialise(session);
      }
    }
  }
Ejemplo n.º 2
0
  public void materialiseCorrelated(Session session) {

    if (isCorrelated) {
      materialise(session);
    }
  }