@Test public void testColumnRangeFilterWithASingleFamily_openEnd() throws IOException { ColumnRangeFilter filter = new ColumnRangeFilter(Bytes.toBytes("a"), true, null, false); Scan familyScan = new Scan().addFamily(Bytes.toBytes("foo")); Filters.Filter expectedFilter = filterAdapter.adapt(new FilterAdapterContext(familyScan, null), filter); ColumnRange columnRange = expectedFilter.toProto().getColumnRangeFilter(); Assert.assertEquals("a", toString(columnRange.getStartQualifierClosed())); Assert.assertEquals(0, columnRange.getStartQualifierOpen().size()); Assert.assertEquals(0, columnRange.getEndQualifierOpen().size()); Assert.assertEquals(0, columnRange.getEndQualifierClosed().size()); }
@Override public Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter) throws IOException { byte[] familyName = getSingleFamily(context.getScan()); QualifierRangeFilter rangeBuilder = FILTERS.qualifier().rangeWithinFamily(Bytes.toString(familyName)); if (filter.getMinColumn() != null) { ByteString startQualifier = ByteString.copyFrom(filter.getMinColumn()); if (filter.getMinColumnInclusive()) { rangeBuilder.startClosed(startQualifier); } else { rangeBuilder.startOpen(startQualifier); } } if (filter.getMaxColumn() != null) { ByteString endQualifier = ByteString.copyFrom(filter.getMaxColumn()); if (filter.getMaxColumnInclusive()) { rangeBuilder.endClosed(endQualifier); } else { rangeBuilder.endOpen(endQualifier); } } return rangeBuilder; }
ColumnRangeFilterAdapter extends TypedFilterAdapterBase<ColumnRangeFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter) throws IOException { byte[] familyName = getSingleFamily(context.getScan()); QualifierRangeFilter rangeBuilder = FILTERS.qualifier().rangeWithinFamily(Bytes.toString(familyName)); if (filter.getMinColumn() != null) { ByteString startQualifier = ByteString.copyFrom(filter.getMinColumn()); if (filter.getMinColumnInclusive()) { rangeBuilder.startClosed(startQualifier); } else { rangeBuilder.startOpen(startQualifier); } } if (filter.getMaxColumn() != null) { ByteString endQualifier = ByteString.copyFrom(filter.getMaxColumn()); if (filter.getMaxColumnInclusive()) { rangeBuilder.endClosed(endQualifier); } else { rangeBuilder.endOpen(endQualifier); } } return rangeBuilder; } }
ColumnRangeFilterAdapter extends TypedFilterAdapterBase<ColumnRangeFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter) throws IOException { byte[] familyName = getSingleFamily(context.getScan()); QualifierRangeFilter rangeBuilder = FILTERS.qualifier().rangeWithinFamily(Bytes.toString(familyName)); if (filter.getMinColumn() != null) { ByteString startQualifier = ByteString.copyFrom(filter.getMinColumn()); if (filter.getMinColumnInclusive()) { rangeBuilder.startClosed(startQualifier); } else { rangeBuilder.startOpen(startQualifier); } } if (filter.getMaxColumn() != null) { ByteString endQualifier = ByteString.copyFrom(filter.getMaxColumn()); if (filter.getMaxColumnInclusive()) { rangeBuilder.endClosed(endQualifier); } else { rangeBuilder.endOpen(endQualifier); } } return rangeBuilder; }  }
ColumnRangeFilterAdapter extends TypedFilterAdapterBase<ColumnRangeFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter) throws IOException { byte[] familyName = getSingleFamily(context.getScan()); QualifierRangeFilter rangeBuilder = FILTERS.qualifier().rangeWithinFamily(Bytes.toString(familyName)); if (filter.getMinColumn() != null) { ByteString startQualifier = ByteString.copyFrom(filter.getMinColumn()); if (filter.getMinColumnInclusive()) { rangeBuilder.startClosed(startQualifier); } else { rangeBuilder.startOpen(startQualifier); } } if (filter.getMaxColumn() != null) { ByteString endQualifier = ByteString.copyFrom(filter.getMaxColumn()); if (filter.getMaxColumnInclusive()) { rangeBuilder.endClosed(endQualifier); } else { rangeBuilder.endOpen(endQualifier); } } return rangeBuilder; }  @Override Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, ColumnRangeFilter filter); }
ColumnRangeFilterAdapter extends TypedFilterAdapterBase<ColumnRangeFilter> { @Override public Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter) throws IOException { byte[] familyName = getSingleFamily(context.getScan()); QualifierRangeFilter rangeBuilder = FILTERS.qualifier().rangeWithinFamily(Bytes.toString(familyName)); if (filter.getMinColumn() != null) { ByteString startQualifier = ByteString.copyFrom(filter.getMinColumn()); if (filter.getMinColumnInclusive()) { rangeBuilder.startClosed(startQualifier); } else { rangeBuilder.startOpen(startQualifier); } } if (filter.getMaxColumn() != null) { ByteString endQualifier = ByteString.copyFrom(filter.getMaxColumn()); if (filter.getMaxColumnInclusive()) { rangeBuilder.endClosed(endQualifier); } else { rangeBuilder.endOpen(endQualifier); } } return rangeBuilder; }  @Override Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, ColumnRangeFilter filter);  }