Skip to content

Commit

Permalink
Ryan's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind committed Jan 16, 2024
1 parent 5573091 commit e6f8f2a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ default void applyShift(final RowSet tableRowSet, final RowSetShiftData shiftDat
}

/**
* Factory for producing WritableRowSets and their components.
* Factory for producing WritableRowRedirections and their components.
*/
interface Factory {
TLongLongMap createUnderlyingMapWithCapacity(int initialCapacity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ protected BarrageRedirectedTable(final UpdateSourceRegistrar registrar,
final WritableColumnSource<?>[] writableSources,
final WritableRowRedirection rowRedirection,
final Map<String, Object> attributes,
final boolean isFlat,
@Nullable final ViewportChangedCallback vpCallback) {
super(registrar, notificationQueue, executorService, columns, writableSources, attributes, vpCallback);
this.rowRedirection = rowRedirection;
if (isFlat) {
setFlat();
}
}

private UpdateCoalescer processUpdate(final BarrageMessage update, final UpdateCoalescer coalescer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,21 +461,17 @@ public static BarrageTable make(
} else {
final WritableRowRedirection rowRedirection;
final boolean isFlat = getAttribute.test(BarrageUtil.TABLE_ATTRIBUTE_IS_FLAT);
if (getAttribute.test(Table.APPEND_ONLY_TABLE_ATTRIBUTE)
|| getAttribute.test(Table.ADD_ONLY_TABLE_ATTRIBUTE)
|| isFlat) {
if (getAttribute.test(Table.APPEND_ONLY_TABLE_ATTRIBUTE) || isFlat) {
rowRedirection = new LongColumnSourceWritableRowRedirection(new LongSparseArraySource());
} else {
rowRedirection = WritableRowRedirectionLockFree.FACTORY.createRowRedirection(1024);
rowRedirection = WritableRowRedirection.FACTORY.createRowRedirection(1024);
}

final LinkedHashMap<String, ColumnSource<?>> finalColumns =
makeColumns(columns, writableSources, rowRedirection);
table = new BarrageRedirectedTable(
registrar, queue, executor, finalColumns, writableSources, rowRedirection, attributes, vpCallback);
if (isFlat) {
table.setFlat();
}
registrar, queue, executor, finalColumns, writableSources, rowRedirection, attributes, isFlat,
vpCallback);
}

return table;
Expand Down

0 comments on commit e6f8f2a

Please sign in to comment.