@Test public void testNoIndexExpression() throws Exception { IndexExpression exp = new NoIndexExpression(); Scan scan = new Scan(); scan.setAttribute(Constants.INDEX_EXPRESSION, IndexUtils.toBytes(exp)); byte[] value1 = Bytes.toBytes("asdf"); scan.setFilter(new SingleColumnValueFilter(FAMILY1, QUALIFIER1, CompareOp.EQUAL, value1)); List<IndexSpecification> indices = new ArrayList<IndexSpecification>(); IndexSpecification is1 = new IndexSpecification("idx1"); HColumnDescriptor colDesc = new HColumnDescriptor(FAMILY1); is1.addIndexColumn(colDesc, COL1, ValueType.String, 15); indices.add(is1); ScanFilterEvaluator evaluator = new ScanFilterEvaluator(); HRegion region = initHRegion(tableName.getBytes(), null, null, "testNoIndexExpression", TEST_UTIL.getConfiguration(), FAMILY1); IndexRegionScanner scanner = evaluator.evaluate(scan, indices, new byte[0], region, tableName); assertNull(scanner); }