@Test public void columnPrefixFiltersAreAdapted() throws IOException { ColumnPrefixFilter filter = new ColumnPrefixFilter(Bytes.toBytes("prefix")); Filters.Filter expected = adapter.adapt(emptyScanContext, filter); Assert.assertEquals( "prefix\\C*", Bytes.toString(expected.toProto().getColumnQualifierRegexFilter().toByteArray())); }
@Override public Filter adapt(FilterAdapterContext context, ColumnPrefixFilter filter) throws IOException { byte[] prefix = filter.getPrefix(); ByteString.Output outputStream = ByteString.newOutput(prefix.length * 2); ReaderExpressionHelper.writeQuotedExpression(outputStream, prefix); outputStream.write(ReaderExpressionHelper.ALL_QUALIFIERS_BYTES); return FILTERS.qualifier().regex(outputStream.toByteString()); }
ColumnPrefixFilterAdapter extends TypedFilterAdapterBase<ColumnPrefixFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnPrefixFilter filter) throws IOException { byte[] prefix = filter.getPrefix(); ByteString.Output outputStream = ByteString.newOutput(prefix.length * 2); ReaderExpressionHelper.writeQuotedExpression(outputStream, prefix); outputStream.write(ReaderExpressionHelper.ALL_QUALIFIERS_BYTES); return FILTERS.qualifier().regex(outputStream.toByteString()); } }
ColumnPrefixFilterAdapter extends TypedFilterAdapterBase<ColumnPrefixFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnPrefixFilter filter) throws IOException { byte[] prefix = filter.getPrefix(); ByteString.Output outputStream = ByteString.newOutput(prefix.length * 2); ReaderExpressionHelper.writeQuotedExpression(outputStream, prefix); outputStream.write(ReaderExpressionHelper.ALL_QUALIFIERS_BYTES); return FILTERS.qualifier().regex(outputStream.toByteString()); }  }
ColumnPrefixFilterAdapter extends TypedFilterAdapterBase<ColumnPrefixFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnPrefixFilter filter) throws IOException { byte[] prefix = filter.getPrefix(); ByteString.Output outputStream = ByteString.newOutput(prefix.length * 2); ReaderExpressionHelper.writeQuotedExpression(outputStream, prefix); outputStream.write(ReaderExpressionHelper.ALL_QUALIFIERS_BYTES); return FILTERS.qualifier().regex(outputStream.toByteString()); }  @Override Filter adapt(FilterAdapterContext context, ColumnPrefixFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, ColumnPrefixFilter filter); }
ColumnPrefixFilterAdapter extends TypedFilterAdapterBase<ColumnPrefixFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnPrefixFilter filter) throws IOException { byte[] prefix = filter.getPrefix(); ByteString.Output outputStream = ByteString.newOutput(prefix.length * 2); ReaderExpressionHelper.writeQuotedExpression(outputStream, prefix); outputStream.write(ReaderExpressionHelper.ALL_QUALIFIERS_BYTES); return FILTERS.qualifier().regex(outputStream.toByteString()); }  @Override Filter adapt(FilterAdapterContext context, ColumnPrefixFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, ColumnPrefixFilter filter);  }