use of com.apple.foundationdb.record.query.plan.PlannableIndexTypes in project fdb-record-layer by FoundationDB.
the class FDBSortQueryIndexSelectionTest method hooks.
// used through reflection
@SuppressWarnings("unused")
private static Stream<Arguments> hooks() {
return Stream.of(Arguments.of(NO_HOOK, PlannableIndexTypes.DEFAULT), Arguments.of((RecordMetaDataHook) metadata -> {
String indexName = "MySimpleRecord$num_value_3_indexed";
KeyExpression root = metadata.getIndex(indexName).getRootExpression();
metadata.removeIndex(indexName);
metadata.addIndex("MySimpleRecord", new Index(indexName, root, "FAKE_TYPE"));
metadata.getIndex(indexName).setSubspaceKey(indexName + "_2");
}, new PlannableIndexTypes(Sets.newHashSet(IndexTypes.VALUE, IndexTypes.VERSION, "FAKE_TYPE"), PlannableIndexTypes.DEFAULT.getRankTypes(), PlannableIndexTypes.DEFAULT.getTextTypes())));
}
Aggregations