From b4ebd678e508659fb5a52d8e1588c79d880674ac Mon Sep 17 00:00:00 2001 From: Ryan Caudy Date: Tue, 15 Oct 2024 20:02:42 -0400 Subject: [PATCH] fix: Fix chunk filling loop bug that broke rollup snapshots with viewports bigger than 512 rows (#6205) --- .../table/impl/hierarchical/HierarchicalTableImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/HierarchicalTableImpl.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/HierarchicalTableImpl.java index fbe80beeb7f..052168e40ab 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/HierarchicalTableImpl.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/HierarchicalTableImpl.java @@ -1473,10 +1473,12 @@ private void fillNormalDestinations(@NotNull final RowSequence rows) { try (final RowSequence.Iterator rowsIter = rows.size() >= chunkSize ? rows.getRowSequenceIterator() : null) { - final RowSequence chunkRows = - rowsIter == null ? rows : rowsIter.getNextRowSequenceWithLength(chunkSize); - final int chunkRowsSize = chunkRows.intSize(); do { + final RowSequence chunkRows = rowsIter == null + ? rows + : rowsIter.getNextRowSequenceWithLength(chunkSize); + final int chunkRowsSize = chunkRows.intSize(); + Assert.leq(chunkRowsSize, "chunkRowsSize", capacity, "capacity"); for (int di = 0, ci = columns.nextSetBit(0); ci >= 0; ++di, ci = columns.nextSetBit(ci + 1)) { if (ci == ROW_EXPANDED_COLUMN_INDEX) { continue;