/** * Creates a new {@code Tester} to efficiently test the inclusion of cells of complex column * {@code column}. * * @return the created tester or {@code null} if all the cells from the provided column * are queried. */ public Tester newTester(ColumnDefinition column) { if (subSelections == null || !column.isComplex()) return null; SortedSet<ColumnSubselection> s = subSelections.get(column.name); if (s.isEmpty()) return null; return new Tester(isFetchAll, s.iterator()); }
/** * Creates a new {@code Tester} to efficiently test the inclusion of cells of complex column * {@code column}. * * @return the created tester or {@code null} if all the cells from the provided column * are queried. */ public Tester newTester(ColumnDefinition column) { if (subSelections == null || !column.isComplex()) return null; SortedSet<ColumnSubselection> s = subSelections.get(column.name); if (s.isEmpty()) return null; return new Tester(isFetchAll, s.iterator()); }
public ComplexColumnData filter(ColumnFilter filter, DeletionTime activeDeletion, CFMetaData.DroppedColumn dropped, LivenessInfo rowLiveness) { ColumnFilter.Tester cellTester = filter.newTester(column); if (cellTester == null && activeDeletion.isLive() && dropped == null) return this; DeletionTime newDeletion = activeDeletion.supersedes(complexDeletion) ? DeletionTime.LIVE : complexDeletion; return transformAndFilter(newDeletion, (cell) -> { boolean isForDropped = dropped != null && cell.timestamp() <= dropped.droppedTime; boolean isShadowed = activeDeletion.deletes(cell); boolean isSkippable = cellTester != null && (!cellTester.fetches(cell.path()) || (!cellTester.fetchedCellIsQueried(cell.path()) && cell.timestamp() < rowLiveness.timestamp())); return isForDropped || isShadowed || isSkippable ? null : cell; }); }
/** * Creates a new {@code Tester} to efficiently test the inclusion of cells of complex column * {@code column}. * * @return the created tester or {@code null} if all the cells from the provided column * are queried. */ public Tester newTester(ColumnDefinition column) { if (subSelections == null || !column.isComplex()) return null; SortedSet<ColumnSubselection> s = subSelections.get(column.name); if (s.isEmpty()) return null; return new Tester(isFetchAll, s.iterator()); }
/** * Creates a new {@code Tester} to efficiently test the inclusion of cells of complex column * {@code column}. * * @return the created tester or {@code null} if all the cells from the provided column * are queried. */ public Tester newTester(ColumnDefinition column) { if (subSelections == null || !column.isComplex()) return null; SortedSet<ColumnSubselection> s = subSelections.get(column.name); if (s.isEmpty()) return null; return new Tester(isFetchAll, s.iterator()); }
public ComplexColumnData filter(ColumnFilter filter, DeletionTime activeDeletion, CFMetaData.DroppedColumn dropped, LivenessInfo rowLiveness) { ColumnFilter.Tester cellTester = filter.newTester(column); if (cellTester == null && activeDeletion.isLive() && dropped == null) return this; DeletionTime newDeletion = activeDeletion.supersedes(complexDeletion) ? DeletionTime.LIVE : complexDeletion; return transformAndFilter(newDeletion, (cell) -> { boolean isForDropped = dropped != null && cell.timestamp() <= dropped.droppedTime; boolean isShadowed = activeDeletion.deletes(cell); boolean isSkippable = cellTester != null && (!cellTester.fetches(cell.path()) || (!cellTester.fetchedCellIsQueried(cell.path()) && cell.timestamp() < rowLiveness.timestamp())); return isForDropped || isShadowed || isSkippable ? null : cell; }); }
public ComplexColumnData filter(ColumnFilter filter, DeletionTime activeDeletion, CFMetaData.DroppedColumn dropped, LivenessInfo rowLiveness) { ColumnFilter.Tester cellTester = filter.newTester(column); if (cellTester == null && activeDeletion.isLive() && dropped == null) return this; DeletionTime newDeletion = activeDeletion.supersedes(complexDeletion) ? DeletionTime.LIVE : complexDeletion; return transformAndFilter(newDeletion, (cell) -> { boolean isForDropped = dropped != null && cell.timestamp() <= dropped.droppedTime; boolean isShadowed = activeDeletion.deletes(cell); boolean isSkippable = cellTester != null && (!cellTester.fetches(cell.path()) || (!cellTester.fetchedCellIsQueried(cell.path()) && cell.timestamp() < rowLiveness.timestamp())); return isForDropped || isShadowed || isSkippable ? null : cell; }); }
public ComplexColumnData filter(ColumnFilter filter, DeletionTime activeDeletion, CFMetaData.DroppedColumn dropped, LivenessInfo rowLiveness) { ColumnFilter.Tester cellTester = filter.newTester(column); if (cellTester == null && activeDeletion.isLive() && dropped == null) return this; DeletionTime newDeletion = activeDeletion.supersedes(complexDeletion) ? DeletionTime.LIVE : complexDeletion; return transformAndFilter(newDeletion, (cell) -> { boolean isForDropped = dropped != null && cell.timestamp() <= dropped.droppedTime; boolean isShadowed = activeDeletion.deletes(cell); boolean isSkippable = cellTester != null && (!cellTester.fetches(cell.path()) || (!cellTester.fetchedCellIsQueried(cell.path()) && cell.timestamp() < rowLiveness.timestamp())); return isForDropped || isShadowed || isSkippable ? null : cell; }); }
public boolean includes(CellPath path) { return path == null || tester == null || tester.fetches(path); }
public boolean canSkipValue(CellPath path) { return path != null && tester != null && !tester.fetchedCellIsQueried(path); }
public boolean canSkipValue(CellPath path) { return path != null && tester != null && !tester.fetchedCellIsQueried(path); }
public boolean includes(CellPath path) { return path == null || tester == null || tester.fetches(path); }
public boolean fetches(CellPath path) { return isFetchAll || hasSubselection(path); }
public boolean fetches(CellPath path) { return isFetchAll || hasSubselection(path); }
public boolean includes(CellPath path) { return path == null || tester == null || tester.fetches(path); }
public boolean fetches(CellPath path) { return isFetchAll || hasSubselection(path); }
public boolean fetches(CellPath path) { return isFetchAll || hasSubselection(path); }
public boolean includes(CellPath path) { return path == null || tester == null || tester.fetches(path); }
public boolean canSkipValue(CellPath path) { return path != null && tester != null && !tester.fetchedCellIsQueried(path); }
public boolean canSkipValue(CellPath path) { return path != null && tester != null && !tester.fetchedCellIsQueried(path); }