@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding persistenceEncoding) { return Objects.deepEquals( partitionKey, persistenceEncoding.getInsertionPartitionKey() != null ? persistenceEncoding.getInsertionPartitionKey() : new byte[] {}) && Objects.deepEquals( sortKey, persistenceEncoding.getInsertionSortKey() != null ? persistenceEncoding.getInsertionSortKey() : new byte[] {}) && Objects.deepEquals( dataId, persistenceEncoding.getDataId() != null ? persistenceEncoding.getDataId() : new byte[] {}); }
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding<?> persistenceEncoding) { if (!persistenceEncoding.isDeduplicationEnabled()) { // certain types of data such as raster do not intend to be // duplicated // short circuit this check if the row is does not support // deduplication return true; } if (!isDedupAcrossIndices() && !persistenceEncoding.isDuplicated()) { // short circuit this check if the row is not duplicated anywhere // and this is only intended to support a single index return true; } return applyDedupeFilter( persistenceEncoding.getInternalAdapterId(), new ByteArray(persistenceEncoding.getDataId())); }
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding<?> persistenceEncoding) { if ((persistenceEncoding == null) || ((persistenceEncoding.getInsertionPartitionKey() == null) && (persistenceEncoding.getInsertionSortKey() == null))) { return false; } return inBounds( persistenceEncoding.getInsertionPartitionKey(), persistenceEncoding.getInsertionSortKey()); }
((AbstractAdapterPersistenceEncoding) persistenceEncoding).getAdapterExtendedData(); if (persistenceEncoding.isAsync()) { return false; persistenceEncoding.getInternalAdapterId(), persistenceEncoding.getDataId(), persistenceEncoding.getInsertionPartitionKey(), persistenceEncoding.getInsertionSortKey(), persistenceEncoding.getDuplicateCount(), persistenceEncoding.getCommonData(), new PersistentDataset<byte[]>(), adapterExtendedValues);
final Object geomObj = persistenceEncoding.getCommonData().getValue(fieldName); if (persistenceEncoding.isAsync()) { return false;
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding<?> persistenceEncoding) { final ByteArray stringBytes = (ByteArray) persistenceEncoding.getCommonData().getValue(fieldName); if (stringBytes != null) { final String value = stringBytes.getString(); return caseSensitive ? matchValue.equals(value) : matchValue.equalsIgnoreCase(value); } return false; }
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding persistenceEncoding) { return (adapterId == null) || adapterId.equals((Short) persistenceEncoding.getInternalAdapterId()); }
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding persistenceEncoding) { return dataIds.contains(new ByteArray(persistenceEncoding.getDataId())); }
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding<?> persistenceEncoding) { if (!(persistenceEncoding instanceof CommonIndexedPersistenceEncoding)) { return false; } final List<BinnedNumericDataset> dataRanges = BinnedNumericDataset.applyBins( ((CommonIndexedPersistenceEncoding) persistenceEncoding).getNumericData( dimensionFields), dimensionFields); if (persistenceEncoding.isAsync()) { return false; } // check that at least one data range overlaps at least one query range for (final BinnedNumericDataset dataRange : dataRanges) { final List<MultiDimensionalNumericData> queries = binnedConstraints.get(new ByteArray(dataRange.getBinId())); if (queries != null) { for (final MultiDimensionalNumericData query : queries) { if ((query != null) && validateConstraints(compareOp, query, dataRange)) { return true; } } } } return false; }
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding persistenceEncoding) { final byte[] otherPartitionKey = persistenceEncoding.getInsertionPartitionKey(); final byte[] otherPartitionKeyBytes = (otherPartitionKey != null) ? otherPartitionKey : new byte[0]; final byte[] sortKey = persistenceEncoding.getInsertionSortKey(); return (Arrays.equals(sortKeyPrefix, Arrays.copyOf(sortKey, sortKeyPrefix.length)) && Arrays.equals(partitionKey, otherPartitionKeyBytes)); }
@Override public boolean accept( final CommonIndexModel indexModel, final IndexedPersistenceEncoding<?> persistenceEncoding) { final ByteArray value = (ByteArray) persistenceEncoding.getCommonData().getValue(fieldName); if (value != null) { final double val = Lexicoders.DOUBLE.fromByteArray(value.getBytes()); if (inclusiveLow && inclusiveHigh) { return (val >= lowerValue.doubleValue()) && (val <= upperValue.doubleValue()); } else if (inclusiveLow) { return (val >= lowerValue.doubleValue()) && (val < upperValue.doubleValue()); } else if (inclusiveHigh) { return (val > lowerValue.doubleValue()) && (val <= upperValue.doubleValue()); } else { return (val > lowerValue.doubleValue()) && (val < upperValue.doubleValue()); } } return false; }
final IndexedPersistenceEncoding<?> persistenceEncoding) { final ByteArray dateLongBytes = (ByteArray) persistenceEncoding.getCommonData().getValue(fieldName); if (dateLongBytes != null) { final long dateLong = Lexicoders.LONG.fromByteArray(dateLongBytes.getBytes());