private static int minDeletionTime(ComplexColumnData cd) { int min = minDeletionTime(cd.complexDeletion()); for (Cell cell : cd) { min = Math.min(min, minDeletionTime(cell)); if (min == Integer.MIN_VALUE) break; } return min; }
private static int minDeletionTime(ComplexColumnData cd) { int min = minDeletionTime(cd.complexDeletion()); for (Cell cell : cd) { min = Math.min(min, minDeletionTime(cell)); if (min == Integer.MIN_VALUE) break; } return min; }
private static int minDeletionTime(ComplexColumnData cd) { int min = minDeletionTime(cd.complexDeletion()); for (Cell cell : cd) { min = Math.min(min, minDeletionTime(cell)); if (min == Integer.MIN_VALUE) break; } return min; }
private static int minDeletionTime(ComplexColumnData cd) { int min = minDeletionTime(cd.complexDeletion()); for (Cell cell : cd) { min = Math.min(min, minDeletionTime(cell)); if (min == Integer.MIN_VALUE) break; } return min; }
public static BTreeRow create(Clustering clustering, LivenessInfo primaryKeyLivenessInfo, Deletion deletion, Object[] btree) { int minDeletionTime = Math.min(minDeletionTime(primaryKeyLivenessInfo), minDeletionTime(deletion.time())); if (minDeletionTime != Integer.MIN_VALUE) { for (ColumnData cd : BTree.<ColumnData>iterable(btree)) minDeletionTime = Math.min(minDeletionTime, minDeletionTime(cd)); } return create(clustering, primaryKeyLivenessInfo, deletion, btree, minDeletionTime); }
public static BTreeRow create(Clustering clustering, LivenessInfo primaryKeyLivenessInfo, Deletion deletion, Object[] btree) { int minDeletionTime = Math.min(minDeletionTime(primaryKeyLivenessInfo), minDeletionTime(deletion.time())); if (minDeletionTime != Integer.MIN_VALUE) { for (ColumnData cd : BTree.<ColumnData>iterable(btree)) minDeletionTime = Math.min(minDeletionTime, minDeletionTime(cd)); } return create(clustering, primaryKeyLivenessInfo, deletion, btree, minDeletionTime); }
private static int minDeletionTime(ColumnData cd) { return cd.column().isSimple() ? minDeletionTime((Cell) cd) : minDeletionTime((ComplexColumnData)cd); }
private static int minDeletionTime(Object[] btree, LivenessInfo info, DeletionTime rowDeletion) { //we have to wrap this for the lambda final WrappedInt min = new WrappedInt(Math.min(minDeletionTime(info), minDeletionTime(rowDeletion))); BTree.<ColumnData>apply(btree, cd -> min.set( Math.min(min.get(), minDeletionTime(cd)) ), cd -> min.get() == Integer.MIN_VALUE, false); return min.get(); }
private static int minDeletionTime(Object[] btree, LivenessInfo info, DeletionTime rowDeletion) { //we have to wrap this for the lambda final WrappedInt min = new WrappedInt(Math.min(minDeletionTime(info), minDeletionTime(rowDeletion))); BTree.<ColumnData>apply(btree, cd -> min.set( Math.min(min.get(), minDeletionTime(cd)) ), cd -> min.get() == Integer.MIN_VALUE, false); return min.get(); }
private static int minDeletionTime(Object[] btree, LivenessInfo info, DeletionTime rowDeletion) { //we have to wrap this for the lambda final WrappedInt min = new WrappedInt(Math.min(minDeletionTime(info), minDeletionTime(rowDeletion))); BTree.<ColumnData>apply(btree, cd -> min.set( Math.min(min.get(), minDeletionTime(cd)) ), cd -> min.get() == Integer.MIN_VALUE, false); return min.get(); }
public static BTreeRow noCellLiveRow(Clustering clustering, LivenessInfo primaryKeyLivenessInfo) { assert !primaryKeyLivenessInfo.isEmpty(); return new BTreeRow(clustering, primaryKeyLivenessInfo, Deletion.LIVE, BTree.empty(), minDeletionTime(primaryKeyLivenessInfo)); }
public static BTreeRow noCellLiveRow(Clustering clustering, LivenessInfo primaryKeyLivenessInfo) { assert !primaryKeyLivenessInfo.isEmpty(); return new BTreeRow(clustering, primaryKeyLivenessInfo, Deletion.LIVE, BTree.empty(), minDeletionTime(primaryKeyLivenessInfo)); }
public static BTreeRow noCellLiveRow(Clustering clustering, LivenessInfo primaryKeyLivenessInfo) { assert !primaryKeyLivenessInfo.isEmpty(); return new BTreeRow(clustering, primaryKeyLivenessInfo, Deletion.LIVE, BTree.empty(), minDeletionTime(primaryKeyLivenessInfo)); }
public static BTreeRow singleCellRow(Clustering clustering, Cell cell) { if (cell.column().isSimple()) return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); ComplexColumnData complexData = new ComplexColumnData(cell.column(), new Cell[]{ cell }, DeletionTime.LIVE); return new BTreeRow(clustering, BTree.singleton(complexData), minDeletionTime(cell)); }
public static BTreeRow singleCellRow(Clustering clustering, Cell cell) { if (cell.column().isSimple()) return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); ComplexColumnData complexData = new ComplexColumnData(cell.column(), new Cell[]{ cell }, DeletionTime.LIVE); return new BTreeRow(clustering, BTree.singleton(complexData), minDeletionTime(cell)); }
public static BTreeRow singleCellRow(Clustering clustering, Cell cell) { if (cell.column().isSimple()) return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); ComplexColumnData complexData = new ComplexColumnData(cell.column(), new Cell[]{ cell }, DeletionTime.LIVE); return new BTreeRow(clustering, BTree.singleton(complexData), minDeletionTime(cell)); }
private Row transformAndFilter(LivenessInfo info, Deletion deletion, Function<ColumnData, ColumnData> function) { Object[] transformed = BTree.transformAndFilter(btree, function); if (btree == transformed && info == this.primaryKeyLivenessInfo && deletion == this.deletion) return this; if (info.isEmpty() && deletion.isLive() && BTree.isEmpty(transformed)) return null; int minDeletionTime = minDeletionTime(transformed, info, deletion.time()); return BTreeRow.create(clustering, info, deletion, transformed, minDeletionTime); }
private Row transformAndFilter(LivenessInfo info, Deletion deletion, Function<ColumnData, ColumnData> function) { Object[] transformed = BTree.transformAndFilter(btree, function); if (btree == transformed && info == this.primaryKeyLivenessInfo && deletion == this.deletion) return this; if (info.isEmpty() && deletion.isLive() && BTree.isEmpty(transformed)) return null; int minDeletionTime = minDeletionTime(transformed, info, deletion.time()); return BTreeRow.create(clustering, info, deletion, transformed, minDeletionTime); }
private Row transformAndFilter(LivenessInfo info, Deletion deletion, Function<ColumnData, ColumnData> function) { Object[] transformed = BTree.transformAndFilter(btree, function); if (btree == transformed && info == this.primaryKeyLivenessInfo && deletion == this.deletion) return this; if (info.isEmpty() && deletion.isLive() && BTree.isEmpty(transformed)) return null; int minDeletionTime = minDeletionTime(transformed, info, deletion.time()); return BTreeRow.create(clustering, info, deletion, transformed, minDeletionTime); }
private Row transformAndFilter(LivenessInfo info, Deletion deletion, Function<ColumnData, ColumnData> function) { Object[] transformed = BTree.transformAndFilter(btree, function); if (btree == transformed && info == this.primaryKeyLivenessInfo && deletion == this.deletion) return this; if (info.isEmpty() && deletion.isLive() && BTree.isEmpty(transformed)) return null; int minDeletionTime = minDeletionTime(transformed, info, deletion.time()); return BTreeRow.create(clustering, info, deletion, transformed, minDeletionTime); }