refactor: DH-22508: Remove trove from engine-rowset#7971
Open
cpwright wants to merge 7 commits intodeephaven:mainfrom
Open
refactor: DH-22508: Remove trove from engine-rowset#7971cpwright wants to merge 7 commits intodeephaven:mainfrom
cpwright wants to merge 7 commits intodeephaven:mainfrom
Conversation
Replace the hand-maintained ShortArrayList/IntArrayList/LongArrayList in io.deephaven.util.datastructures.primitives with a single Char template under io.deephaven.util.datastructures.list, and generate the Byte/Short/Int/Long/Float/Double variants via a new ReplicatePrimitiveArrayLists replicator (registered in replicateAllSafe). Add a TestCharArrayList that covers size/add/get/set/grow/clear/removeChar/removeElements; the same test is replicated to all six numeric primitives. The two existing callers in engine/rowset (ExternalizableRowSetUtils, RowSetShiftData) are updated to import from the new .list package. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
No docs changes detected for ab2eeb8 |
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors rowset-related code to remove Trove usage from engine-rowset by switching to fastutil where appropriate and introducing small internal primitive array list utilities to cover remaining needs, plus updating supporting web and replication artifacts.
Changes:
- Replace Trove collections with fastutil primitives in rowset tests and some production code (e.g., SortedRanges array pools, barrage metadata offsets).
- Introduce
io.deephaven.util.datastructures.list.*ArrayListprimitive list implementations (and generated tests), plus a replication task to regenerate them. - Update Gradle dependencies to drop
libs.trovefromengine/rowsetandbase-test-utilsin favor oflibs.dsi.fastutil.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| web/client-api/src/main/resources/io/deephaven/web/super/io/deephaven/engine/rowset/WebRowSetBuilderSequentialImpl.java | Implements new appendKey for web sequential builder. |
| web/client-api/src/main/resources/io/deephaven/web/super/io/deephaven/engine/rowset/RowSetBuilderSequential.java | Adds appendKey(long) to the web interface to match engine expectations. |
| replication/static/src/main/java/io/deephaven/replicators/ReplicatePrimitiveArrayLists.java | Adds replication driver for primitive array list sources/tests. |
| replication/static/build.gradle | Wires replicatePrimitiveArrayLists into replicateAllSafe. |
| extensions/barrage/src/main/java/io/deephaven/extensions/barrage/BarrageMessageWriterImpl.java | Removes Trove list usage; uses int[] for FlatBuffers offset vector construction. |
| engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesTest.java | Migrates tests from Trove to fastutil primitives. |
| engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/rsp/RspBitmapTest.java | Migrates tests from Trove to fastutil primitives. |
| engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/WritableRowSetImplTest.java | Migrates tests from Trove to fastutil primitives. |
| engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/ValidationSet.java | Replaces Trove set utilities with fastutil equivalents. |
| engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/RowSetCreationRandomPerfTest.java | Removes Trove import and deletes unused IntStats block. |
| engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesShort.java | Replaces Trove TIntObjectHashMap pooling with fastutil Int2ObjectOpenHashMap. |
| engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesLong.java | Replaces Trove pooling map with fastutil; minor signature tweaks. |
| engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesInt.java | Replaces Trove pooling map with fastutil. |
| engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/RowSetUtils.java | Removes Trove-based helper and its dependency. |
| engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/ExternalizableRowSetUtils.java | Switches from Trove short list to internal ShortArrayList. |
| engine/rowset/src/main/java/io/deephaven/engine/rowset/RowSetShiftData.java | Replaces Trove primitive lists with internal primitive array lists. |
| engine/rowset/build.gradle | Swaps Trove dependency for fastutil in rowset module. |
| base-test-utils/src/main/java/io/deephaven/base/testing/Shuffle.java | Switches Trove list shuffle overload to fastutil LongArrayList. |
| base-test-utils/build.gradle | Swaps Trove dependency for fastutil in base test utils. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestShortArrayList.java | Adds generated tests for new ShortArrayList. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestLongArrayList.java | Adds generated tests for new LongArrayList. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestIntArrayList.java | Adds generated tests for new IntArrayList. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestFloatArrayListSpecial.java | Adds float NaN / signed-zero contract tests. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestFloatArrayList.java | Adds generated tests for new FloatArrayList. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestDoubleArrayListSpecial.java | Adds double NaN / signed-zero contract tests. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestDoubleArrayList.java | Adds generated tests for new DoubleArrayList. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestCharArrayList.java | Adds tests for CharArrayList. |
| Util/src/test/java/io/deephaven/util/datastructures/list/TestByteArrayList.java | Adds generated tests for new ByteArrayList. |
| Util/src/main/java/io/deephaven/util/datastructures/list/ShortArrayList.java | Adds internal primitive short list implementation. |
| Util/src/main/java/io/deephaven/util/datastructures/list/LongArrayList.java | Adds internal primitive long list implementation. |
| Util/src/main/java/io/deephaven/util/datastructures/list/IntArrayList.java | Adds internal primitive int list implementation. |
| Util/src/main/java/io/deephaven/util/datastructures/list/FloatArrayList.java | Adds internal primitive float list implementation. |
| Util/src/main/java/io/deephaven/util/datastructures/list/DoubleArrayList.java | Adds internal primitive double list implementation. |
| Util/src/main/java/io/deephaven/util/datastructures/list/CharArrayList.java | Adds internal primitive char list implementation (replication template). |
| Util/src/main/java/io/deephaven/util/datastructures/list/ByteArrayList.java | Adds internal primitive byte list implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+40
to
+42
| final LongOpenHashSet r = make(h1.size() + h2.size()); | ||
| h1.forEach(v -> r.add(v)); | ||
| h2.forEach(v -> r.add(v)); |
Comment on lines
+50
to
54
| final LongOpenHashSet r = make(h1.size()); | ||
| h1.forEach(v -> { | ||
| if (!h2.contains(v)) | ||
| r.add(v); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.