From ecdf5eb5a9313ed28a8cc9e08090a40aa61d31bb Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Thu, 2 Nov 2023 17:06:46 -0600 Subject: [PATCH] Bugfix: reuse original rowset if no flattening required --- .../main/java/io/deephaven/engine/table/impl/QueryTable.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/QueryTable.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/QueryTable.java index 1b468be1e76..3c5e837610c 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/QueryTable.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/QueryTable.java @@ -1525,8 +1525,9 @@ this, mode, columns, rowSet, getModifiedColumnSetForUpdates(), publishTheseSourc } } - final TrackingRowSet resultRowSet = - analyzer.flattenedResult() ? RowSetFactory.flat(rowSet.size()).toTracking() : rowSet; + final TrackingRowSet resultRowSet = analyzer.flattenedResult() && !rowSet.isFlat() + ? RowSetFactory.flat(rowSet.size()).toTracking() + : rowSet; resultTable = new QueryTable(resultRowSet, analyzerWrapper.getPublishedColumnResources()); if (liveResultCapture != null) { analyzer.startTrackingPrev();