public static Row.Builder sortedBuilder() { return new Builder(true); }
@Override public void addCell(Cell cell) { super.addCell(new NativeCell(allocator, writeOp, cell)); } }
public Row build() { if (!isSorted) getCells().sort(); // we can avoid resolving if we're sorted and have no complex values // (because we'll only have unique simple cells, which are already in their final condition) if (!isSorted | hasComplex) getCells().resolve(resolver); Object[] btree = getCells().build(); if (deletion.isShadowedBy(primaryKeyLivenessInfo)) deletion = Deletion.LIVE; int minDeletionTime = minDeletionTime(btree, primaryKeyLivenessInfo, deletion.time()); Row row = BTreeRow.create(clustering, primaryKeyLivenessInfo, deletion, btree, minDeletionTime); reset(); return row; } }
public Row build() { if (!isSorted) getCells().sort(); // we can avoid resolving if we're sorted and have no complex values // (because we'll only have unique simple cells, which are already in their final condition) if (!isSorted | hasComplex) getCells().resolve(resolver); Object[] btree = getCells().build(); if (deletion.isShadowedBy(primaryKeyLivenessInfo)) deletion = Deletion.LIVE; int minDeletionTime = minDeletionTime(btree, primaryKeyLivenessInfo, deletion.time()); Row row = BTreeRow.create(clustering, primaryKeyLivenessInfo, deletion, btree, minDeletionTime); reset(); return row; } }
public Row build() { if (!isSorted) getCells().sort(); // we can avoid resolving if we're sorted and have no complex values // (because we'll only have unique simple cells, which are already in their final condition) if (!isSorted | hasComplex) getCells().resolve(resolver); Object[] btree = getCells().build(); if (deletion.isShadowedBy(primaryKeyLivenessInfo)) deletion = Deletion.LIVE; int minDeletionTime = minDeletionTime(btree, primaryKeyLivenessInfo, deletion.time()); Row row = BTreeRow.create(clustering, primaryKeyLivenessInfo, deletion, btree, minDeletionTime); reset(); return row; } }
public Row build() { if (!isSorted) getCells().sort(); // we can avoid resolving if we're sorted and have no complex values // (because we'll only have unique simple cells, which are already in their final condition) if (!isSorted | hasComplex) getCells().resolve(resolver); Object[] btree = getCells().build(); if (deletion.isShadowedBy(primaryKeyLivenessInfo)) deletion = Deletion.LIVE; int minDeletionTime = minDeletionTime(btree, primaryKeyLivenessInfo, deletion.time()); Row row = BTreeRow.create(clustering, primaryKeyLivenessInfo, deletion, btree, minDeletionTime); reset(); return row; } }
public static Row.Builder sortedBuilder() { return new Builder(true); }
public static Row.Builder unsortedBuilder(int nowInSec) { return new Builder(false, nowInSec); }
public static Row.Builder unsortedBuilder(int nowInSec) { return new Builder(false, nowInSec); }
@Override public void newRow(Clustering clustering) { super.newRow(clustering.copy(allocator)); }
public static Row.Builder unsortedBuilder(int nowInSec) { return new Builder(false, nowInSec); }
public static Row.Builder sortedBuilder() { return new Builder(true); }
public static Row.Builder unsortedBuilder(int nowInSec) { return new Builder(false, nowInSec); }
public static Row.Builder sortedBuilder() { return new Builder(true); }
@Override public void addCell(Cell cell) { super.addCell(cell.copy(allocator)); } }
@Override public void addCell(Cell cell) { super.addCell(cell.copy(allocator)); } }
public void addCell(Cell cell) { assert cell.column().isStatic() == (clustering == Clustering.STATIC_CLUSTERING) : "Column is " + cell.column() + ", clustering = " + clustering; // In practice, only unsorted builder have to deal with shadowed cells, but it doesn't cost us much to deal with it unconditionally in this case if (deletion.deletes(cell)) return; getCells().add(cell); hasComplex |= cell.column.isComplex(); }
@Override public Builder copy() { return new Builder(this); }
@Override public void newRow(Clustering clustering) { if (clustering != Clustering.STATIC_CLUSTERING) clustering = new NativeClustering(allocator, writeOp, clustering); super.newRow(clustering); }
public void addComplexDeletion(ColumnDefinition column, DeletionTime complexDeletion) { getCells().add(new ComplexColumnDeletion(column, complexDeletion)); hasComplex = true; }