Esempio n. 1
0
  @Override
  public void computeFieldAssociations(Map<Table, Integer> ordinalMap) {
    List<Table> branchTables = new ArrayList<>();
    for (Table table = leafMostTable(); table != null; table = table.getParentTable()) {
      branchTables.add(table);
    }
    Collections.reverse(branchTables);

    Map<Table, Integer> offsetsMap = new HashMap<>();
    int offset = 0;
    columnsPerFlattenedField = new ArrayList<>();
    for (Table table : branchTables) {
      offsetsMap.put(table, offset);
      offset += table.getColumnsIncludingInternal().size();
      columnsPerFlattenedField.addAll(table.getColumnsIncludingInternal());
    }
    computeFieldAssociations(ordinalMap, offsetsMap);
    // Complete computation of inIndex bitsets
    for (ParticipatingTable participatingTable : tablesByDepth.values()) {
      participatingTable.close();
    }
  }
Esempio n. 2
0
 public ParticipatingTable(Table table) {
   this.table = table;
   this.inIndex = new BitSet(table.getColumnsIncludingInternal().size());
 }