From ae460a213e7020d31861ff404ffc608adc1343e4 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Thu, 19 Sep 2024 13:34:07 -0500 Subject: [PATCH] fix: JS should modify data in redirected space, not key space Fixes #6084 --- .../api/barrage/data/WebBarrageSubscription.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/data/WebBarrageSubscription.java b/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/data/WebBarrageSubscription.java index a46d8ec7f90..b12f14ac2cb 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/data/WebBarrageSubscription.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/barrage/data/WebBarrageSubscription.java @@ -366,7 +366,19 @@ public void applyUpdates(WebBarrageMessage message) { modifiedColumnSet.set(ii); - PrimitiveIterator.OfLong destIterator = column.rowsModified.indexIterator(); + PrimitiveIterator.OfLong destIterator = new PrimitiveIterator.OfLong() { + private final PrimitiveIterator.OfLong wrapped = column.rowsModified.indexIterator(); + + @Override + public long nextLong() { + return redirectedIndexes.get(wrapped.next()); + } + + @Override + public boolean hasNext() { + return wrapped.hasNext(); + } + }; for (int j = 0; j < column.data.size(); j++) { Chunk chunk = column.data.get(j); destSources[ii].fillChunk(chunk, destIterator);