class DefaultIndexer extends Indexer {

  @Override
  public IndexScanner getScanner(byte[] tableName, ThemisScan scan, Transaction transaction)
      throws IOException {
    if (!(scan instanceof IndexRead)) {
      return null;
    }
    IndexRead indexRead = (IndexRead)scan;
    if (!Bytes.equals(tableName, indexRead.getIndexColumn().getTableName())) {
      throw new IOException("tableName not match, tableName=" + Bytes.toString(tableName)
          + ", indexColumn=" + indexRead.getIndexColumn());
    }
    String indexTableName = columnIndexes.get(indexRead.getIndexColumn());
    if (indexTableName == null) {
      throw new IOException("not find index definition for indexColumn=" + indexRead.getIndexColumn());
    }
    return new IndexScanner(indexTableName, indexRead, transaction);
  }

  public  DefaultIndexer(Configuration conf);

}