From 78acfbdf2f4e27e87332596b9ef1fd1c92fe5d2c Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Mon, 16 Oct 2023 08:57:53 -0600 Subject: [PATCH] fix nightly err; fixup snapshot partial table end-result --- .../deephaven/client/impl/BarrageSubscriptionImpl.java | 10 ++++++++++ .../server/barrage/BarrageBlinkTableTest.java | 1 + 2 files changed, 11 insertions(+) diff --git a/java-client/barrage/src/main/java/io/deephaven/client/impl/BarrageSubscriptionImpl.java b/java-client/barrage/src/main/java/io/deephaven/client/impl/BarrageSubscriptionImpl.java index 115fcf0e84f..a9445263f7f 100644 --- a/java-client/barrage/src/main/java/io/deephaven/client/impl/BarrageSubscriptionImpl.java +++ b/java-client/barrage/src/main/java/io/deephaven/client/impl/BarrageSubscriptionImpl.java @@ -14,6 +14,7 @@ import io.deephaven.engine.context.ExecutionContext; import io.deephaven.engine.liveness.ReferenceCountedLivenessNode; import io.deephaven.engine.rowset.RowSet; +import io.deephaven.engine.rowset.WritableRowSet; import io.deephaven.engine.table.TableDefinition; import io.deephaven.engine.table.impl.util.BarrageMessage; import io.deephaven.engine.updategraph.UpdateGraph; @@ -476,6 +477,15 @@ public boolean viewportChanged( // @formatter:on if (isComplete) { + // remove all unpopulated rows from viewport snapshots + if (isSnapshot && serverViewport != null) { + // noinspection resource + WritableRowSet currentRowSet = resultTable.getRowSet().writableCast(); + try (final RowSet populated = currentRowSet.subSetForPositions(serverViewport, serverReverseViewport)) { + currentRowSet.retain(populated); + } + } + signalCompletion(); } diff --git a/server/src/test/java/io/deephaven/server/barrage/BarrageBlinkTableTest.java b/server/src/test/java/io/deephaven/server/barrage/BarrageBlinkTableTest.java index e78b20df1c7..7c80902a289 100644 --- a/server/src/test/java/io/deephaven/server/barrage/BarrageBlinkTableTest.java +++ b/server/src/test/java/io/deephaven/server/barrage/BarrageBlinkTableTest.java @@ -185,6 +185,7 @@ private class RemoteClient { final BarrageUtil.ConvertedArrowSchema schema = BarrageUtil.convertArrowSchema(flatbufSchema); this.barrageTable = BarrageTable.make(updateSourceCombiner, ExecutionContext.getContext().getUpdateGraph(), null, schema.tableDef, schema.attributes, null); + this.barrageTable.addSourceToRegistrar(); final BarrageSubscriptionOptions options = BarrageSubscriptionOptions.builder() .useDeephavenNulls(useDeephavenNulls)