@Test public void testGetQueryRanges() { final byte[][] simpleIndexRanges = simpleIndexStrategy.getQueryPartitionKeys(sfcIndexedRange); final List<ByteArrayRange> sfcIndexRanges = sfcIndexStrategy.getQueryRanges(sfcIndexedRange, 8).getCompositeQueryRanges(); final List<ByteArrayRange> ranges = new ArrayList<>(simpleIndexRanges.length * sfcIndexRanges.size()); for (final byte[] r1 : simpleIndexRanges) { for (final ByteArrayRange r2 : sfcIndexRanges) { final byte[] start = ByteArrayUtils.combineArrays(r1, r2.getStart()); final byte[] end = ByteArrayUtils.combineArrays(r1, r2.getEnd()); ranges.add(new ByteArrayRange(start, end)); } } final Set<ByteArrayRange> testRanges = new HashSet<>(ranges); final Set<ByteArrayRange> compoundIndexRanges = new HashSet<>( compoundIndexStrategy.getQueryRanges( compoundIndexedRange, 8).getCompositeQueryRanges()); Assert.assertTrue(testRanges.containsAll(compoundIndexRanges)); Assert.assertTrue(compoundIndexRanges.containsAll(testRanges)); }
@Override public QueryRanges getQueryRanges( final MultiDimensionalNumericData indexedRange, final IndexMetaData... hints) { return getQueryRanges(indexedRange, -1, hints); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public QueryRanges getQueryRanges( final MultiDimensionalNumericData indexedRange, final IndexMetaData... hints) { return getQueryRanges(indexedRange, -1, hints); } }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public QueryRanges getQueryRanges( final MultiDimensionalNumericData indexedRange, final IndexMetaData... hints) { return getQueryRanges(indexedRange, -1, hints); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public QueryRanges getQueryRanges( final MultiDimensionalNumericData indexedRange, final IndexMetaData... hints) { return getQueryRanges(indexedRange, -1, hints); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); PartitionIndexStrategy<MultiDimensionalNumericData, MultiDimensionalNumericData> getPrimarySubStrategy(); NumericIndexStrategy getSecondarySubStrategy(); @Override byte[] toBinary(); @Override void fromBinary(final byte[] bytes); int getNumberOfDimensions(); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final IndexMetaData... hints); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final int maxEstimatedRangeDecomposition,
      final IndexMetaData... hints); @Override InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData); @Override InsertionIds getInsertionIds(
      final MultiDimensionalNumericData indexedData,
      final int maxEstimatedDuplicateIds); @Override MultiDimensionalNumericData getRangeForId(
      final byte[] partitionKey,
      final byte[] sortKey); @Override MultiDimensionalCoordinates getCoordinatesPerDimension(
      final byte[] partitionKey,
      final byte[] sortKey); @Override NumericDimensionDefinition[] getOrderedDimensionDefinitions(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String getId(); @Override double[] getHighestPrecisionIdRangePerDimension(); @Override int getPartitionKeyLength(); @Override List<IndexMetaData> createMetaData(); @Override MultiDimensionalCoordinateRanges[] getCoordinateRangesPerDimension(
      final MultiDimensionalNumericData dataRange,
      final IndexMetaData... hints); @Override byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData); @Override byte[][] getQueryPartitionKeys(
      final MultiDimensionalNumericData queryData,
      final IndexMetaData... hints); @Override byte[][] getPredefinedSplits(); }
CompoundIndexStrategy implements NumericIndexStrategy { @Override public QueryRanges getQueryRanges( final MultiDimensionalNumericData indexedRange, final IndexMetaData... hints) { return getQueryRanges(indexedRange, -1, hints); } CompoundIndexStrategy(
      final PartitionIndexStrategy<? extends MultiDimensionalNumericData, ? extends MultiDimensionalNumericData> subStrategy1,
      final NumericIndexStrategy subStrategy2); protected  CompoundIndexStrategy(); PartitionIndexStrategy<MultiDimensionalNumericData, MultiDimensionalNumericData> getPrimarySubStrategy(); NumericIndexStrategy getSecondarySubStrategy(); @Override byte[] toBinary(); @Override void fromBinary(final byte[] bytes); int getNumberOfDimensions(); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final IndexMetaData... hints); @Override QueryRanges getQueryRanges(
      final MultiDimensionalNumericData indexedRange,
      final int maxEstimatedRangeDecomposition,
      final IndexMetaData... hints); @Override InsertionIds getInsertionIds(final MultiDimensionalNumericData indexedData); @Override InsertionIds getInsertionIds(
      final MultiDimensionalNumericData indexedData,
      final int maxEstimatedDuplicateIds); @Override MultiDimensionalNumericData getRangeForId(
      final byte[] partitionKey,
      final byte[] sortKey); @Override MultiDimensionalCoordinates getCoordinatesPerDimension(
      final byte[] partitionKey,
      final byte[] sortKey); @Override NumericDimensionDefinition[] getOrderedDimensionDefinitions(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String getId(); @Override double[] getHighestPrecisionIdRangePerDimension(); @Override int getPartitionKeyLength(); @Override List<IndexMetaData> createMetaData(); @Override MultiDimensionalCoordinateRanges[] getCoordinateRangesPerDimension(
      final MultiDimensionalNumericData dataRange,
      final IndexMetaData... hints); @Override byte[][] getInsertionPartitionKeys(final MultiDimensionalNumericData insertionData); @Override byte[][] getQueryPartitionKeys(
      final MultiDimensionalNumericData queryData,
      final IndexMetaData... hints); @Override byte[][] getPredefinedSplits();  }