private DefaultTableFinder(IndexCursor systemCatalogCursor) {
_systemCatalogCursor = systemCatalogCursor;
- if(_systemCatalogCursor.getIndex().getIndexData().isReadOnly()) {
- throw new IllegalArgumentException("Unusable index");
- }
}
@Override
"JetFormat " + table.getFormat() +
" does not currently support index lookups");
}
+ if(index.getIndexData().isReadOnly()) {
+ throw new IllegalArgumentException(
+ "Given index " + index +
+ " is not usable for indexed lookups because it is read-only");
+ }
IndexCursor cursor = new IndexCursor(table, index,
index.cursor(startRow, startInclusive,
endRow, endInclusive));
return new GenTextColumnDescriptor(col, flags);
}
// unsupported sort order
+ LOG.warn("Unsupported collating sort order " + sortOrder +
+ " for text index, making read-only");
setReadOnly();
return new ReadOnlyColumnDescriptor(col, flags);
case INT:
default:
// FIXME we can't modify this index at this point in time
+ LOG.warn("Unsupported data type " + col.getType() +
+ " for index, making read-only");
setReadOnly();
return new ReadOnlyColumnDescriptor(col, flags);
}