tools/template_based_query_generation/src/main/java/data/Table.java [68:81]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public String getRandomColumn(String columnName, DataType type) {
    List<MutablePair<String, DataType>> columns = new ArrayList<>();
    for (MutablePair<String, DataType> col: this.schema) {
      if (col.getRight() == type) columns.add(col);
    }
    int newColumnProbability = Utils.getRandomInteger(columns.size());
    // add new column of specified datatype with probability 1/(n+1)
    // where n is the number of existing columns of that datatype
    if (newColumnProbability == 0) {
      addColumn(columnName, type);
      return columnName;
    }
    MutablePair<String, DataType> p = Utils.getRandomElement(columns);
    return p.getLeft();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tools/template_based_query_generation/src/main/java/data/Table.java [89:102]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public String getRandomColumn(String columnName, DataType type) {
    List<MutablePair<String, DataType>> columns = new ArrayList<>();
    for (MutablePair<String, DataType> col: this.schema) {
      if (col.getRight() == type) columns.add(col);
    }
    int newColumnProbability = Utils.getRandomInteger(columns.size());
    // add new column of specified datatype with probability 1/(n+1)
    // where n is the number of existing columns of that datatype
    if (newColumnProbability == 0) {
      addColumn(columnName, type);
      return columnName;
    }
    MutablePair<String, DataType> p = Utils.getRandomElement(columns);
    return p.getLeft();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



