From 92cad0e863d7f2b77f78e08a199e99287641aef9 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Tue, 28 May 2024 15:49:59 -0500 Subject: [PATCH] Rename MutableInt accessors --- .../util/datastructures/ReleaseTracker.java | 2 +- .../SimpleReferenceManager.java | 2 +- .../io/deephaven/util/mutable/MutableInt.java | 6 +- .../datastructures/TestSegmentedSoftPool.java | 6 +- .../TestWeakIdentityHashSet.java | 14 +- .../util/mutable/MutableIntTest.java | 22 +-- .../table/iterators/TestColumnIterators.java | 18 +- .../benchmark/engine/SortBenchmark.java | 2 +- .../rowset/impl/ShiftedRowSequence.java | 2 +- .../impl/sortedranges/SortedRanges.java | 116 ++++++------ .../rowset/impl/RowSequenceTestBase.java | 2 +- .../engine/rowset/impl/rsp/RspBitmapTest.java | 2 +- .../SortedRangesRowSequenceTest.java | 4 +- .../impl/sortedranges/SortedRangesTest.java | 12 +- .../engine/context/QueryCompilerImpl.java | 2 +- .../engine/table/impl/CrossJoinHelper.java | 4 +- .../engine/table/impl/NaturalJoinHelper.java | 6 +- .../engine/table/impl/QueryTable.java | 4 +- ...leUniqueStaticNaturalJoinStateManager.java | 2 +- .../engine/table/impl/SortListener.java | 2 +- ...rementalAsOfJoinStateManagerTypedBase.java | 6 +- .../StaticAsOfJoinStateManagerTypedBase.java | 2 +- .../impl/by/BigDecimalChunkedAvgOperator.java | 8 +- .../impl/by/BigDecimalChunkedSumOperator.java | 10 +- .../impl/by/BigDecimalChunkedVarOperator.java | 8 +- .../impl/by/BigIntegerChunkedAvgOperator.java | 8 +- .../impl/by/BigIntegerChunkedSumOperator.java | 10 +- .../impl/by/BigIntegerChunkedVarOperator.java | 8 +- .../BooleanChunkedAddOnlyMinMaxOperator.java | 6 +- .../impl/by/BooleanChunkedSumOperator.java | 26 +-- .../by/ByteChunkedAddOnlyMinMaxOperator.java | 6 +- .../table/impl/by/ByteChunkedAvgOperator.java | 8 +- .../table/impl/by/ByteChunkedSumOperator.java | 6 +- .../table/impl/by/ByteChunkedVarOperator.java | 8 +- .../by/CharChunkedAddOnlyMinMaxOperator.java | 6 +- .../table/impl/by/CharChunkedAvgOperator.java | 8 +- .../table/impl/by/CharChunkedSumOperator.java | 6 +- .../table/impl/by/CharChunkedVarOperator.java | 8 +- .../by/ChunkedOperatorAggregationHelper.java | 22 +-- .../by/ChunkedWeightedAverageOperator.java | 20 +-- .../DoubleChunkedAddOnlyMinMaxOperator.java | 6 +- .../impl/by/DoubleChunkedAvgOperator.java | 24 +-- .../impl/by/DoubleChunkedSumOperator.java | 45 +++-- .../impl/by/DoubleChunkedVarOperator.java | 24 +-- .../by/DoubleChunkedWeightedSumOperator.java | 20 +-- .../by/FloatChunkedAddOnlyMinMaxOperator.java | 6 +- .../impl/by/FloatChunkedAvgOperator.java | 24 +-- .../impl/by/FloatChunkedSumOperator.java | 44 ++--- .../impl/by/FloatChunkedVarOperator.java | 24 +-- ...regationStateManagerOpenAddressedBase.java | 2 +- ...ratorAggregationStateManagerTypedBase.java | 2 +- .../by/IntChunkedAddOnlyMinMaxOperator.java | 6 +- .../table/impl/by/IntChunkedAvgOperator.java | 8 +- .../table/impl/by/IntChunkedSumOperator.java | 6 +- .../table/impl/by/IntChunkedVarOperator.java | 8 +- .../by/LongChunkedAddOnlyMinMaxOperator.java | 6 +- .../table/impl/by/LongChunkedAvgOperator.java | 8 +- .../table/impl/by/LongChunkedSumOperator.java | 6 +- .../table/impl/by/LongChunkedVarOperator.java | 8 +- .../by/LongChunkedWeightedSumOperator.java | 20 +-- .../ObjectChunkedAddOnlyMinMaxOperator.java | 6 +- ...tateManagerOpenAddressedAlternateBase.java | 7 +- .../by/ShortChunkedAddOnlyMinMaxOperator.java | 6 +- .../impl/by/ShortChunkedAvgOperator.java | 8 +- .../impl/by/ShortChunkedSumOperator.java | 6 +- .../impl/by/ShortChunkedVarOperator.java | 8 +- ...regationStateManagerOpenAddressedBase.java | 3 +- ...ratorAggregationStateManagerTypedBase.java | 2 +- ...hunkedOperatorAggregationStateManager.java | 4 +- .../BooleanPercentileTypeHelper.java | 4 +- .../BytePercentileTypeHelper.java | 4 +- .../CharPercentileTypeHelper.java | 4 +- .../DoublePercentileTypeHelper.java | 4 +- .../FloatPercentileTypeHelper.java | 4 +- .../InstantPercentileTypeHelper.java | 4 +- .../IntPercentileTypeHelper.java | 5 +- .../LongPercentileTypeHelper.java | 4 +- .../ObjectPercentileTypeHelper.java | 6 +- .../ShortPercentileTypeHelper.java | 4 +- .../SsmChunkedPercentileOperator.java | 10 +- .../impl/chunkfillers/BooleanChunkFiller.java | 16 +- .../impl/chunkfillers/ByteChunkFiller.java | 16 +- .../impl/chunkfillers/CharChunkFiller.java | 16 +- .../impl/chunkfillers/DoubleChunkFiller.java | 16 +- .../impl/chunkfillers/FloatChunkFiller.java | 16 +- .../impl/chunkfillers/IntChunkFiller.java | 16 +- .../impl/chunkfillers/LongChunkFiller.java | 16 +- .../impl/chunkfillers/ObjectChunkFiller.java | 16 +- .../impl/chunkfillers/ShortChunkFiller.java | 16 +- .../impl/hierarchical/TreeTableFilter.java | 6 +- ...ementalMultiJoinStateManagerTypedBase.java | 7 +- ...entalNaturalJoinStateManagerTypedBase.java | 7 +- .../partitioned/PartitionedTableImpl.java | 4 +- .../impl/sources/BitShiftingColumnSource.java | 14 +- .../table/impl/sources/ByteArraySource.java | 24 +-- .../impl/sources/CharacterArraySource.java | 24 +-- .../sources/CrossJoinRightColumnSource.java | 10 +- .../table/impl/sources/DoubleArraySource.java | 24 +-- .../table/impl/sources/FloatArraySource.java | 24 +-- .../impl/sources/IntegerArraySource.java | 24 +-- .../table/impl/sources/LongArraySource.java | 48 ++--- .../table/impl/sources/ObjectArraySource.java | 24 +-- .../impl/sources/ShiftedColumnSource.java | 10 +- .../table/impl/sources/ShortArraySource.java | 24 +-- .../ByteChunkColumnSource.java | 4 +- .../CharChunkColumnSource.java | 4 +- .../DoubleChunkColumnSource.java | 4 +- .../FloatChunkColumnSource.java | 4 +- .../IntChunkColumnSource.java | 4 +- .../LongChunkColumnSource.java | 4 +- .../ObjectChunkColumnSource.java | 5 +- .../ShortChunkColumnSource.java | 4 +- .../immutable/ImmutableByteArraySource.java | 4 +- .../immutable/ImmutableCharArraySource.java | 4 +- .../immutable/ImmutableDoubleArraySource.java | 4 +- .../immutable/ImmutableFloatArraySource.java | 4 +- .../immutable/ImmutableIntArraySource.java | 4 +- .../immutable/ImmutableLongArraySource.java | 8 +- .../immutable/ImmutableObjectArraySource.java | 4 +- .../immutable/ImmutableShortArraySource.java | 4 +- .../ssms/ByteSegmentedSortedMultiset.java | 32 ++-- .../ssms/CharSegmentedSortedMultiset.java | 32 ++-- .../ssms/DoubleSegmentedSortedMultiset.java | 32 ++-- .../ssms/FloatSegmentedSortedMultiset.java | 32 ++-- .../impl/ssms/IntSegmentedSortedMultiset.java | 32 ++-- .../ssms/LongSegmentedSortedMultiset.java | 32 ++-- .../ssms/ObjectSegmentedSortedMultiset.java | 34 ++-- .../ssms/ShortSegmentedSortedMultiset.java | 32 ++-- .../UpdateByStateManagerTypedBase.java | 7 +- .../impl/util/ColumnsToRowsTransform.java | 10 +- .../util/GroupedWritableRowRedirection.java | 8 +- .../table/impl/util/UpdateCoalescer.java | 10 +- .../impl/util/WritableRowRedirection.java | 2 +- .../util/WritableRowRedirectionLockFree.java | 2 +- .../deephaven/engine/util/TickSuppressor.java | 2 +- .../table/impl/QueryTableAggregationTest.java | 2 +- .../impl/QueryTableCrossJoinTestBase.java | 42 ++--- .../impl/QueryTableLeftOuterJoinTestBase.java | 40 ++--- .../table/impl/QueryTableNaturalJoinTest.java | 12 +- .../impl/QueryTableSelectUpdateTest.java | 12 +- .../engine/table/impl/QueryTableSortTest.java | 6 +- .../impl/ShiftedColumnOperationTest.java | 4 +- .../impl/TestConcurrentInstantiation.java | 6 +- .../table/impl/TestTableUpdateValidator.java | 2 +- .../table/impl/indexer/TestDataIndexer.java | 4 +- .../ssms/TestByteSegmentedSortedMultiset.java | 4 +- .../ssms/TestCharSegmentedSortedMultiset.java | 4 +- .../TestDoubleSegmentedSortedMultiset.java | 4 +- .../TestFloatSegmentedSortedMultiset.java | 4 +- .../ssms/TestIntSegmentedSortedMultiset.java | 4 +- .../ssms/TestLongSegmentedSortedMultiset.java | 4 +- .../TestObjectSegmentedSortedMultiset.java | 6 +- .../TestShortSegmentedSortedMultiset.java | 4 +- .../impl/util/RowRedirectionLockFreeTest.java | 8 +- .../impl/util/TestRedirectedColumnSource.java | 4 +- .../engine/testutil/QueryTableTestBase.java | 2 +- .../deephaven/engine/testutil/TstUtils.java | 8 +- .../testutil/sources/ByteTestSource.java | 4 +- .../testutil/sources/CharTestSource.java | 4 +- .../testutil/sources/DoubleTestSource.java | 4 +- .../testutil/sources/FloatTestSource.java | 4 +- .../sources/ImmutableByteTestSource.java | 4 +- .../sources/ImmutableCharTestSource.java | 4 +- .../sources/ImmutableDoubleTestSource.java | 4 +- .../sources/ImmutableFloatTestSource.java | 4 +- .../sources/ImmutableIntTestSource.java | 4 +- .../sources/ImmutableLongTestSource.java | 4 +- .../sources/ImmutableObjectTestSource.java | 5 +- .../sources/ImmutableShortTestSource.java | 4 +- .../testutil/sources/IntTestSource.java | 4 +- .../testutil/sources/LongTestSource.java | 4 +- .../testutil/sources/ObjectTestSource.java | 5 +- .../testutil/sources/ShortTestSource.java | 4 +- .../barrage/BarrageStreamGeneratorImpl.java | 16 +- .../VarBinaryChunkInputStreamGenerator.java | 2 +- .../table/ParquetTableReadWriteTest.java | 168 +++++++++--------- .../barrage/BarrageMessageRoundTripTest.java | 12 +- .../test/FlightMessageRoundTripTest.java | 8 +- 178 files changed, 1021 insertions(+), 1043 deletions(-) diff --git a/Util/src/main/java/io/deephaven/util/datastructures/ReleaseTracker.java b/Util/src/main/java/io/deephaven/util/datastructures/ReleaseTracker.java index 2857e46fbea..ac38446282e 100644 --- a/Util/src/main/java/io/deephaven/util/datastructures/ReleaseTracker.java +++ b/Util/src/main/java/io/deephaven/util/datastructures/ReleaseTracker.java @@ -227,7 +227,7 @@ private static String build(@NotNull final Collection leaks "Leaked " + leaks.size() + " resources (" + dupDetector.size() + " unique traces):\n"); final MutableInt i = new MutableInt(); dupDetector.entrySet().stream().limit(maxUniqueTraces).forEach(entry -> { - sb.append(" Leak #").append(i.intValue()); + sb.append(" Leak #").append(i.get()); if (entry.getValue() > 0L) { sb.append(", detected " + entry.getValue() + " times, was acquired:\n"); } else { diff --git a/Util/src/main/java/io/deephaven/util/datastructures/SimpleReferenceManager.java b/Util/src/main/java/io/deephaven/util/datastructures/SimpleReferenceManager.java index 6c1ab203204..5926c66de38 100644 --- a/Util/src/main/java/io/deephaven/util/datastructures/SimpleReferenceManager.java +++ b/Util/src/main/java/io/deephaven/util/datastructures/SimpleReferenceManager.java @@ -221,7 +221,7 @@ public boolean isEmpty() { public int size() { final MutableInt size = new MutableInt(0); forEach((ref, source) -> size.increment()); - return size.intValue(); + return size.get(); } /** diff --git a/Util/src/main/java/io/deephaven/util/mutable/MutableInt.java b/Util/src/main/java/io/deephaven/util/mutable/MutableInt.java index 1e7044827db..3aa79868796 100644 --- a/Util/src/main/java/io/deephaven/util/mutable/MutableInt.java +++ b/Util/src/main/java/io/deephaven/util/mutable/MutableInt.java @@ -23,11 +23,11 @@ public MutableInt(final int value) { this.value = value; } - public int intValue() { + public int get() { return value; } - public void setValue(int value) { + public void set(int value) { this.value = value; } @@ -41,7 +41,7 @@ public int addAndGet(int addend) { } public int getAndAdd(int addend) { - int old = intValue(); + int old = get(); value += addend; return old; } diff --git a/Util/src/test/java/io/deephaven/util/datastructures/TestSegmentedSoftPool.java b/Util/src/test/java/io/deephaven/util/datastructures/TestSegmentedSoftPool.java index a3af31ac1e8..0bff8708da7 100644 --- a/Util/src/test/java/io/deephaven/util/datastructures/TestSegmentedSoftPool.java +++ b/Util/src/test/java/io/deephaven/util/datastructures/TestSegmentedSoftPool.java @@ -51,8 +51,8 @@ public void testWithFactory() { final SegmentedSoftPool pool = new SegmentedSoftPool<>(10, () -> { counter.increment(); - sumAllocated.add(counter.intValue()); - return counter.intValue(); + sumAllocated.add(counter.get()); + return counter.get(); }, sumCleared::add); @@ -64,7 +64,7 @@ public void testWithFactory() { IntStream.range(0, 1000).boxed().forEach(II -> TestCase.assertEquals(II, pool.take())); IntStream.range(0, 1000).boxed().forEach(pool::give); - TestCase.assertEquals(sumAllocated.intValue(), sumCleared.intValue()); + TestCase.assertEquals(sumAllocated.get(), sumCleared.get()); } private static final BitSet OUTSTANDING_INSTANCES = new BitSet(1_000_000); diff --git a/Util/src/test/java/io/deephaven/util/datastructures/TestWeakIdentityHashSet.java b/Util/src/test/java/io/deephaven/util/datastructures/TestWeakIdentityHashSet.java index 91b04e8a481..60fb8c10f68 100644 --- a/Util/src/test/java/io/deephaven/util/datastructures/TestWeakIdentityHashSet.java +++ b/Util/src/test/java/io/deephaven/util/datastructures/TestWeakIdentityHashSet.java @@ -50,35 +50,35 @@ public void testForEach() { TestCase.assertNotNull(s); counter.increment(); }); - TestCase.assertEquals(0, counter.intValue()); + TestCase.assertEquals(0, counter.get()); Arrays.stream(values).forEach(v -> TestCase.assertTrue(set.add(v))); Arrays.stream(values).forEach(v -> TestCase.assertFalse(set.add(v))); - counter.setValue(0); + counter.set(0); set.forEach(s -> { TestCase.assertNotNull(s); counter.increment(); }); - TestCase.assertEquals(values.length, counter.intValue()); + TestCase.assertEquals(values.length, counter.get()); set.clear(); - counter.setValue(0); + counter.set(0); set.forEach(s -> { TestCase.assertNotNull(s); counter.increment(); }); - TestCase.assertEquals(0, counter.intValue()); + TestCase.assertEquals(0, counter.get()); Arrays.stream(values).forEach(v -> TestCase.assertTrue(set.add(v))); Arrays.stream(values).forEach(v -> TestCase.assertFalse(set.add(v))); - counter.setValue(0); + counter.set(0); set.forEach(s -> { TestCase.assertNotNull(s); counter.increment(); }); - TestCase.assertEquals(values.length, counter.intValue()); + TestCase.assertEquals(values.length, counter.get()); } } diff --git a/Util/src/test/java/io/deephaven/util/mutable/MutableIntTest.java b/Util/src/test/java/io/deephaven/util/mutable/MutableIntTest.java index 9e1272b2d9c..3d3bfe0851d 100644 --- a/Util/src/test/java/io/deephaven/util/mutable/MutableIntTest.java +++ b/Util/src/test/java/io/deephaven/util/mutable/MutableIntTest.java @@ -11,21 +11,21 @@ public class MutableIntTest { @Test public void intValue() { - assertEquals(123, new MutableInt(123).intValue()); + assertEquals(123, new MutableInt(123).get()); } @Test public void setValue() { MutableInt v = new MutableInt(321); - v.setValue(999); - assertEquals(999, v.intValue()); + v.set(999); + assertEquals(999, v.get()); } @Test public void add() { MutableInt v = new MutableInt(1000); v.add(10); - assertEquals(1010, v.intValue()); + assertEquals(1010, v.get()); } @Test @@ -33,7 +33,7 @@ public void addAndGet() { MutableInt v = new MutableInt(1000); int result = v.addAndGet(10); assertEquals(1010, result); - assertEquals(1010, v.intValue()); + assertEquals(1010, v.get()); } @Test @@ -41,7 +41,7 @@ public void getAndAdd() { MutableInt v = new MutableInt(1000); int result = v.getAndAdd(10); assertEquals(1000, result); - assertEquals(1010, v.intValue()); + assertEquals(1010, v.get()); } @Test @@ -49,21 +49,21 @@ public void getAndIncrement() { MutableInt v = new MutableInt(1000); int result = v.getAndIncrement(); assertEquals(1000, result); - assertEquals(1001, v.intValue()); + assertEquals(1001, v.get()); } @Test public void increment() { MutableInt v = new MutableInt(1000); v.increment(); - assertEquals(1001, v.intValue()); + assertEquals(1001, v.get()); } @Test public void decrement() { MutableInt v = new MutableInt(1000); v.decrement(); - assertEquals(999, v.intValue()); + assertEquals(999, v.get()); } @Test @@ -71,13 +71,13 @@ public void incrementAndGet() { MutableInt v = new MutableInt(1000); int result = v.incrementAndGet(); assertEquals(1001, result); - assertEquals(1001, v.intValue()); + assertEquals(1001, v.get()); } @Test public void subtract() { MutableInt v = new MutableInt(1000); v.subtract(10); - assertEquals(990, v.intValue()); + assertEquals(990, v.get()); } } diff --git a/engine/api/src/test/java/io/deephaven/engine/table/iterators/TestColumnIterators.java b/engine/api/src/test/java/io/deephaven/engine/table/iterators/TestColumnIterators.java index 8bda17b63b3..5102e57ca51 100644 --- a/engine/api/src/test/java/io/deephaven/engine/table/iterators/TestColumnIterators.java +++ b/engine/api/src/test/java/io/deephaven/engine/table/iterators/TestColumnIterators.java @@ -81,7 +81,7 @@ public void testCharacterColumnIterators() { .filter((final Character value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked3.stream() .filter((final Character value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) @@ -119,7 +119,7 @@ public void testByteColumnIterators() { .filter((final Byte value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked3.stream() .filter((final Byte value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) @@ -157,7 +157,7 @@ public void testShortColumnIterators() { .filter((final Short value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked3.stream() .filter((final Short value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) @@ -195,7 +195,7 @@ public void testIntegerColumnIterators() { .filter((final Integer value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked3.stream() .filter((final Integer value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) @@ -233,7 +233,7 @@ public void testLongColumnIterators() { .filter((final Long value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked3.stream() .filter((final Long value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) @@ -271,7 +271,7 @@ public void testFloatColumnIterators() { .filter((final Float value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked3.stream() .filter((final Float value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) @@ -309,7 +309,7 @@ public void testDoubleColumnIterators() { .filter((final Double value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked3.stream() .filter((final Double value) -> !(Objects.equals(value, box(data.get(nextValueIndex.getAndIncrement()))))) @@ -343,7 +343,7 @@ public void testObjectColumnIteratorsOfBoolean() { .filter((final Boolean value) -> !(Objects.equals(value, data.get(nextValueIndex.getAndIncrement())))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked2.stream() .filter((final Boolean value) -> !(Objects.equals(value, data.get(nextValueIndex.getAndIncrement())))) @@ -377,7 +377,7 @@ public void testObjectColumnIteratorsOfString() { .filter((final String value) -> !(Objects.equals(value, data.get(nextValueIndex.getAndIncrement())))) .count()); - nextValueIndex.setValue(0); + nextValueIndex.set(0); assertEquals(0, chunked2.stream() .filter((final String value) -> !(Objects.equals(value, data.get(nextValueIndex.getAndIncrement())))) diff --git a/engine/benchmark/src/benchmark/java/io/deephaven/benchmark/engine/SortBenchmark.java b/engine/benchmark/src/benchmark/java/io/deephaven/benchmark/engine/SortBenchmark.java index 3db92daacaa..67c1a4fd33f 100644 --- a/engine/benchmark/src/benchmark/java/io/deephaven/benchmark/engine/SortBenchmark.java +++ b/engine/benchmark/src/benchmark/java/io/deephaven/benchmark/engine/SortBenchmark.java @@ -141,7 +141,7 @@ public void setupEnv(BenchmarkParams params) { inputTable.getDefinition().getColumnNameSet().forEach(columnName -> { if (!columnName.equals(sortCol)) { - sortColumns[ci.intValue()] = columnName; + sortColumns[ci.get()] = columnName; ci.increment(); } }); diff --git a/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/ShiftedRowSequence.java b/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/ShiftedRowSequence.java index 9af74d122c6..cc610210380 100644 --- a/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/ShiftedRowSequence.java +++ b/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/ShiftedRowSequence.java @@ -187,7 +187,7 @@ public void close() { public long rangesCountUpperBound() { final MutableInt mi = new MutableInt(0); wrappedOK.forAllRowKeyRanges((final long start, final long end) -> mi.increment()); - return mi.intValue(); + return mi.get(); } private void shiftIndicesChunk(WritableLongChunk chunkToFill) { diff --git a/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRanges.java b/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRanges.java index d936f7d7349..9b570dc68af 100644 --- a/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRanges.java +++ b/engine/rowset/src/main/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRanges.java @@ -1282,7 +1282,7 @@ private static SortedRanges intersectRangeImplStep( } ++out.cardinality; if (packedEnd == packedStart) { - iStartOut.setValue(srcIndex + 1); + iStartOut.set(srcIndex + 1); if (DEBUG) out.validate(start, end); return out; @@ -1303,7 +1303,7 @@ private static SortedRanges intersectRangeImplStep( } out.cardinality += packedEnd - packedStart + 1; } - iStartOut.setValue((packedEnd < srcValue) ? srcIndex : srcIndex + 1); + iStartOut.set((packedEnd < srcValue) ? srcIndex : srcIndex + 1); if (DEBUG) out.validate(start, end); return out; @@ -1351,7 +1351,7 @@ private static SortedRanges intersectRangeImplStep( } out.cardinality += packedEnd - prevStart; } - iStartOut.setValue(srcIndex); + iStartOut.set(srcIndex); if (DEBUG) out.validate(start, end); return out; @@ -2209,9 +2209,9 @@ private static boolean insertInternal(final MutableObject sarHolde final long startPacked = sar.pack(pendingStart); final long endPacked = sar.pack(-iData); final long deltaCard = endPacked - startPacked + 1; - iAdd.setValue(sar.absRawBinarySearch(startPacked, iAdd.intValue(), sar.count - 1)); + iAdd.set(sar.absRawBinarySearch(startPacked, iAdd.get(), sar.count - 1)); final SortedRanges ans = addRangePackedWithStart( - sar, iAdd.intValue(), startPacked, endPacked, pendingStart, -iData, deltaCard, iAdd, + sar, iAdd.get(), startPacked, endPacked, pendingStart, -iData, deltaCard, iAdd, writeCheck); if (ans == null) { sarHolder.setValue(sar); @@ -2229,9 +2229,9 @@ private static boolean insertInternal(final MutableObject sarHolde } else { if (pendingStart != -1) { final long pendingStartPacked = sar.pack(pendingStart); - iAdd.setValue(sar.absRawBinarySearch(pendingStartPacked, iAdd.intValue(), sar.count - 1)); + iAdd.set(sar.absRawBinarySearch(pendingStartPacked, iAdd.get(), sar.count - 1)); final SortedRanges ans = addPackedWithStart( - sar, iAdd.intValue(), pendingStartPacked, pendingStart, iAdd, writeCheck); + sar, iAdd.get(), pendingStartPacked, pendingStart, iAdd, writeCheck); if (ans == null) { sarHolder.setValue(sar); return false; @@ -2251,7 +2251,7 @@ private static boolean insertInternal(final MutableObject sarHolde } if (pendingStart != -1) { final long pendingStartPacked = sar.pack(pendingStart); - final int iStart = sar.absRawBinarySearch(pendingStartPacked, iAdd.intValue(), sar.count - 1); + final int iStart = sar.absRawBinarySearch(pendingStartPacked, iAdd.get(), sar.count - 1); final SortedRanges ans = addPackedWithStart( sar, iStart, pendingStartPacked, pendingStart, null, writeCheck); if (ans == null) { @@ -2293,7 +2293,7 @@ static boolean removeLegacy(final MutableObject sarOut, final RowS } final long packedStart = sar.pack(start); final long packedEnd = sar.pack(end); - int i = iRm.intValue(); + int i = iRm.get(); i = sar.absRawBinarySearch(packedStart, i, sar.count - 1); final SortedRanges ans = removeRangePackedWithStart( sar, i, packedStart, packedEnd, start, end, iRm, writeCheck); @@ -2758,7 +2758,7 @@ private static SortedRanges intersectLegacy( return null; } lasti = i; - i = iOut.intValue(); + i = iOut.get(); if (i >= sar.count) { break; } @@ -3339,7 +3339,7 @@ protected static SortedRanges addPackedWithStart( ++sar.cardinality; sar.packedSet(j, -packedValue); if (iStartOut != null) { - iStartOut.setValue(j + 1); + iStartOut.set(j + 1); } if (DEBUG) sar.validate(packedValue, packedValue); @@ -3351,7 +3351,7 @@ protected static SortedRanges addPackedWithStart( } ++sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } if (DEBUG) sar.validate(packedValue, packedValue); @@ -3363,7 +3363,7 @@ protected static SortedRanges addPackedWithStart( } ++sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } if (DEBUG) sar.validate(packedValue, packedValue); @@ -3418,18 +3418,18 @@ protected static SortedRanges addPackedWithStart( if (mergeToRightRange) { sar.close2(i - 1); if (iStartOut != null) { - iStartOut.setValue(i - 1); + iStartOut.set(i - 1); } } else if (mergeToRightSingle) { sar.close(i); sar.packedSet(i - 1, -(packedValue + 1)); if (iStartOut != null) { - iStartOut.setValue(i - 2); + iStartOut.set(i - 2); } } else { sar.packedSet(i - 1, -packedValue); if (iStartOut != null) { - iStartOut.setValue(i); + iStartOut.set(i); } } } else if (mergeToLeftSingle) { @@ -3440,7 +3440,7 @@ protected static SortedRanges addPackedWithStart( ++sar.cardinality; sar.close(i); if (iStartOut != null) { - iStartOut.setValue(i); + iStartOut.set(i); } } else if (mergeToRightSingle) { if (writeCheck) { @@ -3449,7 +3449,7 @@ protected static SortedRanges addPackedWithStart( ++sar.cardinality; sar.packedSet(i, -(packedValue + 1)); if (iStartOut != null) { - iStartOut.setValue(i - 1); + iStartOut.set(i - 1); } } else { sar = sar.openNeg(i, -packedValue, writeCheck); @@ -3458,7 +3458,7 @@ protected static SortedRanges addPackedWithStart( } ++sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(i + 1); + iStartOut.set(i + 1); } } } else { @@ -3469,7 +3469,7 @@ protected static SortedRanges addPackedWithStart( ++sar.cardinality; sar.packedSet(i, packedValue); if (iStartOut != null) { - iStartOut.setValue(i + 1); + iStartOut.set(i + 1); } } else if (mergeToRightSingle) { sar = sar.open(i, packedValue, -(packedValue + 1), writeCheck); @@ -3478,7 +3478,7 @@ protected static SortedRanges addPackedWithStart( } ++sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(i); + iStartOut.set(i); } } else { sar = sar.open(i, packedValue, writeCheck); @@ -3487,7 +3487,7 @@ protected static SortedRanges addPackedWithStart( } ++sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(i + 1); + iStartOut.set(i + 1); } } } @@ -3554,7 +3554,7 @@ protected static SortedRanges addRangePackedWithStart( sar.packedSet(j, -packedEnd); sar.cardinality += deltaCard; if (iStartOut != null) { - iStartOut.setValue(j + 1); + iStartOut.set(j + 1); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -3566,7 +3566,7 @@ protected static SortedRanges addRangePackedWithStart( } sar.cardinality += deltaCard; if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -3578,7 +3578,7 @@ protected static SortedRanges addRangePackedWithStart( } sar.cardinality += deltaCard; if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -3590,7 +3590,7 @@ protected static SortedRanges addRangePackedWithStart( if (packedEnd <= iStartValue && iStartNeg) { // the whole [packedStart, packedEnd] range was contained in an existing range. if (iStartOut != null) { - iStartOut.setValue(iStart); + iStartOut.set(iStart); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -3613,7 +3613,7 @@ protected static SortedRanges addRangePackedWithStart( } sar.packedSet(iStart - 1, -packedEnd); if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } } else { sar = sar.packedAppend(-packedEnd, -end, writeCheck); @@ -3621,7 +3621,7 @@ protected static SortedRanges addRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } } sar.cardinality += deltaCard - 1; @@ -3646,7 +3646,7 @@ protected static SortedRanges addRangePackedWithStart( if (packedEnd <= -iStartData) { // the whole [packedStart, packedEnd] range was contained in an existing range. if (iStartOut != null) { - iStartOut.setValue(iStart - 1); + iStartOut.set(iStart - 1); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -3656,7 +3656,7 @@ protected static SortedRanges addRangePackedWithStart( if (iStart == sar.count) { if (iStartValue >= packedEnd) { if (iStartOut != null) { - iStartOut.setValue(sar.count - 2); + iStartOut.set(sar.count - 2); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -3667,7 +3667,7 @@ protected static SortedRanges addRangePackedWithStart( } sar.packedSet(sar.count - 1, -packedEnd); if (iStartOut != null) { - iStartOut.setValue(sar.count - 2); + iStartOut.set(sar.count - 2); } sar.cardinality += packedEnd - iStartValue; if (DEBUG) @@ -3689,7 +3689,7 @@ protected static SortedRanges addRangePackedWithStart( sar.cardinality += packedEnd - iStartValue; sar.packedSet(iStart, -packedEnd); if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -3790,19 +3790,19 @@ protected static SortedRanges addRangePackedWithStart( if (mergeToRightRange) { sar.collapse(iStart - 1, iEnd + 1); if (iStartOut != null) { - iStartOut.setValue(iStart - 2); + iStartOut.set(iStart - 2); } } else if (mergeToRightSingle) { sar.packedSet(iStart - 1, -(packedEnd + 1)); sar.collapse(iStart, iEnd + 1); if (iStartOut != null) { - iStartOut.setValue(iStart - 2); + iStartOut.set(iStart - 2); } } else { sar.packedSet(iStart - 1, -packedEnd); sar.collapse(iStart, iEnd); if (iStartOut != null) { - iStartOut.setValue(iStart); + iStartOut.set(iStart); } } } else if (mergeToLeftSingle) { @@ -3812,7 +3812,7 @@ protected static SortedRanges addRangePackedWithStart( } sar.collapse(iStart, iEnd + 1); if (iStartOut != null) { - iStartOut.setValue(iStart - 1); + iStartOut.set(iStart - 1); } } else if (mergeToRightSingle) { if (writeCheck) { @@ -3821,7 +3821,7 @@ protected static SortedRanges addRangePackedWithStart( sar.packedSet(iStart, -(packedEnd + 1)); sar.collapse(iStart + 1, iEnd + 1); if (iStartOut != null) { - iStartOut.setValue(iStart - 1); + iStartOut.set(iStart - 1); } } else { if (len > 0) { @@ -3831,7 +3831,7 @@ protected static SortedRanges addRangePackedWithStart( sar.packedSet(iStart, -packedEnd); sar.collapse(iStart + 1, iEnd); if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } else { sar = sar.openNeg(iStart, -packedEnd, writeCheck); @@ -3839,7 +3839,7 @@ protected static SortedRanges addRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } } @@ -3851,7 +3851,7 @@ protected static SortedRanges addRangePackedWithStart( sar.packedSet(iStart, packedStart); sar.collapse(iStart + 1, iEnd + 1); if (iStartOut != null) { - iStartOut.setValue(iStart); + iStartOut.set(iStart); } } else if (mergeToRightSingle) { if (len > 0) { @@ -3862,7 +3862,7 @@ protected static SortedRanges addRangePackedWithStart( sar.packedSet(iStart + 1, -(packedEnd + 1)); sar.collapse(iStart + 2, iEnd + 1); if (iStartOut != null) { - iStartOut.setValue(iStart); + iStartOut.set(iStart); } } else { sar = sar.open(iStart, packedStart, -(packedEnd + 1), writeCheck); @@ -3870,7 +3870,7 @@ protected static SortedRanges addRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(iStart); + iStartOut.set(iStart); } } } else { @@ -3880,7 +3880,7 @@ protected static SortedRanges addRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(iStart + 2); + iStartOut.set(iStart + 2); } } else if (len == 1) { sar = sar.open(iStart, packedStart, -packedEnd, writeCheck); @@ -3888,7 +3888,7 @@ protected static SortedRanges addRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(iStart + 2); + iStartOut.set(iStart + 2); } } else { if (writeCheck) { @@ -3897,7 +3897,7 @@ protected static SortedRanges addRangePackedWithStart( sar.packedSet(iStart, packedStart); sar.packedSet(iStart + 1, -packedEnd); if (iStartOut != null) { - iStartOut.setValue(iStart + 2); + iStartOut.set(iStart + 2); } } sar.collapse(iStart + 2, iEnd); @@ -4211,7 +4211,7 @@ protected static SortedRanges removeRangePackedWithStart( // iStart will be adjusted to be the start index of the positions to be eliminated from the array. if (iStart >= sar.count) { if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } return sar; } @@ -4238,7 +4238,7 @@ protected static SortedRanges removeRangePackedWithStart( sar.packedSet(iStart, -(packedStart - 1)); --sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -4247,7 +4247,7 @@ protected static SortedRanges removeRangePackedWithStart( --sar.count; --sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -4262,7 +4262,7 @@ protected static SortedRanges removeRangePackedWithStart( --sar.count; --sar.cardinality; if (iStartOut != null) { - iStartOut.setValue(sar.count); + iStartOut.set(sar.count); } if (DEBUG) sar.validate(packedStart, packedEnd); @@ -4360,7 +4360,7 @@ protected static SortedRanges removeRangePackedWithStart( sar.packedSet(iStart + 1, packedEnd + 1); sar.collapse(iStart + 2, iEndExclusive); if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } else { // len == 0; it can't be the case that len==1 if we are truncating at both sides. sar = sar.open2Neg(iStart, -(packedStart - 1), packedEnd + 1, writeCheck); @@ -4368,7 +4368,7 @@ protected static SortedRanges removeRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } } else if (truncateRightSingle) { @@ -4380,7 +4380,7 @@ protected static SortedRanges removeRangePackedWithStart( sar.packedSet(iStart + 1, packedEnd + 1); sar.collapse(iStart + 2, iEndExclusive + 1); if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } else { // len == 0. sar = sar.openNeg(iStart, -(packedStart - 1), packedEnd + 1, writeCheck); @@ -4388,7 +4388,7 @@ protected static SortedRanges removeRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } } else { @@ -4399,7 +4399,7 @@ protected static SortedRanges removeRangePackedWithStart( sar.packedSet(iStart, -(packedStart - 1)); sar.collapse(iStart + 1, iEndExclusive); if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } } else { @@ -4411,7 +4411,7 @@ protected static SortedRanges removeRangePackedWithStart( sar.packedSet(iStart, packedEnd + 1); sar.collapse(iStart + 1, iEndExclusive); if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } else { // len == 0. sar = sar.open(iEndExclusive, packedEnd + 1, writeCheck); @@ -4419,7 +4419,7 @@ protected static SortedRanges removeRangePackedWithStart( return null; } if (iStartOut != null) { - iStartOut.setValue(iEndExclusive); + iStartOut.set(iEndExclusive); } } } else if (truncateRightSingle) { @@ -4429,7 +4429,7 @@ protected static SortedRanges removeRangePackedWithStart( sar.packedSet(iStart, packedEnd + 1); sar.collapse(iStart + 1, iEndExclusive + 1); if (iStartOut != null) { - iStartOut.setValue(iStart + 1); + iStartOut.set(iStart + 1); } } else { if (writeCheck) { @@ -4437,7 +4437,7 @@ protected static SortedRanges removeRangePackedWithStart( } sar.collapse(iStart, iEndExclusive); if (iStartOut != null) { - iStartOut.setValue(iStart); + iStartOut.set(iStart); } } } diff --git a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/RowSequenceTestBase.java b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/RowSequenceTestBase.java index 127958da62c..1480dbf8644 100644 --- a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/RowSequenceTestBase.java +++ b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/RowSequenceTestBase.java @@ -519,7 +519,7 @@ protected void assertContentsByIndices( final MutableInt idx = new MutableInt(0); final RowSet ix = rowSequence.asRowSet(); assertTrue(msg, ix.forEachRowKey((value) -> { - assertEquals(msg + " && value==" + value, expectedIndices.get(idx.intValue()), value); + assertEquals(msg + " && value==" + value, expectedIndices.get(idx.get()), value); idx.add(1); return true; })); diff --git a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/rsp/RspBitmapTest.java b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/rsp/RspBitmapTest.java index 56ba9217413..42f52792e46 100644 --- a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/rsp/RspBitmapTest.java +++ b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/rsp/RspBitmapTest.java @@ -3454,7 +3454,7 @@ public void testForEachLongRangeCompactsRangesAcrossContainers() { rb2.addRange(start, end); return true; }); - assertEquals(2, rangeCount.intValue()); + assertEquals(2, rangeCount.get()); assertEquals(rb, rb2); } diff --git a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesRowSequenceTest.java b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesRowSequenceTest.java index 97174e6240e..5633f0cee5b 100644 --- a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesRowSequenceTest.java +++ b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesRowSequenceTest.java @@ -106,12 +106,12 @@ public void testForEach() { final long[] expected = new long[] {5, 6, 7, 8, 9, 15, 20, 21, 22, 23, 24}; final MutableInt i = new MutableInt(0); rs.forEachRowKey((final long v) -> { - final int j = i.intValue(); + final int j = i.get(); assertEquals("v==" + v + " && j==" + j, expected[j], v); i.increment(); return true; }); - assertEquals(expected.length, i.intValue()); + assertEquals(expected.length, i.get()); } } diff --git a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesTest.java b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesTest.java index b3d025fdb7e..b971844ebd6 100644 --- a/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesTest.java +++ b/engine/rowset/src/test/java/io/deephaven/engine/rowset/impl/sortedranges/SortedRangesTest.java @@ -1204,13 +1204,13 @@ public void testGetKeysForPositions() { sar.getKeysForPositions(iterator, new LongConsumer() { @Override public void accept(final long v) { - final int miValue = mi.intValue(); + final int miValue = mi.get(); final String m = "v==" + v + ", miValue==" + miValue; assertEquals(m, sar.get(positions[miValue]), v); mi.increment(); } }); - assertEquals(positions.length, mi.intValue()); + assertEquals(positions.length, mi.get()); } private static class IterOfLongAdaptor implements PrimitiveIterator.OfLong { @@ -1256,13 +1256,13 @@ public void testGetKeysForPositionsTypes() { sar.getKeysForPositions(iterator, new LongConsumer() { @Override public void accept(final long v) { - final int miValue = mi.intValue(); + final int miValue = mi.get(); final String m2 = m + " && v==" + v + ", miValue==" + miValue; assertEquals(m2, sar.get(positions.get(miValue)), v); mi.increment(); } }); - assertEquals(positions.size(), mi.intValue()); + assertEquals(positions.size(), mi.get()); } } } @@ -2060,9 +2060,9 @@ private static void checkEquals(final String m, final TLongArrayList vs, final i if (v == -1) { return true; } - final int j = sr.unpackedBinarySearch(v, pos.intValue()); + final int j = sr.unpackedBinarySearch(v, pos.get()); assertTrue(m + " && v==" + v, j >= 0); - pos.setValue(j); + pos.set(j); return true; }); } diff --git a/engine/table/src/main/java/io/deephaven/engine/context/QueryCompilerImpl.java b/engine/table/src/main/java/io/deephaven/engine/context/QueryCompilerImpl.java index 2d87671cee7..ce2f8882ab8 100644 --- a/engine/table/src/main/java/io/deephaven/engine/context/QueryCompilerImpl.java +++ b/engine/table/src/main/java/io/deephaven/engine/context/QueryCompilerImpl.java @@ -970,7 +970,7 @@ private boolean doCreateClassesSingleRound( .collect(Collectors.toList())) .call(); - final boolean wantRetry = numFailures.intValue() > 0 && numFailures.intValue() != endExclusive - startInclusive; + final boolean wantRetry = numFailures.get() > 0 && numFailures.get() != endExclusive - startInclusive; // The above has compiled into e.g. // /tmp/workspace/cache/classes/temporaryCompilationDirectory12345/io/deephaven/test/cm12862183232603186v52_0/{various diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/CrossJoinHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/CrossJoinHelper.java index 07e5789273d..96255b01810 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/CrossJoinHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/CrossJoinHelper.java @@ -545,9 +545,9 @@ protected void process() { return; } - for (; currLeftShiftIdx.intValue() < upstreamLeft.shifted().size(); currLeftShiftIdx + for (; currLeftShiftIdx.get() < upstreamLeft.shifted().size(); currLeftShiftIdx .increment()) { - final int shiftIdx = currLeftShiftIdx.intValue(); + final int shiftIdx = currLeftShiftIdx.get(); final long beginRange = upstreamLeft.shifted().getBeginRange(shiftIdx) << prevRightBits; final long endRange = diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/NaturalJoinHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/NaturalJoinHelper.java index bd07bf70908..ae5aac7de31 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/NaturalJoinHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/NaturalJoinHelper.java @@ -492,7 +492,7 @@ public void onUpdate(final TableUpdate upstream) { final MutableBoolean updatedRightRow = new MutableBoolean(false); final MutableInt position = new MutableInt(0); downstream.modified().forAllRowKeys((long modifiedKey) -> { - final long newRedirection = newLeftRedirections.getLong(position.intValue()); + final long newRedirection = newLeftRedirections.getLong(position.get()); final long old; if (newRedirection == RowSequence.NULL_ROW_KEY) { old = rowRedirection.remove(modifiedKey); @@ -514,7 +514,7 @@ public void onUpdate(final TableUpdate upstream) { jsm.decorateLeftSide(downstream.added(), leftSources, newLeftRedirections); final MutableInt position = new MutableInt(0); downstream.added().forAllRowKeys((long ll) -> { - final long newRedirection = newLeftRedirections.getLong(position.intValue()); + final long newRedirection = newLeftRedirections.getLong(position.get()); if (newRedirection != RowSequence.NULL_ROW_KEY) { rowRedirection.putVoid(ll, newRedirection); } @@ -943,7 +943,7 @@ protected void process() { private void copyRedirections(final RowSet leftRows, @NotNull final LongArraySource leftRedirections) { final MutableInt position = new MutableInt(0); leftRows.forAllRowKeys((long ll) -> { - final long rightKey = leftRedirections.getLong(position.intValue()); + final long rightKey = leftRedirections.getLong(position.get()); jsm.checkExactMatch(exactMatch, ll, rightKey); if (rightKey == RowSequence.NULL_ROW_KEY) { rowRedirection.removeVoid(ll); 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 2d2b7b4a845..c83672a61fa 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 @@ -2010,7 +2010,7 @@ private Table renameColumnsImpl( continue; } - if (mcsPairIdx.intValue() == movePosition) { + if (mcsPairIdx.get() == movePosition) { moveColumns.run(); } @@ -2019,7 +2019,7 @@ private Table renameColumnsImpl( newColumns.put(newName.name(), columnSource); } - if (mcsPairIdx.intValue() <= movePosition) { + if (mcsPairIdx.get() <= movePosition) { moveColumns.run(); } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/SimpleUniqueStaticNaturalJoinStateManager.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/SimpleUniqueStaticNaturalJoinStateManager.java index 10673a88882..dde1e486d77 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/SimpleUniqueStaticNaturalJoinStateManager.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/SimpleUniqueStaticNaturalJoinStateManager.java @@ -55,7 +55,7 @@ void setRightSide(RowSet rightRowSet, ColumnSource valueSource) { final MutableInt position = new MutableInt(0); chunkOk.forEachRowKey((long keyIndex) -> { - final int tableLocation = dataChunkAsInt.get(position.intValue()); + final int tableLocation = dataChunkAsInt.get(position.get()); position.increment(); if (tableLocation < 0 || tableLocation >= tableSize) { return true; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/SortListener.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/SortListener.java index 687e26b7a64..a60a4893863 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/SortListener.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/SortListener.java @@ -922,7 +922,7 @@ private static void fillArray(final long[] dest, final RowSet src, final int des final LongUnaryOperator transformer) { final MutableInt pos = new MutableInt(destIndex); src.forAllRowKeys((final long v) -> { - dest[pos.intValue()] = transformer.applyAsLong(v); + dest[pos.get()] = transformer.applyAsLong(v); pos.increment(); }); } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/RightIncrementalAsOfJoinStateManagerTypedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/RightIncrementalAsOfJoinStateManagerTypedBase.java index 12f5e61e33c..7d3c82649e0 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/RightIncrementalAsOfJoinStateManagerTypedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/RightIncrementalAsOfJoinStateManagerTypedBase.java @@ -909,7 +909,7 @@ protected void clearAlternate() { */ public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextChunkSize) { if (rehashPointer > 0) { - final int requiredRehash = nextChunkSize - rehashCredits.intValue(); + final int requiredRehash = nextChunkSize - rehashCredits.get(); if (requiredRehash <= 0) { return false; } @@ -935,8 +935,8 @@ public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextCh } // we can't give the caller credit for rehashes with the old table, we need to begin migrating things again - if (rehashCredits.intValue() > 0) { - rehashCredits.setValue(0); + if (rehashCredits.get() > 0) { + rehashCredits.set(0); } if (fullRehash) { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/StaticAsOfJoinStateManagerTypedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/StaticAsOfJoinStateManagerTypedBase.java index cc51ff57bd0..b6bcb52a699 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/StaticAsOfJoinStateManagerTypedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/asofjoin/StaticAsOfJoinStateManagerTypedBase.java @@ -273,7 +273,7 @@ public int probeLeft(RowSequence leftRowSet, ColumnSource[] leftSources, @Not try (final ProbeContext pc = makeProbeContext(leftSources, leftRowSet.size())) { final MutableInt slotCount = new MutableInt(); probeTable(pc, leftRowSet, false, leftSources, new LeftProbeHandler(slots, slotCount, foundBuilder)); - return slotCount.intValue(); + return slotCount.get(); } } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedAvgOperator.java index 0b2b88b6b99..431536b49dc 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedAvgOperator.java @@ -75,11 +75,11 @@ public boolean addChunk(ObjectChunk values, long d final BigDecimal chunkSum = SumBigDecimalChunk.sumBigDecimalChunk(values, chunkStart, chunkSize, chunkNonNullCount); - if (chunkNonNullCount.intValue() <= 0) { + if (chunkNonNullCount.get() <= 0) { return false; } - final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNullCount.intValue()); + final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNullCount.get()); final BigDecimal newSum; final BigDecimal oldSum = runningSum.getUnsafe(destination); if (oldSum == null) { @@ -99,11 +99,11 @@ public boolean removeChunk(ObjectChunk values, lon final BigDecimal chunkSum = SumBigDecimalChunk.sumBigDecimalChunk(values, chunkStart, chunkSize, chunkNonNullCount); - if (chunkNonNullCount.intValue() <= 0) { + if (chunkNonNullCount.get() <= 0) { return false; } - final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNullCount.intValue()); + final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNullCount.get()); if (newCount == 0) { resultColumn.set(destination, null); runningSum.set(destination, null); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedSumOperator.java index bab0f315576..327f9535257 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedSumOperator.java @@ -104,7 +104,7 @@ private boolean addChunk(ObjectChunk values, long final MutableInt chunkNonNull = new MutableInt(0); final BigDecimal partialSum = doSum(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } final BigDecimal oldValue = resultColumn.getUnsafe(destination); @@ -112,7 +112,7 @@ private boolean addChunk(ObjectChunk values, long if (changed) { resultColumn.set(destination, plus(oldValue, partialSum)); } - nonNullCount.addNonNullUnsafe(destination, chunkNonNull.intValue()); + nonNullCount.addNonNullUnsafe(destination, chunkNonNull.get()); return changed; } @@ -121,10 +121,10 @@ private boolean removeChunk(ObjectChunk values, lo final MutableInt chunkNonNull = new MutableInt(0); final BigDecimal partialSum = doSum(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } - if (nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.intValue()) == 0) { + if (nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.get()) == 0) { resultColumn.set(destination, null); } else if (partialSum.equals(BigDecimal.ZERO)) { return false; @@ -141,7 +141,7 @@ private boolean modifyChunk(ObjectChunk preValues, final BigDecimal prePartialSum = doSum(preValues, chunkStart, chunkSize, preChunkNonNull); final BigDecimal postPartialSum = doSum(postValues, chunkStart, chunkSize, postChunkNonNull); - final int nullDifference = postChunkNonNull.intValue() - preChunkNonNull.intValue(); + final int nullDifference = postChunkNonNull.get() - preChunkNonNull.get(); if (nullDifference != 0) { final long newNonNull = nonNullCount.addNonNullUnsafe(destination, nullDifference); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedVarOperator.java index f260dd0280e..63c1e26c265 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigDecimalChunkedVarOperator.java @@ -101,13 +101,13 @@ private boolean addChunk(ObjectChunk values, long final BigDecimal sum = SumBigDecimalChunk.sum2BigDecimalChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } final BigDecimal newSum = plus(sumSource.getUnsafe(destination), sum); final BigDecimal newSum2 = plus(sum2Source.getUnsafe(destination), sum2.getValue()); - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.get()); doUpdate(destination, newSum, newSum2, nonNullCount); return true; } @@ -119,13 +119,13 @@ private boolean removeChunk(ObjectChunk values, lo final BigDecimal sum = SumBigDecimalChunk.sum2BigDecimalChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } final BigDecimal newSum = plus(sumSource.getUnsafe(destination), sum.negate()); final BigDecimal newSum2 = plus(sum2Source.getUnsafe(destination), sum2.getValue().negate()); - final long nonNullCount = nonNullCounter.addNonNull(destination, -chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNull(destination, -chunkNonNull.get()); doUpdate(destination, newSum, newSum2, nonNullCount); return true; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedAvgOperator.java index 6a31cb2f28f..61b097b9a1b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedAvgOperator.java @@ -76,11 +76,11 @@ public boolean addChunk(ObjectChunk values, long d final MutableInt chunkNonNull = new MutableInt(0); final BigInteger chunkSum = SumBigIntegerChunk.sumBigIntegerChunk(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } - final long newCount = nonNullCount.addNonNull(destination, chunkNonNull.intValue()); + final long newCount = nonNullCount.addNonNull(destination, chunkNonNull.get()); final BigInteger newSum; final BigInteger oldSum = runningSum.getUnsafe(destination); if (oldSum == null) { @@ -100,11 +100,11 @@ public boolean removeChunk(ObjectChunk values, lon final MutableInt chunkNonNull = new MutableInt(0); final BigInteger chunkSum = SumBigIntegerChunk.sumBigIntegerChunk(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } - final long newCount = nonNullCount.addNonNull(destination, -chunkNonNull.intValue()); + final long newCount = nonNullCount.addNonNull(destination, -chunkNonNull.get()); if (newCount == 0) { resultColumn.set(destination, null); runningSum.set(destination, null); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedSumOperator.java index 9fcca1c30a3..92e948926ae 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedSumOperator.java @@ -104,7 +104,7 @@ private boolean addChunk(ObjectChunk values, long final MutableInt chunkNonNull = new MutableInt(0); final BigInteger partialSum = doSum(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } final BigInteger oldValue = resultColumn.getUnsafe(destination); @@ -112,7 +112,7 @@ private boolean addChunk(ObjectChunk values, long if (changed) { resultColumn.set(destination, plus(oldValue, partialSum)); } - nonNullCount.addNonNullUnsafe(destination, chunkNonNull.intValue()); + nonNullCount.addNonNullUnsafe(destination, chunkNonNull.get()); return changed; } @@ -130,11 +130,11 @@ private boolean removeChunk(ObjectChunk values, lo final MutableInt chunkNonNull = new MutableInt(0); final BigInteger partialSum = doSum(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } - if (nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.intValue()) == 0) { + if (nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.get()) == 0) { resultColumn.set(destination, null); } else if (partialSum.equals(BigInteger.ZERO)) { return false; @@ -152,7 +152,7 @@ private boolean modifyChunk(ObjectChunk preValues, final BigInteger prePartialSum = doSum(preValues, chunkStart, chunkSize, preChunkNonNull); final BigInteger postPartialSum = doSum(postValues, chunkStart, chunkSize, postChunkNonNull); - final int nullDifference = postChunkNonNull.intValue() - preChunkNonNull.intValue(); + final int nullDifference = postChunkNonNull.get() - preChunkNonNull.get(); if (nullDifference != 0) { final long newNonNull = nonNullCount.addNonNullUnsafe(destination, nullDifference); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedVarOperator.java index 6a31afc0f88..18ce4cf2246 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BigIntegerChunkedVarOperator.java @@ -101,10 +101,10 @@ private boolean addChunk(ObjectChunk values, long final MutableInt chunkNonNull = new MutableInt(0); final BigInteger sum = SumBigIntegerChunk.sum2BigIntegerChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.get()); final BigInteger newSum = plus(sumSource.getUnsafe(destination), sum); final BigInteger newSum2 = plus(sum2Source.getUnsafe(destination), sum2.getValue()); @@ -119,10 +119,10 @@ private boolean removeChunk(ObjectChunk values, lo final BigInteger sum = SumBigIntegerChunk.sum2BigIntegerChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() <= 0) { + if (chunkNonNull.get() <= 0) { return false; } - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.get()); final BigInteger newSum = plus(sumSource.getUnsafe(destination), sum.negate()); final BigInteger newSum2 = plus(sum2Source.getUnsafe(destination), sum2.getValue().negate()); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedAddOnlyMinMaxOperator.java index 50df394bdc3..5e27f35c394 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedAddOnlyMinMaxOperator.java @@ -44,7 +44,7 @@ private Boolean min(ObjectChunk values, MutableInt chunkNonNull, int } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -61,7 +61,7 @@ private Boolean max(ObjectChunk values, MutableInt chunkNonNull, int } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -115,7 +115,7 @@ private boolean addChunk(ObjectChunk values, long des final int chunkEnd = chunkStart + chunkSize; final Boolean chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedSumOperator.java index d5c9a8c04d6..c278713404b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/BooleanChunkedSumOperator.java @@ -174,13 +174,13 @@ private boolean addChunk(ObjectChunk values, long des sumChunk(values, chunkStart, chunkSize, chunkTrue, chunkFalse); boolean modified = false; - if (chunkTrue.intValue() > 0) { - getAndAdd(resultColumn, destination, chunkTrue.intValue()); + if (chunkTrue.get() > 0) { + getAndAdd(resultColumn, destination, chunkTrue.get()); modified = true; } - if (chunkFalse.intValue() > 0) { - final long oldFalseCount = getAndAdd(falseCount, destination, chunkFalse.intValue()); - if (oldFalseCount == 0 && chunkTrue.intValue() == 0 && !hasTrue(destination)) { + if (chunkFalse.get() > 0) { + final long oldFalseCount = getAndAdd(falseCount, destination, chunkFalse.get()); + if (oldFalseCount == 0 && chunkTrue.get() == 0 && !hasTrue(destination)) { resultColumn.set(destination, 0L); modified = true; } @@ -197,14 +197,14 @@ private boolean removeChunk(ObjectChunk values, long sumChunk(values, chunkStart, chunkSize, chunkTrue, chunkFalse); long newFalseCount = INVALID_COUNT; - if (chunkFalse.intValue() > 0) { - newFalseCount = addAndGet(falseCount, destination, -chunkFalse.intValue()); + if (chunkFalse.get() > 0) { + newFalseCount = addAndGet(falseCount, destination, -chunkFalse.get()); } - if (chunkTrue.intValue() > 0) { + if (chunkTrue.get() > 0) { final long oldTrueCount = resultColumn.getUnsafe(destination); Assert.gtZero(oldTrueCount, "oldTrueCount"); - long newTrue = oldTrueCount - chunkTrue.intValue(); + long newTrue = oldTrueCount - chunkTrue.get(); if (newTrue == 0) { if (newFalseCount == INVALID_COUNT) { newFalseCount = falseCount.getUnsafe(destination); @@ -235,8 +235,8 @@ private boolean modifyChunk(ObjectChunk preValues, final MutableInt postChunkFalse = new MutableInt(0); sumChunk(postValues, chunkStart, chunkSize, postChunkTrue, postChunkFalse); - final boolean trueModified = preChunkTrue.intValue() != postChunkTrue.intValue(); - final boolean falseModified = preChunkFalse.intValue() != postChunkFalse.intValue(); + final boolean trueModified = preChunkTrue.get() != postChunkTrue.get(); + final boolean falseModified = preChunkFalse.get() != postChunkFalse.get(); if (!trueModified && !falseModified) { return false; @@ -244,12 +244,12 @@ private boolean modifyChunk(ObjectChunk preValues, long newFalseCount = INVALID_COUNT; if (falseModified) { - newFalseCount = addAndGet(falseCount, destination, postChunkFalse.intValue() - preChunkFalse.intValue()); + newFalseCount = addAndGet(falseCount, destination, postChunkFalse.get() - preChunkFalse.get()); } if (trueModified) { final long oldTrueCount = resultColumn.getUnsafe(destination); - long newTrueCount = plusLong(oldTrueCount, postChunkTrue.intValue() - preChunkTrue.intValue()); + long newTrueCount = plusLong(oldTrueCount, postChunkTrue.get() - preChunkTrue.get()); if (newTrueCount == 0) { if (newFalseCount == INVALID_COUNT) { newFalseCount = falseCount.getUnsafe(destination); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAddOnlyMinMaxOperator.java index f0b0f2bb57d..cc4a305a351 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAddOnlyMinMaxOperator.java @@ -55,7 +55,7 @@ private byte min(ByteChunk values, MutableInt chunkNonNull, int chunkStart, i } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -72,7 +72,7 @@ private byte max(ByteChunk values, MutableInt chunkNonNull, int chunkStart, i } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -139,7 +139,7 @@ private boolean addChunk(ByteChunk values, long destination, i final int chunkEnd = chunkStart + chunkSize; final byte chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAvgOperator.java index 8254533b1d7..ac8a08af83c 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedAvgOperator.java @@ -86,8 +86,8 @@ private boolean addChunk(ByteChunk values, long destination, i final ByteChunk asByteChunk = values.asByteChunk(); final long chunkSum = SumByteChunk.sumByteChunk(asByteChunk, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() > 0) { - final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.get()); final long newSum = plusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); @@ -103,11 +103,11 @@ private boolean removeChunk(ByteChunk values, long destination final MutableInt chunkNonNull = new MutableInt(0); final long chunkSum = SumByteChunk.sumByteChunk(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.get()); final long newSum = minusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedSumOperator.java index 201a0a1c61c..42ff2ed1a55 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedSumOperator.java @@ -81,7 +81,7 @@ public boolean removeChunk(SingletonContext context, int chunkSize, Chunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, sum, nonNullCount.intValue()); + return updateInternal(destination, sum, nonNullCount.get()); } @Override @@ -111,13 +111,13 @@ private boolean modifyChunk(ByteChunk oldValues, ByteChunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, -sum, -nonNullCount.intValue()); + return updateInternal(destination, -sum, -nonNullCount.get()); } private long doSum(int chunkStart, int chunkSize, MutableInt nonNullCount, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedVarOperator.java index 60b789226bb..bedc7465bb8 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ByteChunkedVarOperator.java @@ -85,8 +85,8 @@ private boolean addChunk(ByteChunk values, long destination, i final MutableInt chunkNonNull = new MutableInt(); final double sum = SumByteChunk.sum2ByteChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() > 0) { - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.get()); final double newSum = plusDouble(sumSource.getUnsafe(destination), sum); final double newSum2 = plusDouble(sum2Source.getUnsafe(destination), sum2.doubleValue()); @@ -110,11 +110,11 @@ private boolean removeChunk(ByteChunk values, long destination final MutableInt chunkNonNull = new MutableInt(); final double sum = SumByteChunk.sum2ByteChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.get()); final double newSum; final double newSum2; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAddOnlyMinMaxOperator.java index 2d43871d99e..f1b769c73c9 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAddOnlyMinMaxOperator.java @@ -51,7 +51,7 @@ private char min(CharChunk values, MutableInt chunkNonNull, int chunkStart, i } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -68,7 +68,7 @@ private char max(CharChunk values, MutableInt chunkNonNull, int chunkStart, i } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -135,7 +135,7 @@ private boolean addChunk(CharChunk values, long destination, i final int chunkEnd = chunkStart + chunkSize; final char chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAvgOperator.java index 273f41745c1..130c588f20e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedAvgOperator.java @@ -82,8 +82,8 @@ private boolean addChunk(CharChunk values, long destination, i final CharChunk asCharChunk = values.asCharChunk(); final long chunkSum = SumCharChunk.sumCharChunk(asCharChunk, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() > 0) { - final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.get()); final long newSum = plusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); @@ -99,11 +99,11 @@ private boolean removeChunk(CharChunk values, long destination final MutableInt chunkNonNull = new MutableInt(0); final long chunkSum = SumCharChunk.sumCharChunk(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.get()); final long newSum = minusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedSumOperator.java index 411a60127c0..d88b3992c23 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedSumOperator.java @@ -77,7 +77,7 @@ public boolean removeChunk(SingletonContext context, int chunkSize, Chunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, sum, nonNullCount.intValue()); + return updateInternal(destination, sum, nonNullCount.get()); } @Override @@ -107,13 +107,13 @@ private boolean modifyChunk(CharChunk oldValues, CharChunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, -sum, -nonNullCount.intValue()); + return updateInternal(destination, -sum, -nonNullCount.get()); } private long doSum(int chunkStart, int chunkSize, MutableInt nonNullCount, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedVarOperator.java index 34268a2de70..bb653cce70e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CharChunkedVarOperator.java @@ -81,8 +81,8 @@ private boolean addChunk(CharChunk values, long destination, i final MutableInt chunkNonNull = new MutableInt(); final double sum = SumCharChunk.sum2CharChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() > 0) { - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.get()); final double newSum = plusDouble(sumSource.getUnsafe(destination), sum); final double newSum2 = plusDouble(sum2Source.getUnsafe(destination), sum2.doubleValue()); @@ -106,11 +106,11 @@ private boolean removeChunk(CharChunk values, long destination final MutableInt chunkNonNull = new MutableInt(); final double sum = SumCharChunk.sum2CharChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.get()); final double newSum; final double newSum2; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedOperatorAggregationHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedOperatorAggregationHelper.java index af2d4065f47..bb0c7280fee 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedOperatorAggregationHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedOperatorAggregationHelper.java @@ -221,7 +221,7 @@ private static QueryTable aggregation( keyColumnsRaw[kci] = resultKeyColumnSource; if (input.isRefreshing()) { // noinspection ConstantConditions,unchecked - keyColumnsCopied[kci] = ArrayBackedColumnSource.getMemoryColumnSource(outputPosition.intValue(), + keyColumnsCopied[kci] = ArrayBackedColumnSource.getMemoryColumnSource(outputPosition.get(), keyColumnsRaw[kci].getType()); resultColumnSourceMap.put(keyNames[kci], keyColumnsCopied[kci]); } else { @@ -232,7 +232,7 @@ private static QueryTable aggregation( @SuppressWarnings("resource") final TrackingWritableRowSet resultRowSet = (initialRowsBuilder == null - ? RowSetFactory.flat(outputPosition.intValue()) + ? RowSetFactory.flat(outputPosition.get()) : initialRowsBuilder.build()).toTracking(); if (input.isRefreshing()) { copyKeyColumns(keyColumnsRaw, keyColumnsCopied, resultRowSet); @@ -240,7 +240,7 @@ private static QueryTable aggregation( // Construct the result table final QueryTable result = new QueryTable(resultRowSet, resultColumnSourceMap); - ac.propagateInitialStateToOperators(result, outputPosition.intValue()); + ac.propagateInitialStateToOperators(result, outputPosition.get()); if (snapshotControl != null) { assert keyColumnsCopied != null; @@ -467,7 +467,7 @@ private KeyedUpdateContext(@NotNull final AggregationContext ac, reincarnatedStatesBuilder = new EmptyRandomBuilder(); emptiedStatesBuilder = new EmptyRandomBuilder(); } - modifiedStatesBuilder = new BitmapRandomBuilder(outputPosition.intValue()); + modifiedStatesBuilder = new BitmapRandomBuilder(outputPosition.get()); modifiedOperators = new boolean[ac.size()]; toClose = new SafeCloseableList(); @@ -546,7 +546,7 @@ private TableUpdate computeDownstreamIndicesAndCopyKeys( @NotNull final WritableColumnSource[] keyColumnsCopied, @NotNull final ModifiedColumnSet resultModifiedColumnSet, @NotNull final UnaryOperator[] resultModifiedColumnSetFactories) { - final int firstStateToAdd = outputPosition.intValue(); + final int firstStateToAdd = outputPosition.get(); ac.resetOperatorsForStep(upstream, firstStateToAdd); if (upstream.removed().isNonempty()) { @@ -644,7 +644,7 @@ private TableUpdate computeDownstreamIndicesAndCopyKeys( final TableUpdateImpl downstream = new TableUpdateImpl(); downstream.shifted = RowSetShiftData.EMPTY; - try (final RowSet newStates = makeNewStatesRowSet(firstStateToAdd, outputPosition.intValue() - 1)) { + try (final RowSet newStates = makeNewStatesRowSet(firstStateToAdd, outputPosition.get() - 1)) { downstream.added = reincarnatedStatesBuilder.build(); downstream.removed = emptiedStatesBuilder.build(); @@ -775,7 +775,7 @@ private void doInsertsForChunk(@NotNull final RowSequence keyIndicesToInsertChun private void propagateInsertsToOperators(@NotNull final RowSequence keyIndicesToInsertChunk, @NotNull final WritableIntChunk slotsToAddTo) { - ac.ensureCapacity(outputPosition.intValue()); + ac.ensureCapacity(outputPosition.get()); final boolean permute = findSlotRuns(sortKernelContext, hashedRunContext, runStarts, runLengths, chunkPositions, slotsToAddTo, @@ -1791,7 +1791,7 @@ private static OperatorAggregationStateManager initialKeyTableAddition( } try (final RowSet empty = RowSetFactory.empty()) { - doIndexedAddition(ac, () -> empty, outputPosition.intValue(), 0); + doIndexedAddition(ac, () -> empty, outputPosition.get(), 0); } return stateManager; } @@ -1803,7 +1803,7 @@ private static OperatorAggregationStateManager makeInitializedStateManager( @NotNull final MutableInt outputPosition, @NotNull final Supplier stateManagerSupplier, final boolean usePrev) { - outputPosition.setValue(0); + outputPosition.set(0); final OperatorAggregationStateManager stateManager = stateManagerSupplier.get(); if (initialKeys.isEmpty()) { @@ -1895,7 +1895,7 @@ private static void initialBucketedKeyAddition(QueryTable input, initialRowsBuilder.addRowKeysChunk(outputPositions); } - ac.ensureCapacity(outputPosition.intValue()); + ac.ensureCapacity(outputPosition.get()); final boolean permute = findSlotRuns(sortKernelContext, hashedRunContext, runStarts, runLengths, chunkPosition, outputPositions, @@ -1981,7 +1981,7 @@ private static void initialIndexedKeyAddition( initialRowsBuilder.addRowKeysChunk(outputPositions); } } - Assert.eq(outputPosition.intValue(), "outputPosition.intValue()", indexEntryCount, "indexEntryCount"); + Assert.eq(outputPosition.get(), "outputPosition.intValue()", indexEntryCount, "indexEntryCount"); } try (final CloseableIterator groupRowSetIterator = diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedWeightedAverageOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedWeightedAverageOperator.java index a5d4e377d06..1f370a40411 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedWeightedAverageOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ChunkedWeightedAverageOperator.java @@ -170,8 +170,8 @@ private static void sumChunks(DoubleChunk doubleValues, weightedSum += weight * component; } - nansOut.setValue(nans); - normalOut.setValue(normal); + nansOut.set(nans); + normalOut.set(normal); sumOfWeightsOut.setValue(sumOfWeights); weightedSumOut.setValue(weightedSum); } @@ -185,8 +185,8 @@ private boolean addChunk(DoubleChunk doubleValues, DoubleChunk sumChunks(doubleValues, weightValues, start, length, nanOut, normalOut, sumOfWeightsOut, weightedSumOut); - final int newNans = nanOut.intValue(); - final int newNormal = normalOut.intValue(); + final int newNans = nanOut.get(); + final int newNormal = normalOut.get(); final double newSumOfWeights = sumOfWeightsOut.doubleValue(); final double newWeightedSum = weightedSumOut.doubleValue(); @@ -259,8 +259,8 @@ private boolean removeChunk(DoubleChunk doubleValues, DoubleCh sumChunks(doubleValues, weightValues, start, length, nanOut, normalOut, sumOfWeightsOut, weightedSumOut); - final int newNans = nanOut.intValue(); - final int newNormal = normalOut.intValue(); + final int newNans = nanOut.get(); + final int newNormal = normalOut.get(); final double newSumOfWeights = sumOfWeightsOut.doubleValue(); final double newWeightedSum = weightedSumOut.doubleValue(); @@ -331,15 +331,15 @@ private boolean modifyChunk(DoubleChunk prevDoubleValues, sumChunks(prevDoubleValues, prevWeightValues, start, length, nanOut, normalOut, sumOfWeightsOut, weightedSumOut); - final int prevNans = nanOut.intValue(); - final int prevNormal = normalOut.intValue(); + final int prevNans = nanOut.get(); + final int prevNormal = normalOut.get(); final double prevSumOfWeights = sumOfWeightsOut.doubleValue(); final double prevWeightedSum = weightedSumOut.doubleValue(); sumChunks(newDoubleValues, newWeightValues, start, length, nanOut, normalOut, sumOfWeightsOut, weightedSumOut); - final int newNans = nanOut.intValue(); - final int newNormal = normalOut.intValue(); + final int newNans = nanOut.get(); + final int newNormal = normalOut.get(); final double newSumOfWeights = sumOfWeightsOut.doubleValue(); final double newWeightedSum = weightedSumOut.doubleValue(); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAddOnlyMinMaxOperator.java index a6333a0a8ee..08d80ba706b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAddOnlyMinMaxOperator.java @@ -55,7 +55,7 @@ private double min(DoubleChunk values, MutableInt chunkNonNull, int chunkStar } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -72,7 +72,7 @@ private double max(DoubleChunk values, MutableInt chunkNonNull, int chunkStar } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -139,7 +139,7 @@ private boolean addChunk(DoubleChunk values, long destination, final int chunkEnd = chunkStart + chunkSize; final double chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAvgOperator.java index 67e43f7d3f4..15666e608e0 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedAvgOperator.java @@ -82,13 +82,13 @@ private boolean addChunk(DoubleChunk values, long destination, final double sum = SumDoubleChunk.sumDoubleChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - final long totalNormal = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.intValue()); - final long totalNanCount = updateNanCount(destination, chunkNanCount.intValue()); - final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.intValue()); + final long totalNormal = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.get()); + final long totalNanCount = updateNanCount(destination, chunkNanCount.get()); + final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, chunkMinusInfinityCount.get()); - if (chunkNormalCount.intValue() > 0) { + if (chunkNormalCount.get() > 0) { final double newSum = plusDouble(runningSum.getUnsafe(destination), sum); runningSum.set(destination, newSum); updateResultWithNewSum(destination, totalNormal, totalNanCount, totalPositiveInfinityCount, @@ -108,20 +108,20 @@ private boolean removeChunk(DoubleChunk values, long destinati final double sum = SumDoubleChunk.sumDoubleChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - if (chunkNormalCount.intValue() == 0 && chunkNanCount.intValue() == 0 && chunkInfinityCount.intValue() == 0 - && chunkMinusInfinityCount.intValue() == 0) { + if (chunkNormalCount.get() == 0 && chunkNanCount.get() == 0 && chunkInfinityCount.get() == 0 + && chunkMinusInfinityCount.get() == 0) { return false; } - final long totalNormal = nonNullCounter.addNonNull(destination, -chunkNormalCount.intValue()); - final long totalNanCount = updateNanCount(destination, -chunkNanCount.intValue()); + final long totalNormal = nonNullCounter.addNonNull(destination, -chunkNormalCount.get()); + final long totalNanCount = updateNanCount(destination, -chunkNanCount.get()); final long totalPositiveInfinityCount = - updatePositiveInfinityCount(destination, -chunkInfinityCount.intValue()); + updatePositiveInfinityCount(destination, -chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.get()); final double newSum; - if (chunkNormalCount.intValue() > 0) { + if (chunkNormalCount.get() > 0) { newSum = plusDouble(runningSum.getUnsafe(destination), -sum); runningSum.set(destination, newSum); updateResultWithNewSum(destination, totalNormal, totalNanCount, totalPositiveInfinityCount, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedSumOperator.java index 4dba6c7edd7..e21cbbd205d 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedSumOperator.java @@ -18,7 +18,6 @@ import io.deephaven.engine.util.NullSafeAddition; import io.deephaven.engine.table.ColumnSource; import io.deephaven.engine.table.impl.sources.DoubleArraySource; -import io.deephaven.engine.table.impl.sources.DoubleArraySource; import io.deephaven.chunk.*; import io.deephaven.engine.rowset.RowSequence; import io.deephaven.util.mutable.MutableInt; @@ -114,19 +113,19 @@ private boolean addChunk(DoubleChunk values, long destination, final double sum = doSum(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - final long totalNanCount = updateNanCount(destination, chunkNanCount.intValue()); - final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.intValue()); + final long totalNanCount = updateNanCount(destination, chunkNanCount.get()); + final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, chunkMinusInfinityCount.get()); - if (chunkNormalCount.intValue() > 0) { - final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, chunkNormalCount.intValue()); + if (chunkNormalCount.get() > 0) { + final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, chunkNormalCount.get()); final double newSum = NullSafeAddition.plusDouble(runningSum.getUnsafe(destination), sum); runningSum.set(destination, newSum); resultColumn.set(destination, currentValueWithSum(totalNormalCount, totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount, newSum)); - } else if (chunkNanCount.intValue() > 0 || chunkInfinityCount.intValue() > 0 - || chunkMinusInfinityCount.intValue() > 0) { + } else if (chunkNanCount.get() > 0 || chunkInfinityCount.get() > 0 + || chunkMinusInfinityCount.get() > 0) { resultColumn.set(destination, currentValueNoSum(totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount)); } @@ -144,14 +143,14 @@ private boolean removeChunk(DoubleChunk values, long destinati final double sum = doSum(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - final long totalNanCount = updateNanCount(destination, -chunkNanCount.intValue()); + final long totalNanCount = updateNanCount(destination, -chunkNanCount.get()); final long totalPositiveInfinityCount = - updatePositiveInfinityCount(destination, -chunkInfinityCount.intValue()); + updatePositiveInfinityCount(destination, -chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.get()); - if (chunkNormalCount.intValue() > 0) { - final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, -chunkNormalCount.intValue()); + if (chunkNormalCount.get() > 0) { + final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, -chunkNormalCount.get()); final double newSum; if (totalNormalCount == 0) { newSum = 0; @@ -163,8 +162,8 @@ private boolean removeChunk(DoubleChunk values, long destinati resultColumn.set(destination, currentValueWithSum(totalNormalCount, totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount, newSum)); return true; - } else if (chunkNanCount.intValue() > 0 || chunkInfinityCount.intValue() > 0 - || chunkMinusInfinityCount.intValue() > 0) { + } else if (chunkNanCount.get() > 0 || chunkInfinityCount.get() > 0 + || chunkMinusInfinityCount.get() > 0) { // if we can still determine what our result is based just on the nans and infinities, use it final double possibleResult = currentValueNoSum(totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount); @@ -204,11 +203,11 @@ private boolean modifyChunk(DoubleChunk preValues, DoubleChunk final double postSum = doSum(postValues, chunkStart, chunkSize, postChunkNormalCount, postChunkNanCount, postChunkInfinityCount, postChunkMinusInfinityCount); - final boolean normalCountChange = preChunkNormalCount.intValue() != postChunkNormalCount.intValue(); - final boolean nanChange = preChunkNanCount.intValue() != postChunkNanCount.intValue(); - final boolean posInfinityChange = preChunkInfinityCount.intValue() != postChunkInfinityCount.intValue(); + final boolean normalCountChange = preChunkNormalCount.get() != postChunkNormalCount.get(); + final boolean nanChange = preChunkNanCount.get() != postChunkNanCount.get(); + final boolean posInfinityChange = preChunkInfinityCount.get() != postChunkInfinityCount.get(); final boolean negInfinityChange = - preChunkMinusInfinityCount.intValue() != postChunkMinusInfinityCount.intValue(); + preChunkMinusInfinityCount.get() != postChunkMinusInfinityCount.get(); final boolean unchangedResult = !nanChange && // The number of NaNs stayed the same !posInfinityChange && // The number of +inf stayed the same @@ -220,7 +219,7 @@ private boolean modifyChunk(DoubleChunk preValues, DoubleChunk final long totalNormalCount; if (normalCountChange) { totalNormalCount = nonNullCount.addNonNullUnsafe(destination, - postChunkNormalCount.intValue() - preChunkNormalCount.intValue()); + postChunkNormalCount.get() - preChunkNormalCount.get()); if (totalNormalCount == 0 || preUpdateNonNullCount == 0) { changedToSingleValueOrEmpty = true; @@ -233,11 +232,11 @@ private boolean modifyChunk(DoubleChunk preValues, DoubleChunk } final long totalNanCount = - updateNanCount(destination, preChunkNanCount.intValue(), postChunkNanCount.intValue()); + updateNanCount(destination, preChunkNanCount.get(), postChunkNanCount.get()); final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, - preChunkInfinityCount.intValue(), postChunkInfinityCount.intValue()); + preChunkInfinityCount.get(), postChunkInfinityCount.get()); final long totalNegativeInfinityCount = updateNegativeInfinityCount(destination, - preChunkMinusInfinityCount.intValue(), postChunkMinusInfinityCount.intValue()); + preChunkMinusInfinityCount.get(), postChunkMinusInfinityCount.get()); final double possibleResult = currentValueNoSum(totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedVarOperator.java index 8d9bea22a53..db5991d75e4 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedVarOperator.java @@ -89,13 +89,13 @@ private boolean addChunk(DoubleChunk values, long destination, final double sum = SumDoubleChunk.sum2DoubleChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinity, sum2); - final long totalPositiveInfinities = updatePositiveInfinityCount(destination, chunkInfinityCount.intValue()); - final long totalNegativeInfinities = updateNegativeInfinityCount(destination, chunkMinusInfinity.intValue()); - final long totalNanCount = updateNanCount(destination, chunkNanCount.intValue()); + final long totalPositiveInfinities = updatePositiveInfinityCount(destination, chunkInfinityCount.get()); + final long totalNegativeInfinities = updateNegativeInfinityCount(destination, chunkMinusInfinity.get()); + final long totalNanCount = updateNanCount(destination, chunkNanCount.get()); final boolean forceNanResult = totalNegativeInfinities > 0 || totalPositiveInfinities > 0 || totalNanCount > 0; - if (chunkNormalCount.intValue() > 0) { - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.intValue()); + if (chunkNormalCount.get() > 0) { + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.get()); final double newSum = NullSafeAddition.plusDouble(sumSource.getUnsafe(destination), sum); final double newSum2 = NullSafeAddition.plusDouble(sum2Source.getUnsafe(destination), sum2.doubleValue()); @@ -143,20 +143,20 @@ private boolean removeChunk(DoubleChunk values, long destinati final double sum = SumDoubleChunk.sum2DoubleChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinity, sum2); - if (chunkNormalCount.intValue() == 0 && chunkNanCount.intValue() == 0 && chunkInfinityCount.intValue() == 0 - && chunkMinusInfinity.intValue() == 0) { + if (chunkNormalCount.get() == 0 && chunkNanCount.get() == 0 && chunkInfinityCount.get() == 0 + && chunkMinusInfinity.get() == 0) { return false; } - final long totalPositiveInfinities = updatePositiveInfinityCount(destination, -chunkInfinityCount.intValue()); - final long totalNegativeInfinities = updateNegativeInfinityCount(destination, -chunkMinusInfinity.intValue()); - final long totalNanCount = updateNanCount(destination, -chunkNanCount.intValue()); + final long totalPositiveInfinities = updatePositiveInfinityCount(destination, -chunkInfinityCount.get()); + final long totalNegativeInfinities = updateNegativeInfinityCount(destination, -chunkMinusInfinity.get()); + final long totalNanCount = updateNanCount(destination, -chunkNanCount.get()); final boolean forceNanResult = totalNegativeInfinities > 0 || totalPositiveInfinities > 0 || totalNanCount > 0; - final long totalNormalCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNormalCount.intValue()); + final long totalNormalCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNormalCount.get()); final double newSum, newSum2; - if (chunkNormalCount.intValue() > 0) { + if (chunkNormalCount.get() > 0) { if (totalNormalCount > 0) { newSum = NullSafeAddition.plusDouble(sumSource.getUnsafe(destination), -sum); newSum2 = NullSafeAddition.plusDouble(sum2Source.getUnsafe(destination), -sum2.doubleValue()); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedWeightedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedWeightedSumOperator.java index 87e312ec3e1..722c468ea05 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedWeightedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/DoubleChunkedWeightedSumOperator.java @@ -158,8 +158,8 @@ private static void sumChunks(DoubleChunk doubleValues, weightedSum += weight * component; } - nansOut.setValue(nans); - normalOut.setValue(normal); + nansOut.set(nans); + normalOut.set(normal); weightedSumOut.setValue(weightedSum); } @@ -171,8 +171,8 @@ private boolean addChunk(DoubleChunk doubleValues, DoubleChunk sumChunks(doubleValues, weightValues, start, length, nanOut, normalOut, weightedSumOut); - final int newNans = nanOut.intValue(); - final int newNormal = normalOut.intValue(); + final int newNans = nanOut.get(); + final int newNormal = normalOut.get(); final double newWeightedSum = weightedSumOut.doubleValue(); final long totalNans; @@ -238,8 +238,8 @@ private boolean removeChunk(DoubleChunk doubleValues, DoubleCh sumChunks(doubleValues, weightValues, start, length, nanOut, normalOut, weightedSumOut); - final int newNans = nanOut.intValue(); - final int newNormal = normalOut.intValue(); + final int newNans = nanOut.get(); + final int newNormal = normalOut.get(); final double newWeightedSum = weightedSumOut.doubleValue(); final long totalNans; @@ -300,14 +300,14 @@ private boolean modifyChunk(DoubleChunk prevDoubleValues, sumChunks(prevDoubleValues, prevWeightValues, start, length, nanOut, normalOut, weightedSumOut); - final int prevNans = nanOut.intValue(); - final int prevNormal = normalOut.intValue(); + final int prevNans = nanOut.get(); + final int prevNormal = normalOut.get(); final double prevWeightedSum = weightedSumOut.doubleValue(); sumChunks(newDoubleValues, newWeightValues, start, length, nanOut, normalOut, weightedSumOut); - final int newNans = nanOut.intValue(); - final int newNormal = normalOut.intValue(); + final int newNans = nanOut.get(); + final int newNormal = normalOut.get(); final double newWeightedSum = weightedSumOut.doubleValue(); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAddOnlyMinMaxOperator.java index 702a49375c4..62414826f79 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAddOnlyMinMaxOperator.java @@ -55,7 +55,7 @@ private float min(FloatChunk values, MutableInt chunkNonNull, int chunkStart, } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -72,7 +72,7 @@ private float max(FloatChunk values, MutableInt chunkNonNull, int chunkStart, } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -139,7 +139,7 @@ private boolean addChunk(FloatChunk values, long destination, final int chunkEnd = chunkStart + chunkSize; final float chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAvgOperator.java index 2257c861892..f227389aa6b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedAvgOperator.java @@ -78,13 +78,13 @@ private boolean addChunk(FloatChunk values, long destination, final double sum = SumFloatChunk.sumFloatChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - final long totalNormal = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.intValue()); - final long totalNanCount = updateNanCount(destination, chunkNanCount.intValue()); - final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.intValue()); + final long totalNormal = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.get()); + final long totalNanCount = updateNanCount(destination, chunkNanCount.get()); + final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, chunkMinusInfinityCount.get()); - if (chunkNormalCount.intValue() > 0) { + if (chunkNormalCount.get() > 0) { final double newSum = plusDouble(runningSum.getUnsafe(destination), sum); runningSum.set(destination, newSum); updateResultWithNewSum(destination, totalNormal, totalNanCount, totalPositiveInfinityCount, @@ -104,20 +104,20 @@ private boolean removeChunk(FloatChunk values, long destinatio final double sum = SumFloatChunk.sumFloatChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - if (chunkNormalCount.intValue() == 0 && chunkNanCount.intValue() == 0 && chunkInfinityCount.intValue() == 0 - && chunkMinusInfinityCount.intValue() == 0) { + if (chunkNormalCount.get() == 0 && chunkNanCount.get() == 0 && chunkInfinityCount.get() == 0 + && chunkMinusInfinityCount.get() == 0) { return false; } - final long totalNormal = nonNullCounter.addNonNull(destination, -chunkNormalCount.intValue()); - final long totalNanCount = updateNanCount(destination, -chunkNanCount.intValue()); + final long totalNormal = nonNullCounter.addNonNull(destination, -chunkNormalCount.get()); + final long totalNanCount = updateNanCount(destination, -chunkNanCount.get()); final long totalPositiveInfinityCount = - updatePositiveInfinityCount(destination, -chunkInfinityCount.intValue()); + updatePositiveInfinityCount(destination, -chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.get()); final double newSum; - if (chunkNormalCount.intValue() > 0) { + if (chunkNormalCount.get() > 0) { newSum = plusDouble(runningSum.getUnsafe(destination), -sum); runningSum.set(destination, newSum); updateResultWithNewSum(destination, totalNormal, totalNanCount, totalPositiveInfinityCount, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedSumOperator.java index efd57dc030f..d340c538e39 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/FloatChunkedSumOperator.java @@ -110,19 +110,19 @@ private boolean addChunk(FloatChunk values, long destination, final double sum = doSum(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - final long totalNanCount = updateNanCount(destination, chunkNanCount.intValue()); - final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.intValue()); + final long totalNanCount = updateNanCount(destination, chunkNanCount.get()); + final long totalPositiveInfinityCount = updatePositiveInfinityCount(destination, chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, chunkMinusInfinityCount.get()); - if (chunkNormalCount.intValue() > 0) { - final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, chunkNormalCount.intValue()); + if (chunkNormalCount.get() > 0) { + final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, chunkNormalCount.get()); final double newSum = NullSafeAddition.plusDouble(runningSum.getUnsafe(destination), sum); runningSum.set(destination, newSum); resultColumn.set(destination, currentValueWithSum(totalNormalCount, totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount, newSum)); - } else if (chunkNanCount.intValue() > 0 || chunkInfinityCount.intValue() > 0 - || chunkMinusInfinityCount.intValue() > 0) { + } else if (chunkNanCount.get() > 0 || chunkInfinityCount.get() > 0 + || chunkMinusInfinityCount.get() > 0) { resultColumn.set(destination, currentValueNoSum(totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount)); } @@ -140,14 +140,14 @@ private boolean removeChunk(FloatChunk values, long destinatio final double sum = doSum(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinityCount); - final long totalNanCount = updateNanCount(destination, -chunkNanCount.intValue()); + final long totalNanCount = updateNanCount(destination, -chunkNanCount.get()); final long totalPositiveInfinityCount = - updatePositiveInfinityCount(destination, -chunkInfinityCount.intValue()); + updatePositiveInfinityCount(destination, -chunkInfinityCount.get()); final long totalNegativeInfinityCount = - updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.intValue()); + updateNegativeInfinityCount(destination, -chunkMinusInfinityCount.get()); - if (chunkNormalCount.intValue() > 0) { - final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, -chunkNormalCount.intValue()); + if (chunkNormalCount.get() > 0) { + final long totalNormalCount = nonNullCount.addNonNullUnsafe(destination, -chunkNormalCount.get()); final double newSum; if (totalNormalCount == 0) { newSum = 0; @@ -159,8 +159,8 @@ private boolean removeChunk(FloatChunk values, long destinatio resultColumn.set(destination, currentValueWithSum(totalNormalCount, totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount, newSum)); return true; - } else if (chunkNanCount.intValue() > 0 || chunkInfinityCount.intValue() > 0 - || chunkMinusInfinityCount.intValue() > 0) { + } else if (chunkNanCount.get() > 0 || chunkInfinityCount.get() > 0 + || chunkMinusInfinityCount.get() > 0) { // if we can still determine what our result is based just on the nans and infinities, use it final float possibleResult = currentValueNoSum(totalNanCount, totalPositiveInfinityCount, totalNegativeInfinityCount); @@ -200,11 +200,11 @@ private boolean modifyChunk(FloatChunk preValues, FloatChunk preValues, FloatChunk preValues, FloatChunk values, long destination, final double sum = SumFloatChunk.sum2FloatChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinity, sum2); - final long totalPositiveInfinities = updatePositiveInfinityCount(destination, chunkInfinityCount.intValue()); - final long totalNegativeInfinities = updateNegativeInfinityCount(destination, chunkMinusInfinity.intValue()); - final long totalNanCount = updateNanCount(destination, chunkNanCount.intValue()); + final long totalPositiveInfinities = updatePositiveInfinityCount(destination, chunkInfinityCount.get()); + final long totalNegativeInfinities = updateNegativeInfinityCount(destination, chunkMinusInfinity.get()); + final long totalNanCount = updateNanCount(destination, chunkNanCount.get()); final boolean forceNanResult = totalNegativeInfinities > 0 || totalPositiveInfinities > 0 || totalNanCount > 0; - if (chunkNormalCount.intValue() > 0) { - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.intValue()); + if (chunkNormalCount.get() > 0) { + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNormalCount.get()); final double newSum = NullSafeAddition.plusDouble(sumSource.getUnsafe(destination), sum); final double newSum2 = NullSafeAddition.plusDouble(sum2Source.getUnsafe(destination), sum2.doubleValue()); @@ -139,20 +139,20 @@ private boolean removeChunk(FloatChunk values, long destinatio final double sum = SumFloatChunk.sum2FloatChunk(values, chunkStart, chunkSize, chunkNormalCount, chunkNanCount, chunkInfinityCount, chunkMinusInfinity, sum2); - if (chunkNormalCount.intValue() == 0 && chunkNanCount.intValue() == 0 && chunkInfinityCount.intValue() == 0 - && chunkMinusInfinity.intValue() == 0) { + if (chunkNormalCount.get() == 0 && chunkNanCount.get() == 0 && chunkInfinityCount.get() == 0 + && chunkMinusInfinity.get() == 0) { return false; } - final long totalPositiveInfinities = updatePositiveInfinityCount(destination, -chunkInfinityCount.intValue()); - final long totalNegativeInfinities = updateNegativeInfinityCount(destination, -chunkMinusInfinity.intValue()); - final long totalNanCount = updateNanCount(destination, -chunkNanCount.intValue()); + final long totalPositiveInfinities = updatePositiveInfinityCount(destination, -chunkInfinityCount.get()); + final long totalNegativeInfinities = updateNegativeInfinityCount(destination, -chunkMinusInfinity.get()); + final long totalNanCount = updateNanCount(destination, -chunkNanCount.get()); final boolean forceNanResult = totalNegativeInfinities > 0 || totalPositiveInfinities > 0 || totalNanCount > 0; - final long totalNormalCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNormalCount.intValue()); + final long totalNormalCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNormalCount.get()); final double newSum, newSum2; - if (chunkNormalCount.intValue() > 0) { + if (chunkNormalCount.get() > 0) { if (totalNormalCount > 0) { newSum = NullSafeAddition.plusDouble(sumSource.getUnsafe(destination), -sum); newSum2 = NullSafeAddition.plusDouble(sum2Source.getUnsafe(destination), -sum2.doubleValue()); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase.java index 211e3e68e7e..4d1251aea3c 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase.java @@ -119,7 +119,7 @@ public void add( @Override public void onNextChunk(int size) { - outputPositionToHashSlot.ensureCapacity(nextOutputPosition.intValue() + size, false); + outputPositionToHashSlot.ensureCapacity(nextOutputPosition.get() + size, false); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerTypedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerTypedBase.java index 9cf263fae7b..0ddfba9124a 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerTypedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IncrementalChunkedOperatorAggregationStateManagerTypedBase.java @@ -172,7 +172,7 @@ public void doPromoteOverflow(final int overflowLocation, final int mainInsertLo @Override public void onNextChunk(final int size) { - outputPositionToHashSlot.ensureCapacity(outputPosition.intValue() + size); + outputPositionToHashSlot.ensureCapacity(outputPosition.get() + size); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAddOnlyMinMaxOperator.java index c45cbe27b61..7662247fc5b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAddOnlyMinMaxOperator.java @@ -55,7 +55,7 @@ private int min(IntChunk values, MutableInt chunkNonNull, int chunkStart, int } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -72,7 +72,7 @@ private int max(IntChunk values, MutableInt chunkNonNull, int chunkStart, int } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -139,7 +139,7 @@ private boolean addChunk(IntChunk values, long destination, in final int chunkEnd = chunkStart + chunkSize; final int chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAvgOperator.java index c9e3fd534d7..81e66b75ff8 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedAvgOperator.java @@ -86,8 +86,8 @@ private boolean addChunk(IntChunk values, long destination, in final IntChunk asIntChunk = values.asIntChunk(); final long chunkSum = SumIntChunk.sumIntChunk(asIntChunk, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() > 0) { - final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.get()); final long newSum = plusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); @@ -103,11 +103,11 @@ private boolean removeChunk(IntChunk values, long destination, final MutableInt chunkNonNull = new MutableInt(0); final long chunkSum = SumIntChunk.sumIntChunk(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.get()); final long newSum = minusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedSumOperator.java index c49ae67b6ad..a875bf956fa 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedSumOperator.java @@ -81,7 +81,7 @@ public boolean removeChunk(SingletonContext context, int chunkSize, Chunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, sum, nonNullCount.intValue()); + return updateInternal(destination, sum, nonNullCount.get()); } @Override @@ -111,13 +111,13 @@ private boolean modifyChunk(IntChunk oldValues, IntChunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, -sum, -nonNullCount.intValue()); + return updateInternal(destination, -sum, -nonNullCount.get()); } private long doSum(int chunkStart, int chunkSize, MutableInt nonNullCount, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedVarOperator.java index b7d2f640822..882dc975285 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/IntChunkedVarOperator.java @@ -85,8 +85,8 @@ private boolean addChunk(IntChunk values, long destination, in final MutableInt chunkNonNull = new MutableInt(); final double sum = SumIntChunk.sum2IntChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() > 0) { - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.get()); final double newSum = plusDouble(sumSource.getUnsafe(destination), sum); final double newSum2 = plusDouble(sum2Source.getUnsafe(destination), sum2.doubleValue()); @@ -110,11 +110,11 @@ private boolean removeChunk(IntChunk values, long destination, final MutableInt chunkNonNull = new MutableInt(); final double sum = SumIntChunk.sum2IntChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.get()); final double newSum; final double newSum2; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAddOnlyMinMaxOperator.java index 3457ff2c2d3..ad4f13ad808 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAddOnlyMinMaxOperator.java @@ -66,7 +66,7 @@ private long min(LongChunk values, MutableInt chunkNonNull, int chunkStart, i } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -83,7 +83,7 @@ private long max(LongChunk values, MutableInt chunkNonNull, int chunkStart, i } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -150,7 +150,7 @@ private boolean addChunk(LongChunk values, long destination, i final int chunkEnd = chunkStart + chunkSize; final long chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAvgOperator.java index bea39387cb0..8c58a17b6d7 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedAvgOperator.java @@ -86,8 +86,8 @@ private boolean addChunk(LongChunk values, long destination, i final LongChunk asLongChunk = values.asLongChunk(); final long chunkSum = SumLongChunk.sumLongChunk(asLongChunk, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() > 0) { - final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.get()); final long newSum = plusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); @@ -103,11 +103,11 @@ private boolean removeChunk(LongChunk values, long destination final MutableInt chunkNonNull = new MutableInt(0); final long chunkSum = SumLongChunk.sumLongChunk(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.get()); final long newSum = minusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedSumOperator.java index 610b82b3f14..f9081949f93 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedSumOperator.java @@ -81,7 +81,7 @@ public boolean removeChunk(SingletonContext context, int chunkSize, Chunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, sum, nonNullCount.intValue()); + return updateInternal(destination, sum, nonNullCount.get()); } @Override @@ -111,13 +111,13 @@ private boolean modifyChunk(LongChunk oldValues, LongChunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, -sum, -nonNullCount.intValue()); + return updateInternal(destination, -sum, -nonNullCount.get()); } private long doSum(int chunkStart, int chunkSize, MutableInt nonNullCount, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedVarOperator.java index 33abb651fa5..2b7b9a14bfa 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedVarOperator.java @@ -85,8 +85,8 @@ private boolean addChunk(LongChunk values, long destination, i final MutableInt chunkNonNull = new MutableInt(); final double sum = SumLongChunk.sum2LongChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() > 0) { - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.get()); final double newSum = plusDouble(sumSource.getUnsafe(destination), sum); final double newSum2 = plusDouble(sum2Source.getUnsafe(destination), sum2.doubleValue()); @@ -110,11 +110,11 @@ private boolean removeChunk(LongChunk values, long destination final MutableInt chunkNonNull = new MutableInt(); final double sum = SumLongChunk.sum2LongChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.get()); final double newSum; final double newSum2; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedWeightedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedWeightedSumOperator.java index e3151ab21de..30bd2f0fa52 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedWeightedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/LongChunkedWeightedSumOperator.java @@ -141,8 +141,8 @@ private static void sumChunks(LongChunk doubleValues, LongChun weightedSum += weight * component; } - normalOut.setValue(normal); - weightedSumOut.setValue(weightedSum); + normalOut.set(normal); + weightedSumOut.set(weightedSum); } private boolean addChunk(LongChunk longValues, LongChunk weightValues, @@ -152,8 +152,8 @@ private boolean addChunk(LongChunk longValues, LongChunk doubleValues, LongChunk< sumChunks(doubleValues, weightValues, start, length, normalOut, weightedSumOut); - final int newNormal = normalOut.intValue(); - final int newWeightedSum = weightedSumOut.intValue(); + final int newNormal = normalOut.get(); + final int newWeightedSum = weightedSumOut.get(); final long totalNormal; final long existingNormal = normalCount.getUnsafe(destination); @@ -230,13 +230,13 @@ private boolean modifyChunk(LongChunk prevDoubleValues, sumChunks(prevDoubleValues, prevWeightValues, start, length, normalOut, weightedSumOut); - final int prevNormal = normalOut.intValue(); - final int prevWeightedSum = weightedSumOut.intValue(); + final int prevNormal = normalOut.get(); + final int prevWeightedSum = weightedSumOut.get(); sumChunks(newDoubleValues, newWeightValues, start, length, normalOut, weightedSumOut); - final int newNormal = normalOut.intValue(); - final int newWeightedSum = weightedSumOut.intValue(); + final int newNormal = normalOut.get(); + final int newWeightedSum = weightedSumOut.get(); final long totalNormal; final long existingNormal = normalCount.getUnsafe(destination); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ObjectChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ObjectChunkedAddOnlyMinMaxOperator.java index df071b6d8a1..c08e9c4e7f0 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ObjectChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ObjectChunkedAddOnlyMinMaxOperator.java @@ -55,7 +55,7 @@ private Object min(ObjectChunk values, MutableInt chunkNonNull, int c } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -72,7 +72,7 @@ private Object max(ObjectChunk values, MutableInt chunkNonNull, int c } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -139,7 +139,7 @@ private boolean addChunk(ObjectChunk values, long dest final int chunkEnd = chunkStart + chunkSize; final Object chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/OperatorAggregationStateManagerOpenAddressedAlternateBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/OperatorAggregationStateManagerOpenAddressedAlternateBase.java index 7c656aa481f..fdda408ab35 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/OperatorAggregationStateManagerOpenAddressedAlternateBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/OperatorAggregationStateManagerOpenAddressedAlternateBase.java @@ -11,7 +11,6 @@ import io.deephaven.engine.table.*; import io.deephaven.engine.table.impl.sources.InMemoryColumnSource; import io.deephaven.engine.table.impl.util.TypedHasherUtil.BuildOrProbeContext.ProbeContext; -import io.deephaven.util.datastructures.LongSizedDataStructure; import io.deephaven.util.mutable.MutableInt; import static io.deephaven.engine.table.impl.util.TypedHasherUtil.*; @@ -170,7 +169,7 @@ public interface BuildHandler { */ public boolean doRehash(MutableInt rehashCredits, int nextChunkSize) { if (rehashPointer > 0) { - final int requiredRehash = nextChunkSize - rehashCredits.intValue(); + final int requiredRehash = nextChunkSize - rehashCredits.get(); if (requiredRehash <= 0) { return false; } @@ -196,8 +195,8 @@ public boolean doRehash(MutableInt rehashCredits, int nextChunkSize) { } // we can't give the caller credit for rehashes with the old table, we need to begin migrating things again - if (rehashCredits.intValue() > 0) { - rehashCredits.setValue(0); + if (rehashCredits.get() > 0) { + rehashCredits.set(0); } if (fullRehash) { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAddOnlyMinMaxOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAddOnlyMinMaxOperator.java index a7520443254..826cd6e7b13 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAddOnlyMinMaxOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAddOnlyMinMaxOperator.java @@ -55,7 +55,7 @@ private short min(ShortChunk values, MutableInt chunkNonNull, int chunkStart, } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -72,7 +72,7 @@ private short max(ShortChunk values, MutableInt chunkNonNull, int chunkStart, } } } - chunkNonNull.setValue(nonNull); + chunkNonNull.set(nonNull); return value; } @@ -139,7 +139,7 @@ private boolean addChunk(ShortChunk values, long destination, final int chunkEnd = chunkStart + chunkSize; final short chunkValue = minimum ? min(values, chunkNonNull, chunkStart, chunkEnd) : max(values, chunkNonNull, chunkStart, chunkEnd); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAvgOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAvgOperator.java index aacb4a23d44..40bb2fd41b5 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAvgOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedAvgOperator.java @@ -86,8 +86,8 @@ private boolean addChunk(ShortChunk values, long destination, final ShortChunk asShortChunk = values.asShortChunk(); final long chunkSum = SumShortChunk.sumShortChunk(asShortChunk, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() > 0) { - final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long newCount = nonNullCount.addNonNullUnsafe(destination, chunkNonNull.get()); final long newSum = plusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); @@ -103,11 +103,11 @@ private boolean removeChunk(ShortChunk values, long destinatio final MutableInt chunkNonNull = new MutableInt(0); final long chunkSum = SumShortChunk.sumShortChunk(values, chunkStart, chunkSize, chunkNonNull); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long newCount = nonNullCount.addNonNullUnsafe(destination, -chunkNonNull.get()); final long newSum = minusLong(runningSum.getUnsafe(destination), chunkSum); runningSum.set(destination, newSum); resultColumn.set(destination, (double) newSum / newCount); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedSumOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedSumOperator.java index 6a20e975ad7..4a50e08844c 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedSumOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedSumOperator.java @@ -81,7 +81,7 @@ public boolean removeChunk(SingletonContext context, int chunkSize, Chunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, sum, nonNullCount.intValue()); + return updateInternal(destination, sum, nonNullCount.get()); } @Override @@ -111,13 +111,13 @@ private boolean modifyChunk(ShortChunk oldValues, ShortChunk values, long destination, int chunkStart, int chunkSize) { final MutableInt nonNullCount = new MutableInt(0); final long sum = doSum(chunkStart, chunkSize, nonNullCount, values); - return updateInternal(destination, -sum, -nonNullCount.intValue()); + return updateInternal(destination, -sum, -nonNullCount.get()); } private long doSum(int chunkStart, int chunkSize, MutableInt nonNullCount, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedVarOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedVarOperator.java index a6cab7ebac2..6d24d6f75d6 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedVarOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ShortChunkedVarOperator.java @@ -85,8 +85,8 @@ private boolean addChunk(ShortChunk values, long destination, final MutableInt chunkNonNull = new MutableInt(); final double sum = SumShortChunk.sum2ShortChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() > 0) { - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.intValue()); + if (chunkNonNull.get() > 0) { + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, chunkNonNull.get()); final double newSum = plusDouble(sumSource.getUnsafe(destination), sum); final double newSum2 = plusDouble(sum2Source.getUnsafe(destination), sum2.doubleValue()); @@ -110,11 +110,11 @@ private boolean removeChunk(ShortChunk values, long destinatio final MutableInt chunkNonNull = new MutableInt(); final double sum = SumShortChunk.sum2ShortChunk(values, chunkStart, chunkSize, chunkNonNull, sum2); - if (chunkNonNull.intValue() == 0) { + if (chunkNonNull.get() == 0) { return false; } - final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.intValue()); + final long nonNullCount = nonNullCounter.addNonNullUnsafe(destination, -chunkNonNull.get()); final double newSum; final double newSum2; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerOpenAddressedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerOpenAddressedBase.java index 176997152bb..a36c6fadfe6 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerOpenAddressedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerOpenAddressedBase.java @@ -12,7 +12,6 @@ import io.deephaven.engine.table.impl.sources.immutable.ImmutableIntArraySource; import io.deephaven.engine.table.impl.util.IntColumnSourceWritableRowRedirection; import io.deephaven.engine.table.impl.util.RowRedirection; -import io.deephaven.engine.table.impl.util.TypedHasherUtil; import io.deephaven.engine.table.impl.util.TypedHasherUtil.BuildOrProbeContext.BuildContext; import io.deephaven.util.QueryConstants; import io.deephaven.util.SafeCloseable; @@ -59,7 +58,7 @@ public void add(final SafeCloseable bc, RowSequence rowSequence, ColumnSource @Override public void onNextChunk(int size) { - outputPositionToHashSlot.ensureCapacity(nextOutputPosition.intValue() + size, false); + outputPositionToHashSlot.ensureCapacity(nextOutputPosition.get() + size, false); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerTypedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerTypedBase.java index 58d350f4cc7..f666b81ec6e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerTypedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticChunkedOperatorAggregationStateManagerTypedBase.java @@ -78,7 +78,7 @@ public void doPromoteOverflow(int overflowLocation, int mainInsertLocation) { @Override public void onNextChunk(int size) { - outputPositionToHashSlot.ensureCapacity(outputPosition.intValue() + size); + outputPositionToHashSlot.ensureCapacity(outputPosition.get() + size); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticSymbolTableChunkedOperatorAggregationStateManager.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticSymbolTableChunkedOperatorAggregationStateManager.java index eceba40eb49..1de98307bf9 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticSymbolTableChunkedOperatorAggregationStateManager.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/StaticSymbolTableChunkedOperatorAggregationStateManager.java @@ -21,8 +21,6 @@ import java.util.Arrays; -import static io.deephaven.base.ArrayUtil.MAX_ARRAY_SIZE; - public class StaticSymbolTableChunkedOperatorAggregationStateManager implements OperatorAggregationStateManager { private static final int CHUNK_SIZE = ChunkedOperatorAggregationHelper.CHUNK_SIZE; @@ -106,7 +104,7 @@ public void add(final SafeCloseable bc, final RowSequence rowSequence, final Col } } - nextOutputPosition.setValue(nextPosition); + nextOutputPosition.set(nextPosition); } private void updateKeyHashTableSources(final WritableLongChunk symbolTableValues, diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BooleanPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BooleanPercentileTypeHelper.java index 4a4340c8330..076f7c47fab 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BooleanPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BooleanPercentileTypeHelper.java @@ -70,9 +70,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && asObjectChunk.get(result - 1) == hiValue && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BytePercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BytePercentileTypeHelper.java index ea3052327c0..2de610bd35a 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BytePercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/BytePercentileTypeHelper.java @@ -74,9 +74,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && ByteComparisons.eq(asByteChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/CharPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/CharPercentileTypeHelper.java index b637bc6d1b7..06b9798b3a1 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/CharPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/CharPercentileTypeHelper.java @@ -70,9 +70,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && CharComparisons.eq(asCharChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/DoublePercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/DoublePercentileTypeHelper.java index e993852bf6f..1dcef5a24d2 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/DoublePercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/DoublePercentileTypeHelper.java @@ -74,9 +74,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && DoubleComparisons.eq(asDoubleChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/FloatPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/FloatPercentileTypeHelper.java index 98cf1d867cd..e03aa518a04 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/FloatPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/FloatPercentileTypeHelper.java @@ -74,9 +74,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && FloatComparisons.eq(asFloatChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/InstantPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/InstantPercentileTypeHelper.java index 2b9eb546782..ba1ea817fc1 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/InstantPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/InstantPercentileTypeHelper.java @@ -68,9 +68,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && asLongChunk.get(result - 1) == hiValue && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/IntPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/IntPercentileTypeHelper.java index 1e1a684bca7..35bd4707e13 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/IntPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/IntPercentileTypeHelper.java @@ -14,7 +14,6 @@ import io.deephaven.engine.table.impl.sources.IntegerArraySource; import io.deephaven.chunk.IntChunk; import io.deephaven.chunk.Chunk; -import io.deephaven.chunk.IntChunk; import io.deephaven.engine.table.impl.ssms.IntSegmentedSortedMultiset; import io.deephaven.engine.table.impl.ssms.SegmentedSortedMultiSet; import io.deephaven.util.mutable.MutableInt; @@ -74,9 +73,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && IntComparisons.eq(asIntChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/LongPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/LongPercentileTypeHelper.java index 45a526771da..bac03a42801 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/LongPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/LongPercentileTypeHelper.java @@ -74,9 +74,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && LongComparisons.eq(asLongChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ObjectPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ObjectPercentileTypeHelper.java index b9ddc6d18d3..604217bb795 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ObjectPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ObjectPercentileTypeHelper.java @@ -7,8 +7,6 @@ // @formatter:off package io.deephaven.engine.table.impl.by.ssmpercentile; -import java.util.Objects; - import io.deephaven.chunk.attributes.ChunkLengths; import io.deephaven.chunk.attributes.Values; import io.deephaven.engine.table.WritableColumnSource; @@ -75,9 +73,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && ObjectComparisons.eq(asObjectChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ShortPercentileTypeHelper.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ShortPercentileTypeHelper.java index 5433867d0ad..0a0a011c043 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ShortPercentileTypeHelper.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/ShortPercentileTypeHelper.java @@ -74,9 +74,9 @@ public int pivot(SegmentedSortedMultiSet segmentedSortedMultiSet, Chunk startPosition && ShortComparisons.eq(asShortChunk.get(result - 1), hiValue) && counts.get(result - 1) > hiCount) { - leftOvers.setValue((int) (counts.get(result - 1) - hiCount)); + leftOvers.set((int) (counts.get(result - 1) - hiCount)); } else { - leftOvers.setValue(0); + leftOvers.set(0); } return result - startPosition; diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/SsmChunkedPercentileOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/SsmChunkedPercentileOperator.java index 86b11be272b..1667de57126 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/SsmChunkedPercentileOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/ssmpercentile/SsmChunkedPercentileOperator.java @@ -246,7 +246,7 @@ private void pivotedRemoval(SsmMinMaxContext context, SegmentedSortedMultiSet.Re int loPivot; if (ssmLo.size() > 0) { loPivot = percentileTypeHelper.pivot(ssmLo, valueCopy, counts, startPosition, runLength, leftOvers); - Assert.leq(leftOvers.intValue(), "leftOvers.intValue()", ssmHi.totalSize(), "ssmHi.totalSize()"); + Assert.leq(leftOvers.get(), "leftOvers.intValue()", ssmHi.totalSize(), "ssmHi.totalSize()"); } else { loPivot = 0; } @@ -256,14 +256,14 @@ private void pivotedRemoval(SsmMinMaxContext context, SegmentedSortedMultiSet.Re context.valueResettable.resetFromChunk(valueCopy, startPosition, loPivot); final WritableIntChunk loCountSlice = context.countResettable.resetFromChunk(counts, startPosition, loPivot); - if (leftOvers.intValue() > 0) { - counts.set(startPosition + loPivot - 1, counts.get(startPosition + loPivot - 1) - leftOvers.intValue()); + if (leftOvers.get() > 0) { + counts.set(startPosition + loPivot - 1, counts.get(startPosition + loPivot - 1) - leftOvers.get()); } ssmLo.remove(removeContext, loValueSlice, loCountSlice); } - if (leftOvers.intValue() > 0) { - counts.set(startPosition + loPivot - 1, leftOvers.intValue()); + if (leftOvers.get() > 0) { + counts.set(startPosition + loPivot - 1, leftOvers.get()); loPivot--; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/BooleanChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/BooleanChunkFiller.java index 19016025a6c..1153bddd13b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/BooleanChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/BooleanChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getBoolean(v)); + typedDest.set(destPos.get(), src.getBoolean(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableBooleanChunk typedDest = dest.asWritableBooleanChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getBoolean(v)); + typedDest.set(destPos.get(), src.getBoolean(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevBoolean(v)); + typedDest.set(destPos.get(), src.getPrevBoolean(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableBooleanChunk typedDest = dest.asWritableBooleanChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevBoolean(v)); + typedDest.set(destPos.get(), src.getPrevBoolean(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ByteChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ByteChunkFiller.java index 8ca8731d1f0..6181d736ab0 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ByteChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ByteChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getByte(v)); + typedDest.set(destPos.get(), src.getByte(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableByteChunk typedDest = dest.asWritableByteChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getByte(v)); + typedDest.set(destPos.get(), src.getByte(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevByte(v)); + typedDest.set(destPos.get(), src.getPrevByte(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableByteChunk typedDest = dest.asWritableByteChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevByte(v)); + typedDest.set(destPos.get(), src.getPrevByte(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/CharChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/CharChunkFiller.java index 3173327d921..a1d88e2ff96 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/CharChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/CharChunkFiller.java @@ -25,11 +25,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getChar(v)); + typedDest.set(destPos.get(), src.getChar(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -38,10 +38,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableCharChunk typedDest = dest.asWritableCharChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getChar(v)); + typedDest.set(destPos.get(), src.getChar(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -64,11 +64,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevChar(v)); + typedDest.set(destPos.get(), src.getPrevChar(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -77,10 +77,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableCharChunk typedDest = dest.asWritableCharChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevChar(v)); + typedDest.set(destPos.get(), src.getPrevChar(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/DoubleChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/DoubleChunkFiller.java index 4bfb97c410e..5de1334dbc7 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/DoubleChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/DoubleChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getDouble(v)); + typedDest.set(destPos.get(), src.getDouble(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableDoubleChunk typedDest = dest.asWritableDoubleChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getDouble(v)); + typedDest.set(destPos.get(), src.getDouble(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevDouble(v)); + typedDest.set(destPos.get(), src.getPrevDouble(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableDoubleChunk typedDest = dest.asWritableDoubleChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevDouble(v)); + typedDest.set(destPos.get(), src.getPrevDouble(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/FloatChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/FloatChunkFiller.java index b5fa9946c42..084606c21e6 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/FloatChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/FloatChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getFloat(v)); + typedDest.set(destPos.get(), src.getFloat(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableFloatChunk typedDest = dest.asWritableFloatChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getFloat(v)); + typedDest.set(destPos.get(), src.getFloat(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevFloat(v)); + typedDest.set(destPos.get(), src.getPrevFloat(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableFloatChunk typedDest = dest.asWritableFloatChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevFloat(v)); + typedDest.set(destPos.get(), src.getPrevFloat(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/IntChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/IntChunkFiller.java index f4fb48cf572..5dec011d02e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/IntChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/IntChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getInt(v)); + typedDest.set(destPos.get(), src.getInt(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableIntChunk typedDest = dest.asWritableIntChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getInt(v)); + typedDest.set(destPos.get(), src.getInt(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevInt(v)); + typedDest.set(destPos.get(), src.getPrevInt(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableIntChunk typedDest = dest.asWritableIntChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevInt(v)); + typedDest.set(destPos.get(), src.getPrevInt(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/LongChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/LongChunkFiller.java index c6e4bc00c48..c32477970d1 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/LongChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/LongChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getLong(v)); + typedDest.set(destPos.get(), src.getLong(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableLongChunk typedDest = dest.asWritableLongChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getLong(v)); + typedDest.set(destPos.get(), src.getLong(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevLong(v)); + typedDest.set(destPos.get(), src.getPrevLong(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableLongChunk typedDest = dest.asWritableLongChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevLong(v)); + typedDest.set(destPos.get(), src.getPrevLong(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ObjectChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ObjectChunkFiller.java index ec733da4814..4efc03a1228 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ObjectChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ObjectChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.get(v)); + typedDest.set(destPos.get(), src.get(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableObjectChunk typedDest = dest.asWritableObjectChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.get(v)); + typedDest.set(destPos.get(), src.get(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrev(v)); + typedDest.set(destPos.get(), src.getPrev(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableObjectChunk typedDest = dest.asWritableObjectChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrev(v)); + typedDest.set(destPos.get(), src.getPrev(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ShortChunkFiller.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ShortChunkFiller.java index 93d4ebbe191..1c857f7c1b8 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ShortChunkFiller.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/chunkfillers/ShortChunkFiller.java @@ -29,11 +29,11 @@ public final void fillByRanges(final ElementSource src, final RowSequence keys, final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getShort(v)); + typedDest.set(destPos.get(), src.getShort(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -42,10 +42,10 @@ public final void fillByIndices(final ElementSource src, final RowSequence keys, final WritableShortChunk typedDest = dest.asWritableShortChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getShort(v)); + typedDest.set(destPos.get(), src.getShort(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -68,11 +68,11 @@ public final void fillPrevByRanges(final ElementSource src, final RowSequence ke final MutableInt destPos = new MutableInt(0); keys.forAllRowKeyRanges((start, end) -> { for (long v = start; v <= end; ++v) { - typedDest.set(destPos.intValue(), src.getPrevShort(v)); + typedDest.set(destPos.get(), src.getPrevShort(v)); destPos.increment(); } }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override @@ -81,10 +81,10 @@ public final void fillPrevByIndices(final ElementSource src, final RowSequence k final WritableShortChunk typedDest = dest.asWritableShortChunk(); final MutableInt destPos = new MutableInt(0); keys.forAllRowKeys(v -> { - typedDest.set(destPos.intValue(), src.getPrevShort(v)); + typedDest.set(destPos.get(), src.getPrevShort(v)); destPos.increment(); }); - typedDest.setSize(destPos.intValue()); + typedDest.setSize(destPos.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/TreeTableFilter.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/TreeTableFilter.java index 7fb9a7bccb7..49fe8d22089 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/TreeTableFilter.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/hierarchical/TreeTableFilter.java @@ -243,7 +243,7 @@ private void validateState(final boolean usePrev, @NotNull final RowSet sourceRo childRowsToProcessIter.getNextRowSequenceWithLength(CHUNK_SIZE); final ObjectChunk parentIds = getIds(usePrev, parentIdSource, parentIdGetContext, boxer, chunkChildRows); - chunkOffset.setValue(0); + chunkOffset.set(0); chunkChildRows.forAllRowKeys((final long childRow) -> { final Object parentId = parentIds.get(chunkOffset.getAndIncrement()); expectedParents.computeIfAbsent(parentId, pid -> RowSetFactory.builderRandom()) @@ -372,7 +372,7 @@ private RowSet checkForResurrectedParent(@NotNull final RowSet rowsToCheck) { final RowSequence chunkRowsToCheck = rowsToCheckIter.getNextRowSequenceWithLength(CHUNK_SIZE); final ObjectChunk ids = getIds(false, idSource, idGetContext, boxer, chunkRowsToCheck); - chunkOffset.setValue(0); + chunkOffset.set(0); chunkRowsToCheck.forAllRowKeys((final long rowKeyToCheck) -> { final Object id = ids.get(chunkOffset.getAndIncrement()); if (id != null && parentIdToChildRows.containsKey(id)) { @@ -433,7 +433,7 @@ private Map bucketChildRowsByParentId( final RowSequence chunkChildRows = childRowsIter.getNextRowSequenceWithLength(CHUNK_SIZE); final ObjectChunk parentIds = getIds(usePrev, parentIdSource, parentIdGetContext, boxer, chunkChildRows); - chunkOffset.setValue(0); + chunkOffset.set(0); chunkChildRows.forAllRowKeys((final long childRowKey) -> { final Object parentId = parentIds.get(chunkOffset.getAndIncrement()); if (parentId != null) { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/multijoin/IncrementalMultiJoinStateManagerTypedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/multijoin/IncrementalMultiJoinStateManagerTypedBase.java index e25aaf5c9f4..f880dfc7f42 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/multijoin/IncrementalMultiJoinStateManagerTypedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/multijoin/IncrementalMultiJoinStateManagerTypedBase.java @@ -24,7 +24,6 @@ import io.deephaven.engine.table.impl.sources.immutable.ImmutableLongArraySource; import io.deephaven.engine.table.impl.util.*; import io.deephaven.util.QueryConstants; -import io.deephaven.util.datastructures.LongSizedDataStructure; import io.deephaven.util.mutable.MutableInt; import org.jetbrains.annotations.NotNull; @@ -396,7 +395,7 @@ private void probeTable( */ public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextChunkSize) { if (rehashPointer > 0) { - final int requiredRehash = nextChunkSize - rehashCredits.intValue(); + final int requiredRehash = nextChunkSize - rehashCredits.get(); if (requiredRehash <= 0) { return false; } @@ -422,8 +421,8 @@ public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextCh } // we can't give the caller credit for rehashes with the old table, we need to begin migrating things again - if (rehashCredits.intValue() > 0) { - rehashCredits.setValue(0); + if (rehashCredits.get() > 0) { + rehashCredits.set(0); } if (fullRehash) { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/naturaljoin/IncrementalNaturalJoinStateManagerTypedBase.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/naturaljoin/IncrementalNaturalJoinStateManagerTypedBase.java index eaaf1aa66f4..89a7c147d74 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/naturaljoin/IncrementalNaturalJoinStateManagerTypedBase.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/naturaljoin/IncrementalNaturalJoinStateManagerTypedBase.java @@ -20,7 +20,6 @@ import io.deephaven.engine.table.impl.sources.immutable.ImmutableObjectArraySource; import io.deephaven.engine.table.impl.util.*; import io.deephaven.util.QueryConstants; -import io.deephaven.util.datastructures.LongSizedDataStructure; import io.deephaven.util.mutable.MutableInt; import io.deephaven.util.mutable.MutableLong; import org.jetbrains.annotations.NotNull; @@ -226,7 +225,7 @@ protected void probeTable( public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextChunkSize, NaturalJoinModifiedSlotTracker modifiedSlotTracker) { if (rehashPointer > 0) { - final int requiredRehash = nextChunkSize - rehashCredits.intValue(); + final int requiredRehash = nextChunkSize - rehashCredits.get(); if (requiredRehash <= 0) { return false; } @@ -252,8 +251,8 @@ public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextCh } // we can't give the caller credit for rehashes with the old table, we need to begin migrating things again - if (rehashCredits.intValue() > 0) { - rehashCredits.setValue(0); + if (rehashCredits.get() > 0) { + rehashCredits.set(0); } if (fullRehash) { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/partitioned/PartitionedTableImpl.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/partitioned/PartitionedTableImpl.java index 3e4087f1521..6229acc762e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/partitioned/PartitionedTableImpl.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/partitioned/PartitionedTableImpl.java @@ -655,8 +655,8 @@ private ValidateConstituentsMemoizationKey( this.constituentDefinition = constituentDefinition; final MutableInt hashAccumulator = new MutableInt(31 + constituentColumnName.hashCode()); constituentDefinition.getColumnStream().map(ColumnDefinition::getName).sorted().forEach( - cn -> hashAccumulator.setValue(31 * hashAccumulator.intValue() + cn.hashCode())); - hashCode = hashAccumulator.intValue(); + cn -> hashAccumulator.set(31 * hashAccumulator.get() + cn.hashCode())); + hashCode = hashAccumulator.get(); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/BitShiftingColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/BitShiftingColumnSource.java index e58febbc643..0ca0c5c7541 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/BitShiftingColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/BitShiftingColumnSource.java @@ -415,21 +415,21 @@ private void ensureKeysAndLengthsInitialized(@NotNull final CrossJoinShiftState usePrev ? shiftState.getPrevShifted(rowKey) : shiftState.getShifted(rowKey); if (innerIndexKey != lastInnerIndexKey) { if (lastInnerIndexKey != RowSequence.NULL_ROW_KEY) { - uniqueIndices.set(currentRunPosition.intValue(), lastInnerIndexKey); - runLengths.set(currentRunPosition.intValue(), currentRunLength.intValue()); + uniqueIndices.set(currentRunPosition.get(), lastInnerIndexKey); + runLengths.set(currentRunPosition.get(), currentRunLength.get()); currentRunPosition.increment(); } - currentRunLength.setValue(1); + currentRunLength.set(1); currentRunInnerIndexKey.setValue(innerIndexKey); } else { currentRunLength.increment(); } }); - uniqueIndices.set(currentRunPosition.intValue(), currentRunInnerIndexKey.longValue()); - runLengths.set(currentRunPosition.intValue(), currentRunLength.intValue()); - uniqueIndices.setSize(currentRunPosition.intValue() + 1); - runLengths.setSize(currentRunPosition.intValue() + 1); + uniqueIndices.set(currentRunPosition.get(), currentRunInnerIndexKey.longValue()); + runLengths.set(currentRunPosition.get(), currentRunLength.get()); + uniqueIndices.setSize(currentRunPosition.get() + 1); + runLengths.setSize(currentRunPosition.get() + 1); keysAndLengthsReusable = shared; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ByteArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ByteArraySource.java index 6d1dfc82328..76693de2f90 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ByteArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ByteArraySource.java @@ -331,7 +331,7 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -347,34 +347,34 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); // endregion copyFromArray destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; // region copyFromArray - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); // endregion copyFromArray destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillChunk @@ -411,11 +411,11 @@ private interface CopyFromBlockFunctor { if (inUse != null) { // region conditionalCopy effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); // endregion conditionalCopy } else { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); // endregion copyFromArray } destOffset.add(length); @@ -426,7 +426,7 @@ private interface CopyFromBlockFunctor { if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -454,11 +454,11 @@ private interface CopyFromBlockFunctor { } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillPrevChunk diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CharacterArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CharacterArraySource.java index dace8922d56..088cc63a4ef 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CharacterArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CharacterArraySource.java @@ -328,7 +328,7 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -344,34 +344,34 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); // endregion copyFromArray destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; // region copyFromArray - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); // endregion copyFromArray destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillChunk @@ -408,11 +408,11 @@ private interface CopyFromBlockFunctor { if (inUse != null) { // region conditionalCopy effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); // endregion conditionalCopy } else { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); // endregion copyFromArray } destOffset.add(length); @@ -423,7 +423,7 @@ private interface CopyFromBlockFunctor { if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -451,11 +451,11 @@ private interface CopyFromBlockFunctor { } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillPrevChunk diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CrossJoinRightColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CrossJoinRightColumnSource.java index 121e214f821..83bd020ce7f 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CrossJoinRightColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/CrossJoinRightColumnSource.java @@ -535,12 +535,12 @@ private void ensureMappedKeysInitialized(@NotNull final CrossJoinStateManager cr rightGroup = crossJoinManager.getRightRowSetFromLeftRow(lastLeftIndex.longValue()); } - final int alreadyWritten = postMapOffset.intValue(); - final int inRightGroup = preMapOffset.intValue(); + final int alreadyWritten = postMapOffset.get(); + final int inRightGroup = preMapOffset.get(); rightGroup.getKeysForPositions( ChunkStream.of(mappedKeys, alreadyWritten, inRightGroup - alreadyWritten).iterator(), destKey -> { - mappedKeys.set(postMapOffset.intValue(), destKey); + mappedKeys.set(postMapOffset.get(), destKey); postMapOffset.increment(); }); if (usePrev && rightIsLive) { @@ -557,12 +557,12 @@ private void ensureMappedKeysInitialized(@NotNull final CrossJoinStateManager cr lastLeftIndex.setValue(leftIndex); uniqueLeftSideValues.increment(); } - mappedKeys.set(preMapOffset.intValue(), + mappedKeys.set(preMapOffset.get(), usePrev ? crossJoinManager.getPrevMasked(ii) : crossJoinManager.getMasked(ii)); preMapOffset.increment(); }); flush.run(); - uniqueLeftCount = uniqueLeftSideValues.intValue(); + uniqueLeftCount = uniqueLeftSideValues.get(); mappedKeysReusable = shared; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/DoubleArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/DoubleArraySource.java index 91f57e6fc63..2343325982d 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/DoubleArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/DoubleArraySource.java @@ -331,7 +331,7 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -347,34 +347,34 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); // endregion copyFromArray destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; // region copyFromArray - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); // endregion copyFromArray destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillChunk @@ -411,11 +411,11 @@ private interface CopyFromBlockFunctor { if (inUse != null) { // region conditionalCopy effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); // endregion conditionalCopy } else { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); // endregion copyFromArray } destOffset.add(length); @@ -426,7 +426,7 @@ private interface CopyFromBlockFunctor { if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -454,11 +454,11 @@ private interface CopyFromBlockFunctor { } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillPrevChunk diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/FloatArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/FloatArraySource.java index 83d8b36f328..bd01ec0ee0e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/FloatArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/FloatArraySource.java @@ -331,7 +331,7 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -347,34 +347,34 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); // endregion copyFromArray destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; // region copyFromArray - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); // endregion copyFromArray destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillChunk @@ -411,11 +411,11 @@ private interface CopyFromBlockFunctor { if (inUse != null) { // region conditionalCopy effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); // endregion conditionalCopy } else { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); // endregion copyFromArray } destOffset.add(length); @@ -426,7 +426,7 @@ private interface CopyFromBlockFunctor { if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -454,11 +454,11 @@ private interface CopyFromBlockFunctor { } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillPrevChunk diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/IntegerArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/IntegerArraySource.java index 1e2de427e48..b4172cc7794 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/IntegerArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/IntegerArraySource.java @@ -331,7 +331,7 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -347,34 +347,34 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); // endregion copyFromArray destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; // region copyFromArray - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); // endregion copyFromArray destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillChunk @@ -411,11 +411,11 @@ private interface CopyFromBlockFunctor { if (inUse != null) { // region conditionalCopy effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); // endregion conditionalCopy } else { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); // endregion copyFromArray } destOffset.add(length); @@ -426,7 +426,7 @@ private interface CopyFromBlockFunctor { if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -454,11 +454,11 @@ private interface CopyFromBlockFunctor { } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillPrevChunk diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/LongArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/LongArraySource.java index 96231ce9464..2cbb16cd130 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/LongArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/LongArraySource.java @@ -354,7 +354,7 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -370,34 +370,34 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); // endregion copyFromArray destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; // region copyFromArray - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); // endregion copyFromArray destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } public void fillChunk( @@ -419,7 +419,7 @@ public void fillChunk( if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -438,7 +438,7 @@ public void fillChunk( { long[] block = (long[])getBlock(fromBlock); for (int ii = 0; ii < sz; ii++) { - chunk.set(ii + destOffset.intValue(), converter.apply(block[ii + fromOffsetInBlock])); + chunk.set(ii + destOffset.get(), converter.apply(block[ii + fromOffsetInBlock])); } } // endregion copyFromArray @@ -449,7 +449,7 @@ public void fillChunk( { long[] block = (long[])getBlock(fromBlock); for (int ii = 0; ii < sz; ii++) { - chunk.set(ii + destOffset.intValue(), converter.apply(block[ii + fromOffsetInBlock])); + chunk.set(ii + destOffset.get(), converter.apply(block[ii + fromOffsetInBlock])); } } // endregion copyFromArray @@ -459,7 +459,7 @@ public void fillChunk( { long[] block = (long[])getBlock(blockNo); for (int ii = 0; ii < BLOCK_SIZE; ii++) { - chunk.set(ii + destOffset.intValue(), converter.apply(block[ii + 0])); + chunk.set(ii + destOffset.get(), converter.apply(block[ii + 0])); } } // endregion copyFromArray @@ -470,7 +470,7 @@ public void fillChunk( { long[] block = (long[])getBlock(toBlock); for (int ii = 0; ii < restSz; ii++) { - chunk.set(ii + destOffset.intValue(), converter.apply(block[ii + 0])); + chunk.set(ii + destOffset.get(), converter.apply(block[ii + 0])); } } // endregion copyFromArray @@ -478,11 +478,11 @@ public void fillChunk( } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillChunk @@ -519,11 +519,11 @@ private interface CopyFromBlockFunctor { if (inUse != null) { // region conditionalCopy effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); // endregion conditionalCopy } else { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); // endregion copyFromArray } destOffset.add(length); @@ -534,7 +534,7 @@ private interface CopyFromBlockFunctor { if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -562,11 +562,11 @@ private interface CopyFromBlockFunctor { } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } public void fillPrevChunk( @@ -595,7 +595,7 @@ public void fillPrevChunk( final long[] inUse = prevInUse[blockNo]; if (inUse != null) { // region conditionalCopy - final int chunkOffset = destOffset.intValue(); + final int chunkOffset = destOffset.get(); long[] baseInput = (long[]) getBlock(blockNo); long[] overInput = (long[]) getPrevBlock(blockNo); @@ -616,7 +616,7 @@ public void fillPrevChunk( { long[] block = (long[])getBlock(blockNo); for (int ii = 0; ii < length; ii++) { - chunk.set(ii + destOffset.intValue(), converter.apply(block[ii + srcOffset])); + chunk.set(ii + destOffset.get(), converter.apply(block[ii + srcOffset])); } } // endregion copyFromArray @@ -629,7 +629,7 @@ public void fillPrevChunk( if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -657,11 +657,11 @@ public void fillPrevChunk( } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillPrevChunk diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ObjectArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ObjectArraySource.java index c94ee79797b..a3f734400f1 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ObjectArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ObjectArraySource.java @@ -256,7 +256,7 @@ public void fillChunk( if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -271,27 +271,27 @@ public void fillChunk( final int fromOffsetInBlock = (int) (from & INDEX_MASK); if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } private interface CopyFromBlockFunctor { @@ -320,9 +320,9 @@ public void fillPrevChunk( final long[] inUse = prevInUse[blockNo]; if (inUse != null) { effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); } else { - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); } destOffset.add(length); }; @@ -332,7 +332,7 @@ public void fillPrevChunk( if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -360,11 +360,11 @@ public void fillPrevChunk( } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } @Override diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShiftedColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShiftedColumnSource.java index 768f873e510..5b82b20c42d 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShiftedColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShiftedColumnSource.java @@ -90,11 +90,11 @@ public RowSet buildRedirectedKeys( if (shift < 0) { posIndex.removeRange(0, -shift - 1); int sz = (int) (origSize - posIndex.size()); - nullAtBeginningOrEnd.setValue(sz); + nullAtBeginningOrEnd.set(sz); } else if (shift > 0) { posIndex.removeRange(useRowSet.size() - shift, useRowSet.size()); int sz = (int) (origSize - posIndex.size()); - nullAtBeginningOrEnd.setValue(-(sz)); + nullAtBeginningOrEnd.set(-(sz)); } posIndex.shiftInPlace(shift); return useRowSet.subSetForPositions(posIndex); @@ -652,11 +652,11 @@ private void ensureMappedKeysInitialized( final MutableInt nullCountAtBeginningOrEnd = new MutableInt(0); innerRowSequence = cs.buildRedirectedKeys(usePrev, rowSequence, nullCountAtBeginningOrEnd); - if (nullCountAtBeginningOrEnd.intValue() < 0) { + if (nullCountAtBeginningOrEnd.get() < 0) { beginningNullCount = 0; - endingNullCount = -nullCountAtBeginningOrEnd.intValue(); + endingNullCount = -nullCountAtBeginningOrEnd.get(); } else { - beginningNullCount = nullCountAtBeginningOrEnd.intValue(); + beginningNullCount = nullCountAtBeginningOrEnd.get(); endingNullCount = 0; } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShortArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShortArraySource.java index c1e57cf3c61..928b9ec20bf 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShortArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ShortArraySource.java @@ -331,7 +331,7 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } @@ -347,34 +347,34 @@ public long resetWritableChunkToBackingStoreSlice(@NotNull ResettableWritableChu if (fromBlock == toBlock) { final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); } else { final int sz = BLOCK_SIZE - fromOffsetInBlock; // region copyFromArray - destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.intValue(), sz); + destination.copyFromArray(getBlock(fromBlock), fromOffsetInBlock, destOffset.get(), sz); // endregion copyFromArray destOffset.add(sz); for (int blockNo = fromBlock + 1; blockNo < toBlock; ++blockNo) { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), 0, destOffset.intValue(), BLOCK_SIZE); + destination.copyFromArray(getBlock(blockNo), 0, destOffset.get(), BLOCK_SIZE); // endregion copyFromArray destOffset.add(BLOCK_SIZE); } int restSz = (int) (to & INDEX_MASK) + 1; // region copyFromArray - destination.copyFromArray(getBlock(toBlock), 0, destOffset.intValue(), restSz); + destination.copyFromArray(getBlock(toBlock), 0, destOffset.get(), restSz); // endregion copyFromArray destOffset.add(restSz); } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillChunk @@ -411,11 +411,11 @@ private interface CopyFromBlockFunctor { if (inUse != null) { // region conditionalCopy effectiveContext.copyKernel.conditionalCopy(destination, getBlock(blockNo), getPrevBlock(blockNo), - inUse, srcOffset, destOffset.intValue(), length); + inUse, srcOffset, destOffset.get(), length); // endregion conditionalCopy } else { // region copyFromArray - destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.intValue(), length); + destination.copyFromArray(getBlock(blockNo), srcOffset, destOffset.get(), length); // endregion copyFromArray } destOffset.add(length); @@ -426,7 +426,7 @@ private interface CopyFromBlockFunctor { if (from > maxIndex) { // the whole region is beyond us final int sz = LongSizedDataStructure.intSize("int cast", to - from + 1); - destination.fillWithNullValue(destOffset.intValue(), sz); + destination.fillWithNullValue(destOffset.get(), sz); destOffset.add(sz); return; } else if (to > maxIndex) { @@ -454,11 +454,11 @@ private interface CopyFromBlockFunctor { } if (valuesAtEnd > 0) { - destination.fillWithNullValue(destOffset.intValue(), valuesAtEnd); + destination.fillWithNullValue(destOffset.get(), valuesAtEnd); destOffset.add(valuesAtEnd); } }); - destination.setSize(destOffset.intValue()); + destination.setSize(destOffset.get()); } // endregion fillPrevChunk diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ByteChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ByteChunkColumnSource.java index aef7dded187..b52645f878b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ByteChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ByteChunkColumnSource.java @@ -110,7 +110,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final ByteChunk byteChunk = data.get(chunkIndex); @@ -125,7 +125,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/CharChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/CharChunkColumnSource.java index f05017f37d3..57aeba11fbe 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/CharChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/CharChunkColumnSource.java @@ -106,7 +106,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final CharChunk charChunk = data.get(chunkIndex); @@ -121,7 +121,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/DoubleChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/DoubleChunkColumnSource.java index 1a1e5e812ec..d620235038c 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/DoubleChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/DoubleChunkColumnSource.java @@ -110,7 +110,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final DoubleChunk doubleChunk = data.get(chunkIndex); @@ -125,7 +125,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/FloatChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/FloatChunkColumnSource.java index 32ae99c2156..908bcc06fb4 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/FloatChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/FloatChunkColumnSource.java @@ -110,7 +110,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final FloatChunk floatChunk = data.get(chunkIndex); @@ -125,7 +125,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/IntChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/IntChunkColumnSource.java index 5f5472e7916..417c568f5fa 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/IntChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/IntChunkColumnSource.java @@ -110,7 +110,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final IntChunk intChunk = data.get(chunkIndex); @@ -125,7 +125,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/LongChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/LongChunkColumnSource.java index fee934ef14f..9db4a1ec35d 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/LongChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/LongChunkColumnSource.java @@ -110,7 +110,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final LongChunk longChunk = data.get(chunkIndex); @@ -125,7 +125,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ObjectChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ObjectChunkColumnSource.java index 5f6ce8accbd..f54a6f60ef7 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ObjectChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ObjectChunkColumnSource.java @@ -18,7 +18,6 @@ import io.deephaven.engine.table.impl.ImmutableColumnSourceGetDefaults; import io.deephaven.chunk.*; import io.deephaven.engine.rowset.RowSequence; -import io.deephaven.util.QueryConstants; import io.deephaven.util.SafeCloseable; import io.deephaven.util.mutable.MutableInt; import org.jetbrains.annotations.NotNull; @@ -110,7 +109,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final ObjectChunk ObjectChunk = data.get(chunkIndex); @@ -125,7 +124,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ShortChunkColumnSource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ShortChunkColumnSource.java index d539b0af10d..c89e46d4452 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ShortChunkColumnSource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/chunkcolumnsource/ShortChunkColumnSource.java @@ -110,7 +110,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl destination.setSize(0); rowSequence.forAllRowKeyRanges((s, e) -> { while (s <= e) { - final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.intValue()); + final int chunkIndex = getChunkIndex(s, searchStartChunkIndex.get()); final int offsetWithinChunk = (int) (s - firstOffsetForData.get(chunkIndex)); Assert.geqZero(offsetWithinChunk, "offsetWithinChunk"); final ShortChunk shortChunk = data.get(chunkIndex); @@ -125,7 +125,7 @@ public void fillChunk(@NotNull final FillContext context, @NotNull final Writabl s += length; if (s <= e) { // We have more of this range to gather from a subsequent chunk. - searchStartChunkIndex.setValue(chunkIndex + 1); + searchStartChunkIndex.set(chunkIndex + 1); } } }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableByteArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableByteArraySource.java index 7fca98204d8..86fde00f43e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableByteArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableByteArraySource.java @@ -132,7 +132,7 @@ public void fillChunk(@NotNull FillContext context, @NotNull WritableChunk void fillChunkByRanges( @NotNull final WritableChunk destination, @@ -160,7 +160,7 @@ void fillChunkByRanges( } // endregion copyFromTypedArrayImmutable }); - chunk.setSize(destPosition.intValue()); + chunk.setSize(destPosition.get()); } // endregion fillChunkByRanges @@ -178,7 +178,7 @@ void fillChunkByRanges( chunk.set(destPosition.getAndIncrement(), getUnsafe(key)); // endregion conversion }); - chunk.setSize(destPosition.intValue()); + chunk.setSize(destPosition.get()); } void fillChunkByKeys( @NotNull final WritableChunk destination, @@ -193,7 +193,7 @@ void fillChunkByKeys( chunk.set(destPosition.getAndIncrement(),converter.apply( getUnsafe(key))); // endregion conversion }); - chunk.setSize(destPosition.intValue()); + chunk.setSize(destPosition.get()); } // endregion fillChunkByKeys diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableObjectArraySource.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableObjectArraySource.java index 7986ec75894..37a7496d0f4 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableObjectArraySource.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/sources/immutable/ImmutableObjectArraySource.java @@ -129,7 +129,7 @@ public void fillChunk(@NotNull FillContext context, @NotNull WritableChunk valuesToI && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -104,9 +104,9 @@ private int insertExistingIntoLeaf(WritableByteChunk valuesToI : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableByteChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableByteChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -397,7 +397,7 @@ private void insertExisting(WritableByteChunk valuesToInsert, final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, NULL_BYTE, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -417,7 +417,7 @@ private void insertExisting(WritableByteChunk valuesToInsert, break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableByteChunk valuesToInsert, WritableIntChunk counts) { @@ -867,10 +867,10 @@ private void remove(RemoveContext removeContext, ByteChunk val final int consumed = removeFromLeaf(removeContext, valuesToRemove, counts, 0, valuesToRemove.size(), directoryValues, directoryCount, sz); assert consumed == valuesToRemove.size(); - if (sz.intValue() == 0) { + if (sz.get() == 0) { clear(); } else { - size = sz.intValue(); + size = sz.get(); } } else { removeContext.ensureLeafCount((leafCount + 1) / 2); @@ -886,9 +886,9 @@ private void remove(RemoveContext removeContext, ByteChunk val final MutableInt sz = new MutableInt(leafSizes[nextLeaf]); rpos = removeFromLeaf(removeContext, valuesToRemove, counts, rpos, valuesToRemove.size(), leafValues[nextLeaf], leafCounts[nextLeaf], sz); - size -= leafSizes[nextLeaf] - sz.intValue(); - leafSizes[nextLeaf] = sz.intValue(); - if (sz.intValue() == 0) { + size -= leafSizes[nextLeaf] - sz.get(); + leafSizes[nextLeaf] = sz.get(); + if (sz.get() == 0) { cl = markLeafForRemoval(removeContext, nextLeaf, cl); } else { // we figure out if we can be pulled back into the prior leaf @@ -1091,8 +1091,8 @@ private int removeFromLeaf(RemoveContext removeContext, ByteChunk valuesToI && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -100,9 +100,9 @@ private int insertExistingIntoLeaf(WritableCharChunk valuesToI : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableCharChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableCharChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -393,7 +393,7 @@ private void insertExisting(WritableCharChunk valuesToInsert, final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, NULL_CHAR, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -413,7 +413,7 @@ private void insertExisting(WritableCharChunk valuesToInsert, break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableCharChunk valuesToInsert, WritableIntChunk counts) { @@ -863,10 +863,10 @@ private void remove(RemoveContext removeContext, CharChunk val final int consumed = removeFromLeaf(removeContext, valuesToRemove, counts, 0, valuesToRemove.size(), directoryValues, directoryCount, sz); assert consumed == valuesToRemove.size(); - if (sz.intValue() == 0) { + if (sz.get() == 0) { clear(); } else { - size = sz.intValue(); + size = sz.get(); } } else { removeContext.ensureLeafCount((leafCount + 1) / 2); @@ -882,9 +882,9 @@ private void remove(RemoveContext removeContext, CharChunk val final MutableInt sz = new MutableInt(leafSizes[nextLeaf]); rpos = removeFromLeaf(removeContext, valuesToRemove, counts, rpos, valuesToRemove.size(), leafValues[nextLeaf], leafCounts[nextLeaf], sz); - size -= leafSizes[nextLeaf] - sz.intValue(); - leafSizes[nextLeaf] = sz.intValue(); - if (sz.intValue() == 0) { + size -= leafSizes[nextLeaf] - sz.get(); + leafSizes[nextLeaf] = sz.get(); + if (sz.get() == 0) { cl = markLeafForRemoval(removeContext, nextLeaf, cl); } else { // we figure out if we can be pulled back into the prior leaf @@ -1087,8 +1087,8 @@ private int removeFromLeaf(RemoveContext removeContext, CharChunk valuesT && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -104,9 +104,9 @@ private int insertExistingIntoLeaf(WritableDoubleChunk valuesT : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableDoubleChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableDoubleChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -397,7 +397,7 @@ private void insertExisting(WritableDoubleChunk valuesToInsert final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, NULL_DOUBLE, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -417,7 +417,7 @@ private void insertExisting(WritableDoubleChunk valuesToInsert break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableDoubleChunk valuesToInsert, WritableIntChunk counts) { @@ -867,10 +867,10 @@ private void remove(RemoveContext removeContext, DoubleChunk v final int consumed = removeFromLeaf(removeContext, valuesToRemove, counts, 0, valuesToRemove.size(), directoryValues, directoryCount, sz); assert consumed == valuesToRemove.size(); - if (sz.intValue() == 0) { + if (sz.get() == 0) { clear(); } else { - size = sz.intValue(); + size = sz.get(); } } else { removeContext.ensureLeafCount((leafCount + 1) / 2); @@ -886,9 +886,9 @@ private void remove(RemoveContext removeContext, DoubleChunk v final MutableInt sz = new MutableInt(leafSizes[nextLeaf]); rpos = removeFromLeaf(removeContext, valuesToRemove, counts, rpos, valuesToRemove.size(), leafValues[nextLeaf], leafCounts[nextLeaf], sz); - size -= leafSizes[nextLeaf] - sz.intValue(); - leafSizes[nextLeaf] = sz.intValue(); - if (sz.intValue() == 0) { + size -= leafSizes[nextLeaf] - sz.get(); + leafSizes[nextLeaf] = sz.get(); + if (sz.get() == 0) { cl = markLeafForRemoval(removeContext, nextLeaf, cl); } else { // we figure out if we can be pulled back into the prior leaf @@ -1091,8 +1091,8 @@ private int removeFromLeaf(RemoveContext removeContext, DoubleChunk valuesTo && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -104,9 +104,9 @@ private int insertExistingIntoLeaf(WritableFloatChunk valuesTo : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableFloatChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableFloatChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -397,7 +397,7 @@ private void insertExisting(WritableFloatChunk valuesToInsert, final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, NULL_FLOAT, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -417,7 +417,7 @@ private void insertExisting(WritableFloatChunk valuesToInsert, break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableFloatChunk valuesToInsert, WritableIntChunk counts) { @@ -867,10 +867,10 @@ private void remove(RemoveContext removeContext, FloatChunk va final int consumed = removeFromLeaf(removeContext, valuesToRemove, counts, 0, valuesToRemove.size(), directoryValues, directoryCount, sz); assert consumed == valuesToRemove.size(); - if (sz.intValue() == 0) { + if (sz.get() == 0) { clear(); } else { - size = sz.intValue(); + size = sz.get(); } } else { removeContext.ensureLeafCount((leafCount + 1) / 2); @@ -886,9 +886,9 @@ private void remove(RemoveContext removeContext, FloatChunk va final MutableInt sz = new MutableInt(leafSizes[nextLeaf]); rpos = removeFromLeaf(removeContext, valuesToRemove, counts, rpos, valuesToRemove.size(), leafValues[nextLeaf], leafCounts[nextLeaf], sz); - size -= leafSizes[nextLeaf] - sz.intValue(); - leafSizes[nextLeaf] = sz.intValue(); - if (sz.intValue() == 0) { + size -= leafSizes[nextLeaf] - sz.get(); + leafSizes[nextLeaf] = sz.get(); + if (sz.get() == 0) { cl = markLeafForRemoval(removeContext, nextLeaf, cl); } else { // we figure out if we can be pulled back into the prior leaf @@ -1091,8 +1091,8 @@ private int removeFromLeaf(RemoveContext removeContext, FloatChunk valuesToIn && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -104,9 +104,9 @@ private int insertExistingIntoLeaf(WritableIntChunk valuesToIn : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableIntChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableIntChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -397,7 +397,7 @@ private void insertExisting(WritableIntChunk valuesToInsert, final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, NULL_INT, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -417,7 +417,7 @@ private void insertExisting(WritableIntChunk valuesToInsert, break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableIntChunk valuesToInsert, WritableIntChunk counts) { @@ -867,10 +867,10 @@ private void remove(RemoveContext removeContext, IntChunk valu final int consumed = removeFromLeaf(removeContext, valuesToRemove, counts, 0, valuesToRemove.size(), directoryValues, directoryCount, sz); assert consumed == valuesToRemove.size(); - if (sz.intValue() == 0) { + if (sz.get() == 0) { clear(); } else { - size = sz.intValue(); + size = sz.get(); } } else { removeContext.ensureLeafCount((leafCount + 1) / 2); @@ -886,9 +886,9 @@ private void remove(RemoveContext removeContext, IntChunk valu final MutableInt sz = new MutableInt(leafSizes[nextLeaf]); rpos = removeFromLeaf(removeContext, valuesToRemove, counts, rpos, valuesToRemove.size(), leafValues[nextLeaf], leafCounts[nextLeaf], sz); - size -= leafSizes[nextLeaf] - sz.intValue(); - leafSizes[nextLeaf] = sz.intValue(); - if (sz.intValue() == 0) { + size -= leafSizes[nextLeaf] - sz.get(); + leafSizes[nextLeaf] = sz.get(); + if (sz.get() == 0) { cl = markLeafForRemoval(removeContext, nextLeaf, cl); } else { // we figure out if we can be pulled back into the prior leaf @@ -1091,8 +1091,8 @@ private int removeFromLeaf(RemoveContext removeContext, IntChunk valuesToI && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -109,9 +109,9 @@ private int insertExistingIntoLeaf(WritableLongChunk valuesToI : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableLongChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableLongChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -402,7 +402,7 @@ private void insertExisting(WritableLongChunk valuesToInsert, final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, NULL_LONG, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -422,7 +422,7 @@ private void insertExisting(WritableLongChunk valuesToInsert, break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableLongChunk valuesToInsert, WritableIntChunk counts) { @@ -872,10 +872,10 @@ private void remove(RemoveContext removeContext, LongChunk val final int consumed = removeFromLeaf(removeContext, valuesToRemove, counts, 0, valuesToRemove.size(), directoryValues, directoryCount, sz); assert consumed == valuesToRemove.size(); - if (sz.intValue() == 0) { + if (sz.get() == 0) { clear(); } else { - size = sz.intValue(); + size = sz.get(); } } else { removeContext.ensureLeafCount((leafCount + 1) / 2); @@ -891,9 +891,9 @@ private void remove(RemoveContext removeContext, LongChunk val final MutableInt sz = new MutableInt(leafSizes[nextLeaf]); rpos = removeFromLeaf(removeContext, valuesToRemove, counts, rpos, valuesToRemove.size(), leafValues[nextLeaf], leafCounts[nextLeaf], sz); - size -= leafSizes[nextLeaf] - sz.intValue(); - leafSizes[nextLeaf] = sz.intValue(); - if (sz.intValue() == 0) { + size -= leafSizes[nextLeaf] - sz.get(); + leafSizes[nextLeaf] = sz.get(); + if (sz.get() == 0) { cl = markLeafForRemoval(removeContext, nextLeaf, cl); } else { // we figure out if we can be pulled back into the prior leaf @@ -1096,8 +1096,8 @@ private int removeFromLeaf(RemoveContext removeContext, LongChunk, ObjectVector { @@ -98,8 +96,8 @@ private int insertExistingIntoLeaf(WritableObjectChunk && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -115,9 +113,9 @@ private int insertExistingIntoLeaf(WritableObjectChunk : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableObjectChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableObjectChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -408,7 +406,7 @@ private void insertExisting(WritableObjectChunk values final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, null, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -428,7 +426,7 @@ private void insertExisting(WritableObjectChunk values break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableObjectChunk valuesToInsert, WritableIntChunk counts) { @@ -878,10 +876,10 @@ private void remove(RemoveContext removeContext, ObjectChunk valuesTo && (leq(nextValue = valuesToInsert.get(ripos), maxInsert) || lastLeaf)) { if (gt(leafValues[rlpos], nextValue)) { // we're not going to find nextValue in this leaf, so we skip over it - valuesToInsert.set(wipos.intValue(), nextValue); - counts.set(wipos.intValue(), counts.get(ripos)); + valuesToInsert.set(wipos.get(), nextValue); + counts.set(wipos.get(), counts.get(ripos)); wipos.increment(); ripos++; } else { @@ -104,9 +104,9 @@ private int insertExistingIntoLeaf(WritableShortChunk valuesTo : upperBound(valuesToInsert, ripos, valuesToInsert.size(), maxInsert); // noinspection unchecked - valuesToInsert.copyFromTypedChunk((WritableShortChunk) valuesToInsert, ripos, wipos.intValue(), + valuesToInsert.copyFromTypedChunk((WritableShortChunk) valuesToInsert, ripos, wipos.get(), lastInsert - ripos); - counts.copyFromTypedChunk(counts, ripos, wipos.intValue(), lastInsert - ripos); + counts.copyFromTypedChunk(counts, ripos, wipos.get(), lastInsert - ripos); wipos.add(lastInsert - ripos); ripos = lastInsert; } @@ -397,7 +397,7 @@ private void insertExisting(WritableShortChunk valuesToInsert, final MutableInt wipos = new MutableInt(0); final int ripos = insertExistingIntoLeaf(valuesToInsert, counts, 0, wipos, size, directoryValues, directoryCount, NULL_SHORT, true); - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); return; } @@ -417,7 +417,7 @@ private void insertExisting(WritableShortChunk valuesToInsert, break; } } - maybeCompact(valuesToInsert, counts, ripos, wipos.intValue()); + maybeCompact(valuesToInsert, counts, ripos, wipos.get()); } private void insert(WritableShortChunk valuesToInsert, WritableIntChunk counts) { @@ -867,10 +867,10 @@ private void remove(RemoveContext removeContext, ShortChunk va final int consumed = removeFromLeaf(removeContext, valuesToRemove, counts, 0, valuesToRemove.size(), directoryValues, directoryCount, sz); assert consumed == valuesToRemove.size(); - if (sz.intValue() == 0) { + if (sz.get() == 0) { clear(); } else { - size = sz.intValue(); + size = sz.get(); } } else { removeContext.ensureLeafCount((leafCount + 1) / 2); @@ -886,9 +886,9 @@ private void remove(RemoveContext removeContext, ShortChunk va final MutableInt sz = new MutableInt(leafSizes[nextLeaf]); rpos = removeFromLeaf(removeContext, valuesToRemove, counts, rpos, valuesToRemove.size(), leafValues[nextLeaf], leafCounts[nextLeaf], sz); - size -= leafSizes[nextLeaf] - sz.intValue(); - leafSizes[nextLeaf] = sz.intValue(); - if (sz.intValue() == 0) { + size -= leafSizes[nextLeaf] - sz.get(); + leafSizes[nextLeaf] = sz.get(); + if (sz.get() == 0) { cl = markLeafForRemoval(removeContext, nextLeaf, cl); } else { // we figure out if we can be pulled back into the prior leaf @@ -1091,8 +1091,8 @@ private int removeFromLeaf(RemoveContext removeContext, ShortChunk outputPositions) { if (rehashPointer > 0) { - final int requiredRehash = nextChunkSize - rehashCredits.intValue(); + final int requiredRehash = nextChunkSize - rehashCredits.get(); if (requiredRehash <= 0) { return false; } @@ -301,8 +300,8 @@ public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextCh } // we can't give the caller credit for rehashes with the old table, we need to begin migrating things again - if (rehashCredits.intValue() > 0) { - rehashCredits.setValue(0); + if (rehashCredits.get() > 0) { + rehashCredits.set(0); } if (fullRehash) { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/ColumnsToRowsTransform.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/ColumnsToRowsTransform.java index d9acc2c26c5..9de2ecde91b 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/ColumnsToRowsTransform.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/ColumnsToRowsTransform.java @@ -217,16 +217,16 @@ public static Table columnsToRows(final Table source, final String labelColumn, } querySource.getColumnSourceMap().forEach((name, cs) -> { - sourceColumns[columnIndex.intValue()] = name; + sourceColumns[columnIndex.get()] = name; if (allTransposeSet.contains(name)) { for (int cc = 0; cc < transposeSet.size(); ++cc) { if (transposeSet.get(cc).contains(name)) { - resultColumnSets[columnIndex.intValue()] = result.newModifiedColumnSet(valueColumns[cc]); + resultColumnSets[columnIndex.get()] = result.newModifiedColumnSet(valueColumns[cc]); sourcesForRow[transposeIndex[cc]++].add(name); } } } else { - resultColumnSets[columnIndex.intValue()] = result.newModifiedColumnSet(name); + resultColumnSets[columnIndex.get()] = result.newModifiedColumnSet(name); } columnIndex.increment(); }); @@ -355,7 +355,7 @@ public void fillChunk(@NotNull final FillContext context, final WritableObjectChunk objectChunk = destination.asWritableObjectChunk(); destination.setSize(rowSequence.intSize()); rowSequence.forAllRowKeys(idx -> { - objectChunk.set(outputPosition.intValue(), getLabel(idx)); + objectChunk.set(outputPosition.get(), getLabel(idx)); outputPosition.increment(); }); } @@ -582,7 +582,7 @@ private void updateContext(@NotNull final TransposeFillContext context, rowSequence.forAllRowKeys(idx -> { final int sourceColumn = (int) (idx & mask); final long sourceIndex = idx >> bits; - context.outputPositions[sourceColumn].add(outputPosition.intValue()); + context.outputPositions[sourceColumn].add(outputPosition.get()); outputPosition.increment(); context.innerKeys[sourceColumn].add(sourceIndex); }); diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/GroupedWritableRowRedirection.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/GroupedWritableRowRedirection.java index e5500a0ab7f..93f256186b5 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/GroupedWritableRowRedirection.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/GroupedWritableRowRedirection.java @@ -118,7 +118,7 @@ public void fillChunk( outerRowKeys.forAllRowKeyRanges((begin, end) -> { while (begin <= end) { // figure out which group we belong to, based on the first key in the range - int slot = Arrays.binarySearch(groupSizes, lastSlot.intValue(), groupSizes.length, begin); + int slot = Arrays.binarySearch(groupSizes, lastSlot.get(), groupSizes.length, begin); if (slot < 0) { slot = ~slot; } else { @@ -126,7 +126,7 @@ public void fillChunk( slot += 1; } // for the next one we should not search the beginning of the array - lastSlot.setValue(slot); + lastSlot.set(slot); // for the first key, we have an offset of 0; for other keys we need to offset the key final long beginKeyWithOffset = slot == 0 ? begin : begin - groupSizes[slot - 1]; @@ -136,8 +136,8 @@ public void fillChunk( final WritableLongChunk chunkToFill = resettableKeys.resetFromTypedChunk( innerRowKeysTyped, - outputPosition.intValue(), - innerRowKeysTyped.size() - outputPosition.intValue()); + outputPosition.get(), + innerRowKeysTyped.size() - outputPosition.get()); if (beginKeyWithOffset > 0 || (beginKeyWithOffset + size < groups[slot].size())) { try (RowSequence rowSequenceByPosition = groups[slot].getRowSequenceByPosition(beginKeyWithOffset, size)) { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/UpdateCoalescer.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/UpdateCoalescer.java index da8ab9e866e..d3e2131001e 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/UpdateCoalescer.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/UpdateCoalescer.java @@ -139,11 +139,11 @@ private void updateShifts(final RowSetShiftData myShifts) { }; final BiConsumer consumeUntilWithExtraDelta = (endRange, extraDelta) -> { - while (outerIdx.intValue() < shifted.size() && watermarkKey.longValue() <= endRange) { + while (outerIdx.get() < shifted.size() && watermarkKey.longValue() <= endRange) { final long outerBegin = - Math.max(watermarkKey.longValue(), shifted.getBeginRange(outerIdx.intValue())); - final long outerEnd = shifted.getEndRange(outerIdx.intValue()); - final long outerDelta = shifted.getShiftDelta(outerIdx.intValue()); + Math.max(watermarkKey.longValue(), shifted.getBeginRange(outerIdx.get())); + final long outerEnd = shifted.getEndRange(outerIdx.get()); + final long outerDelta = shifted.getShiftDelta(outerIdx.get()); // Shift before the outer shift. final long headerEnd = Math.min(endRange, outerBegin - 1 + (outerDelta < 0 ? outerDelta : 0)); @@ -173,7 +173,7 @@ private void updateShifts(final RowSetShiftData myShifts) { } } - if (outerIdx.intValue() == shifted.size() && watermarkKey.longValue() <= endRange && extraDelta != 0) { + if (outerIdx.get() == shifted.size() && watermarkKey.longValue() <= endRange && extraDelta != 0) { fixShiftIfOverlap.accept(endRange, extraDelta); newShifts.shiftRange(watermarkKey.longValue(), endRange, extraDelta); } diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirection.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirection.java index 6f272cd2378..67e58767488 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirection.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirection.java @@ -132,7 +132,7 @@ default void fillFromChunk( final MutableInt offset = new MutableInt(); final LongChunk innerRowKeysTyped = innerRowKeys.asLongChunk(); outerRowKeys.forAllRowKeys(outerRowKey -> { - final long innerRowKey = innerRowKeysTyped.get(offset.intValue()); + final long innerRowKey = innerRowKeysTyped.get(offset.get()); if (innerRowKey == RowSequence.NULL_ROW_KEY) { removeVoid(outerRowKey); } else { diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirectionLockFree.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirectionLockFree.java index d6dd4d41f69..133090e06a0 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirectionLockFree.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/util/WritableRowRedirectionLockFree.java @@ -275,7 +275,7 @@ public void fillFromChunk( final MutableInt offset = new MutableInt(); final LongChunk innerRowKeysTyped = innerRowKeys.asLongChunk(); outerRowKeys.forAllRowKeys(outerRowKey -> { - updates.put(outerRowKey, innerRowKeysTyped.get(offset.intValue())); + updates.put(outerRowKey, innerRowKeysTyped.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/main/java/io/deephaven/engine/util/TickSuppressor.java b/engine/table/src/main/java/io/deephaven/engine/util/TickSuppressor.java index f993108b9f1..ec50df8eb30 100644 --- a/engine/table/src/main/java/io/deephaven/engine/util/TickSuppressor.java +++ b/engine/table/src/main/java/io/deephaven/engine/util/TickSuppressor.java @@ -194,7 +194,7 @@ public void onUpdate(TableUpdate upstream) { postChunkOk.forAllRowKeys((idx) -> { boolean idxChanged = false; for (final int cc : changedColumnIndices) { - if (changedCellsArray[cc].get(pos.intValue())) { + if (changedCellsArray[cc].get(pos.get())) { idxChanged = changedColumns[cc] = true; } } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableAggregationTest.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableAggregationTest.java index 4d503f45367..e24e815cf44 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableAggregationTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableAggregationTest.java @@ -3917,7 +3917,7 @@ public void testSymbolTableBy() throws IOException { final long[] values = new long[result.intSize()]; final MutableInt pos = new MutableInt(); result.longColumnIterator("Value").forEachRemaining((long value) -> { - values[pos.intValue()] = value; + values[pos.get()] = value; pos.increment(); }); assertArrayEquals(new long[] {0, 5, 17, 23}, values); diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableCrossJoinTestBase.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableCrossJoinTestBase.java index 4539cd9c340..640db46a26e 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableCrossJoinTestBase.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableCrossJoinTestBase.java @@ -259,7 +259,7 @@ private void testIncrementalZeroKeyJoin(final String ctxt, final int size, final final MutableInt numSteps) { final int leftSize = (int) Math.ceil(Math.sqrt(size)); - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final Random random = new Random(seed); final int numGroups = (int) Math.max(4, Math.ceil(Math.sqrt(leftSize))); @@ -279,7 +279,7 @@ private void testIncrementalZeroKeyJoin(final String ctxt, final int size, final EvalNugget.from(() -> leftTicking.join(rightStatic, emptyList(), emptyList(), numRightBitsToReserve)), }; - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { // left size is sqrt right table size; which is a good update size for the right table ExecutionContext.getContext().getUpdateGraph().cast().runWithinUnitTestCycle(() -> { final int stepInstructions = random.nextInt(); @@ -293,7 +293,7 @@ private void testIncrementalZeroKeyJoin(final String ctxt, final int size, final random, rightTicking, rightColumns); } }); - TstUtils.validate(ctxt + " step == " + numSteps.intValue(), en); + TstUtils.validate(ctxt + " step == " + numSteps.get(), en); } } @@ -503,7 +503,7 @@ public void testIncrementalOverflow() { private void testIncrementalOverflow(final String ctxt, final int numGroups, final int seed, final MutableInt numSteps) { - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final Random random = new Random(seed); // Note: make our join helper think this left table might tick @@ -565,7 +565,7 @@ int initialBuildSize() { }; final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast(); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { updateGraph.runWithinUnitTestCycle(() -> { final int stepInstructions = random.nextInt(); if (stepInstructions % 4 != 1) { @@ -580,7 +580,7 @@ int initialBuildSize() { } }); - TstUtils.validate(ctxt + " step == " + numSteps.intValue(), en); + TstUtils.validate(ctxt + " step == " + numSteps.get(), en); } } @@ -594,7 +594,7 @@ public void testIncrementalWithKeyColumns() { protected void testIncrementalWithKeyColumns(final String ctxt, final int initialSize, final int seed, final MutableInt numSteps) { - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final Random random = new Random(seed); final int numGroups = (int) Math.max(4, Math.ceil(Math.sqrt(initialSize))); @@ -630,7 +630,7 @@ protected void testIncrementalWithKeyColumns(final String ctxt, final int initia } final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast(); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { updateGraph.runWithinUnitTestCycle(() -> { final int stepInstructions = random.nextInt(); if (stepInstructions % 4 != 1) { @@ -643,7 +643,7 @@ protected void testIncrementalWithKeyColumns(final String ctxt, final int initia } }); - TstUtils.validate(ctxt + " step == " + numSteps.intValue(), en); + TstUtils.validate(ctxt + " step == " + numSteps.get(), en); } } @@ -706,43 +706,43 @@ int initialBuildSize() { } final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast(); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { - final long rightOffset = numSteps.intValue(); + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { + final long rightOffset = numSteps.get(); updateGraph.runWithinUnitTestCycle(() -> { - addToTable(leftTicking, i(numSteps.intValue()), longCol("intCol", numSteps.intValue())); + addToTable(leftTicking, i(numSteps.get()), longCol("intCol", numSteps.get())); TableUpdateImpl up = new TableUpdateImpl(); up.shifted = RowSetShiftData.EMPTY; - up.added = i(numSteps.intValue()); + up.added = i(numSteps.get()); up.removed = i(); up.modified = i(); up.modifiedColumnSet = ModifiedColumnSet.ALL; leftTicking.notifyListeners(up); - final long[] data = new long[numSteps.intValue() + 1]; - for (int i = 0; i <= numSteps.intValue(); ++i) { + final long[] data = new long[numSteps.get() + 1]; + for (int i = 0; i <= numSteps.get(); ++i) { data[i] = i; } - addToTable(rightTicking, RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.intValue()), + addToTable(rightTicking, RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.get()), longCol("intCol", data)); TstUtils.removeRows(rightTicking, i(rightOffset - 1)); up = new TableUpdateImpl(); final RowSetShiftData.Builder shifted = new RowSetShiftData.Builder(); - shifted.shiftRange(0, numSteps.intValue() + rightOffset, 1); + shifted.shiftRange(0, numSteps.get() + rightOffset, 1); up.shifted = shifted.build(); - up.added = i(rightOffset + numSteps.intValue()); + up.added = i(rightOffset + numSteps.get()); up.removed = i(); - if (numSteps.intValue() == 0) { + if (numSteps.get() == 0) { up.modified = RowSetFactory.empty(); } else { - up.modified = RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.intValue() - 1); + up.modified = RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.get() - 1); } up.modifiedColumnSet = ModifiedColumnSet.ALL; rightTicking.notifyListeners(up); }); - TstUtils.validate(" step == " + numSteps.intValue(), en); + TstUtils.validate(" step == " + numSteps.get(), en); } } } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableLeftOuterJoinTestBase.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableLeftOuterJoinTestBase.java index 945956db54a..853c2b88e24 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableLeftOuterJoinTestBase.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableLeftOuterJoinTestBase.java @@ -310,7 +310,7 @@ private void testIncrementalZeroKeyJoin(final String ctxt, final int size, final final MutableInt numSteps) { final int leftSize = (int) Math.ceil(Math.sqrt(size)); - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final Random random = new Random(seed); final int numGroups = (int) Math.max(4, Math.ceil(Math.sqrt(leftSize))); @@ -341,9 +341,9 @@ private void testIncrementalZeroKeyJoin(final String ctxt, final int size, final EvalNugget.from(() -> doLeftOuterJoin(leftTicking, rightStatic)), }; - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { if (printTableUpdates) { - System.out.println("Size = " + size + ", seed=" + seed + ", step = " + numSteps.intValue()); + System.out.println("Size = " + size + ", seed=" + seed + ", step = " + numSteps.get()); } // left size is sqrt right table size; which is a good update size for the right table final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast(); @@ -359,7 +359,7 @@ private void testIncrementalZeroKeyJoin(final String ctxt, final int size, final random, rightTicking, rightColumns); } }); - TstUtils.validate(ctxt + " step == " + numSteps.intValue(), en); + TstUtils.validate(ctxt + " step == " + numSteps.get(), en); } } @@ -1497,7 +1497,7 @@ public void testIncrementalWithKeyColumnArraysArray() { protected void testIncrementalWithKeyColumns(final String ctxt, final int initialSize, final int seed, final boolean useArrays, final MutableInt numSteps, JoinControl joinControl) { - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final Random random = new Random(seed); final int numGroups = (int) Math.max(4, Math.ceil(Math.sqrt(initialSize))); @@ -1534,8 +1534,8 @@ protected void testIncrementalWithKeyColumns(final String ctxt, final int initia } final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast(); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { - System.out.println("Seed = " + seed + ", size = " + initialSize + ", step = " + numSteps.intValue()); + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { + System.out.println("Seed = " + seed + ", size = " + initialSize + ", step = " + numSteps.get()); updateGraph.runWithinUnitTestCycle(() -> { final int stepInstructions = random.nextInt(); @@ -1549,7 +1549,7 @@ protected void testIncrementalWithKeyColumns(final String ctxt, final int initia } }); - TstUtils.validate(ctxt + " step == " + numSteps.intValue(), en); + TstUtils.validate(ctxt + " step == " + numSteps.get(), en); } } @@ -1607,43 +1607,43 @@ public double getTargetLoadFactor() { } final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast(); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { - final long rightOffset = numSteps.intValue(); + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { + final long rightOffset = numSteps.get(); updateGraph.runWithinUnitTestCycle(() -> { - addToTable(leftTicking, i(numSteps.intValue()), longCol("intCol", numSteps.intValue())); + addToTable(leftTicking, i(numSteps.get()), longCol("intCol", numSteps.get())); TableUpdateImpl up = new TableUpdateImpl(); up.shifted = RowSetShiftData.EMPTY; - up.added = i(numSteps.intValue()); + up.added = i(numSteps.get()); up.removed = i(); up.modified = i(); up.modifiedColumnSet = ModifiedColumnSet.ALL; leftTicking.notifyListeners(up); - final long[] data = new long[numSteps.intValue() + 1]; - for (int i = 0; i <= numSteps.intValue(); ++i) { + final long[] data = new long[numSteps.get() + 1]; + for (int i = 0; i <= numSteps.get(); ++i) { data[i] = i; } - addToTable(rightTicking, RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.intValue()), + addToTable(rightTicking, RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.get()), longCol("intCol", data)); TstUtils.removeRows(rightTicking, i(rightOffset - 1)); up = new TableUpdateImpl(); final RowSetShiftData.Builder shifted = new RowSetShiftData.Builder(); - shifted.shiftRange(0, numSteps.intValue() + rightOffset, 1); + shifted.shiftRange(0, numSteps.get() + rightOffset, 1); up.shifted = shifted.build(); - up.added = i(rightOffset + numSteps.intValue()); + up.added = i(rightOffset + numSteps.get()); up.removed = i(); - if (numSteps.intValue() == 0) { + if (numSteps.get() == 0) { up.modified = RowSetFactory.empty(); } else { - up.modified = RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.intValue() - 1); + up.modified = RowSetFactory.fromRange(rightOffset, rightOffset + numSteps.get() - 1); } up.modifiedColumnSet = ModifiedColumnSet.ALL; rightTicking.notifyListeners(up); }); - TstUtils.validate(" step == " + numSteps.intValue(), en); + TstUtils.validate(" step == " + numSteps.get(), en); } } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableNaturalJoinTest.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableNaturalJoinTest.java index 9bd0b8450f8..5ba3bec89c2 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableNaturalJoinTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableNaturalJoinTest.java @@ -123,12 +123,12 @@ public Table e() { final int ii = (int) ll; if (ii % 2 == 0) { // make something that exists go away - rightModifications[position.intValue()] = Integer.toString(ii * 10 + 2); + rightModifications[position.get()] = Integer.toString(ii * 10 + 2); } else { // make something that did not exist come back - rightModifications[position.intValue()] = Integer.toString(ii * 10); + rightModifications[position.get()] = Integer.toString(ii * 10); } - rightModifySentinel[position.intValue()] = ii * 100 + 25; + rightModifySentinel[position.get()] = ii * 100 + 25; position.increment(); }); @@ -275,7 +275,7 @@ private static void testNaturalJoinIncremental(boolean leftStatic, boolean right boolean leftIndexed, boolean rightIndexed, JoinIncrement joinIncrement, long seed, MutableInt numSteps, JoinControl control) { final Random random = new Random(seed); - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final ColumnInfo[] rightColumnInfo; final UniqueIntGenerator rightIntGenerator = @@ -346,9 +346,9 @@ public Table e() { final int leftStepSize = (int) Math.ceil(Math.sqrt(leftSize)); final int rightStepSize = (int) Math.ceil(Math.sqrt(rightSize)); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { if (printTableUpdates) { - System.out.println("Step = " + numSteps.intValue() + ", leftSize=" + leftSize + ", rightSize=" + System.out.println("Step = " + numSteps.get() + ", leftSize=" + leftSize + ", rightSize=" + rightSize + ", seed = " + seed + ", joinIncrement=" + joinIncrement); System.out.println("Left Table:" + leftTable.size()); TableTools.showWithRowSet(leftTable, 100); diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSelectUpdateTest.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSelectUpdateTest.java index ad191613627..d0173467f5b 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSelectUpdateTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSelectUpdateTest.java @@ -668,10 +668,10 @@ private void testUpdateIncremental(final int seed, MutableInt numSteps) { .select("Time", "Diff = Time_[i]")), }; - final int maxSteps = numSteps.intValue(); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + final int maxSteps = numSteps.get(); + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { if (RefreshingTableTestCase.printTableUpdates) { - System.out.println("Step = " + numSteps.intValue()); + System.out.println("Step = " + numSteps.get()); } RefreshingTableTestCase.simulateShiftAwareStep(size, random, queryTable, columnInfo, en); } @@ -748,10 +748,10 @@ private void testUpdateIncrementalRandomized(final int seed, MutableInt numSteps "Concat=UC + FC")), }; - final int maxSteps = numSteps.intValue(); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + final int maxSteps = numSteps.get(); + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { if (RefreshingTableTestCase.printTableUpdates) { - System.out.println("Step = " + numSteps.intValue()); + System.out.println("Step = " + numSteps.get()); } RefreshingTableTestCase.simulateShiftAwareStep(size, random, queryTable, columnInfo, en); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSortTest.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSortTest.java index e57626d37a7..782cee2d306 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSortTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/QueryTableSortTest.java @@ -413,7 +413,7 @@ public Table e() { } private void testSortIncremental(final String ctxt, final int size, int seed, MutableInt numSteps) { - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final Random random = new Random(seed); final ColumnInfo[] columnInfo = getIncrementalColumnInfo(); final QueryTable queryTable = getTable(size, random, columnInfo); @@ -457,8 +457,8 @@ private void testSortIncremental(final String ctxt, final int size, int seed, Mu EvalNugget.from(() -> queryTable.sort(List.of(SortColumn.desc(ColumnName.of("bigD"))))), }; - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { - simulateShiftAwareStep(ctxt + " step == " + numSteps.intValue(), size, random, queryTable, columnInfo, en); + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { + simulateShiftAwareStep(ctxt + " step == " + numSteps.get(), size, random, queryTable, columnInfo, en); } } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ShiftedColumnOperationTest.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ShiftedColumnOperationTest.java index 0e661257163..c0a64601cb5 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ShiftedColumnOperationTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ShiftedColumnOperationTest.java @@ -2616,10 +2616,10 @@ public WritableRowSet invert(RowSet keys) { while (okIt.hasMore()) { sharedContext.reset(); final RowSequence chunkOk = okIt.getNextRowSequenceWithLength(chunkSize); - final int invertStart = invertCount.intValue(); + final int invertStart = invertCount.get(); final LongChunk ck1 = scs.getChunk(gc, chunkOk).asLongChunk(); final LongChunk ck2 = s2cs.getChunk(gc2, chunkOk).asLongChunk(); - final int invertEnd = invertCount.intValue(); + final int invertEnd = invertCount.get(); Assert.assertEquals(1, invertEnd - invertStart); chunkOk.fillRowKeyChunk(expect); for (int ii = 0; ii < expect.size(); ++ii) { diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestConcurrentInstantiation.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestConcurrentInstantiation.java index c1fd1721878..0ac26ce15d1 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestConcurrentInstantiation.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestConcurrentInstantiation.java @@ -693,7 +693,7 @@ private void testIterative(List> transformations, int see final int size = 100; final Random random = new Random(seed); - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final QueryTable table = getTable(size, random, columnInfos = initColumnInfos(new String[] {"Sym", "intCol", "boolCol", "boolCol2", "doubleCol"}, @@ -769,8 +769,8 @@ private void testIterative(List> transformations, int see showWithRowSet(table); } - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { - final int i = numSteps.intValue(); + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { + final int i = numSteps.get(); if (RefreshingTableTestCase.printTableUpdates) { System.out.println("Step = " + i); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestTableUpdateValidator.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestTableUpdateValidator.java index 408002f5202..ee0749adae4 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestTableUpdateValidator.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestTableUpdateValidator.java @@ -91,7 +91,7 @@ public void testInvalid() { table3.removeUpdateListener(listener); // next should fail because we set mult - mult.setValue(3); + mult.set(3); updateGraph.runWithinUnitTestCycle(() -> { addToTable(table1, i(6), intCol("x", 5)); diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/indexer/TestDataIndexer.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/indexer/TestDataIndexer.java index 141a77dc958..f2b16d6490e 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/indexer/TestDataIndexer.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/indexer/TestDataIndexer.java @@ -125,14 +125,14 @@ private void testIndex(final boolean immutableColumns, final Random random, fina .computeLocked(() -> merged.update("HiLo = intCol > 50 ? `Hi` : `Lo`")); addIndexValidator(updated, "updated"); - final int maxSteps = numSteps.intValue(); // 8; + final int maxSteps = numSteps.get(); // 8; if (RefreshingTableTestCase.printTableUpdates) { System.out.println("Initial QueryTable: "); TableTools.showWithRowSet(queryTable); } - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { ExecutionContext.getContext().getUpdateGraph().cast().runWithinUnitTestCycle(() -> { generateTableUpdates(size, random, queryTable, columnInfo); }); diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestByteSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestByteSegmentedSortedMultiset.java index 09af60d7837..f00349ee6d8 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestByteSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestByteSegmentedSortedMultiset.java @@ -326,8 +326,8 @@ private void checkSsm(ByteSegmentedSortedMultiset ssm, ByteChunk { - assertEquals((byte) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((byte) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestCharSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestCharSegmentedSortedMultiset.java index d45843c0955..3f89aa30e57 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestCharSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestCharSegmentedSortedMultiset.java @@ -323,8 +323,8 @@ private void checkSsm(CharSegmentedSortedMultiset ssm, CharChunk { - assertEquals((char) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((char) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestDoubleSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestDoubleSegmentedSortedMultiset.java index 518437dd3cb..49f6df6fb13 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestDoubleSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestDoubleSegmentedSortedMultiset.java @@ -326,8 +326,8 @@ private void checkSsm(DoubleSegmentedSortedMultiset ssm, DoubleChunk { - assertEquals((double) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((double) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestFloatSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestFloatSegmentedSortedMultiset.java index 2f5e9f45570..6c0b207e5b2 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestFloatSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestFloatSegmentedSortedMultiset.java @@ -326,8 +326,8 @@ private void checkSsm(FloatSegmentedSortedMultiset ssm, FloatChunk { - assertEquals((float) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((float) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestIntSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestIntSegmentedSortedMultiset.java index 3cc57ead63b..9ffc46e1fe8 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestIntSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestIntSegmentedSortedMultiset.java @@ -326,8 +326,8 @@ private void checkSsm(IntSegmentedSortedMultiset ssm, IntChunk final MutableInt offset = new MutableInt(0); checkMap.forEach((key, count) -> { - assertEquals((int) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((int) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestLongSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestLongSegmentedSortedMultiset.java index 6da1ac27416..7b8d45af7cf 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestLongSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestLongSegmentedSortedMultiset.java @@ -326,8 +326,8 @@ private void checkSsm(LongSegmentedSortedMultiset ssm, LongChunk { - assertEquals((long) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((long) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestObjectSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestObjectSegmentedSortedMultiset.java index 55209cb1cb3..7c88aaab4bd 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestObjectSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestObjectSegmentedSortedMultiset.java @@ -14,9 +14,7 @@ import io.deephaven.engine.testutil.ColumnInfo; import io.deephaven.engine.testutil.ControlledUpdateGraph; import io.deephaven.engine.testutil.GenerateTableUpdates; -import io.deephaven.engine.testutil.TstUtils; import io.deephaven.engine.testutil.testcase.RefreshingTableTestCase; -import io.deephaven.engine.util.TableTools; import io.deephaven.util.compare.ObjectComparisons; import io.deephaven.util.datastructures.LongSizedDataStructure; import io.deephaven.engine.liveness.LivenessScope; @@ -314,8 +312,8 @@ private void checkSsm(ObjectSegmentedSortedMultiset ssm, ObjectChunk { - assertEquals((Object) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((Object) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestShortSegmentedSortedMultiset.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestShortSegmentedSortedMultiset.java index 587e379abe3..ace0901ca85 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestShortSegmentedSortedMultiset.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/ssms/TestShortSegmentedSortedMultiset.java @@ -326,8 +326,8 @@ private void checkSsm(ShortSegmentedSortedMultiset ssm, ShortChunk { - assertEquals((short) key, keys.get(offset.intValue())); - assertEquals((long) count, counts.get(offset.intValue())); + assertEquals((short) key, keys.get(offset.get())); + assertEquals((long) count, counts.get(offset.get())); offset.increment(); }); } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/util/RowRedirectionLockFreeTest.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/util/RowRedirectionLockFreeTest.java index b43b075de67..5c8daf5ee64 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/util/RowRedirectionLockFreeTest.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/util/RowRedirectionLockFreeTest.java @@ -219,11 +219,11 @@ protected final void doOneIteration() { // A bit of a waste because we only look at the first 'numKeysToInsert' keys, but that's ok. updateGraph.runWithinUnitTestCycle(() -> { final long step = updateGraph.clock().currentStep(); - keysInThisGeneration.setValue((int) ((step - initialStep) * 1000 + 1000)); + keysInThisGeneration.set((int) ((step - initialStep) * 1000 + 1000)); final Random rng = new Random(step); - final int numKeysToInsert = rng.nextInt(keysInThisGeneration.intValue()); + final int numKeysToInsert = rng.nextInt(keysInThisGeneration.get()); // A bit of a waste because we only look at the first 'numKeysToInsert' keys, but that's ok. - long[] keys = fillAndShuffle(rng, keysInThisGeneration.intValue()); + long[] keys = fillAndShuffle(rng, keysInThisGeneration.get()); final WritableRowRedirectionLockFree ix = index; for (int ii1 = 0; ii1 < numKeysToInsert; ++ii1) { final long key = keys[ii1]; @@ -239,7 +239,7 @@ protected final void doOneIteration() { // waste some time doing something else final WritableRowRedirectionLockFree privateIndex = new RowRedirectionLockFreeFactory().createRowRedirection(10); - for (long ii = 0; ii < keysInThisGeneration.intValue() * 4L; ++ii) { + for (long ii = 0; ii < keysInThisGeneration.get() * 4L; ++ii) { privateIndex.put(ii, ii); } } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/util/TestRedirectedColumnSource.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/util/TestRedirectedColumnSource.java index 280ffc08c5e..90be48d1059 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/util/TestRedirectedColumnSource.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/util/TestRedirectedColumnSource.java @@ -75,7 +75,7 @@ private void doCheck( final MutableInt pos = new MutableInt(); rs.forAllRowKeys(k -> { final String s = (String) cs.get(k); - assertEquals("offset=" + (pos.intValue() + offset) + ", k=" + k, s, chunk.get(pos.intValue())); + assertEquals("offset=" + (pos.get() + offset) + ", k=" + k, s, chunk.get(pos.get())); pos.increment(); }); } @@ -155,7 +155,7 @@ public void testIds6196() { final byte[] expecteds = new byte[6]; final MutableInt idx = new MutableInt(); Stream.of(true, null, false, null, null, null).forEach(boolVal -> { - expecteds[idx.intValue()] = BooleanUtils.booleanAsByte(boolVal); + expecteds[idx.get()] = BooleanUtils.booleanAsByte(boolVal); idx.increment(); }); assertArrayEquals(expecteds, byteList.toArray()); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/QueryTableTestBase.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/QueryTableTestBase.java index 3e65e938190..049db709b59 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/QueryTableTestBase.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/QueryTableTestBase.java @@ -177,7 +177,7 @@ public static int[] intColumn(Table table, String column) { final int[] result = new int[table.intSize()]; final MutableInt pos = new MutableInt(); table.integerColumnIterator(column).forEachRemaining((int value) -> { - result[pos.intValue()] = value; + result[pos.get()] = value; pos.increment(); }); return result; diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/TstUtils.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/TstUtils.java index 8da143042c0..6e6266b8a2c 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/TstUtils.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/TstUtils.java @@ -913,11 +913,11 @@ public static void findMinimalTestCase(final RefreshingTableTestCase test, final boolean failed = false; MutableInt maxSteps = new MutableInt(initialSteps); for (int seed = initialSeed; seed < maxSeed; ++seed) { - if (maxSteps.intValue() <= 0) { + if (maxSteps.get() <= 0) { System.out.println("Best Run: bestSeed=" + bestSeed + " bestSteps=" + bestSteps); return; } - System.out.println("Running: seed=" + seed + " numSteps=" + maxSteps.intValue() + " bestSeed=" + bestSeed + System.out.println("Running: seed=" + seed + " numSteps=" + maxSteps.get() + " bestSeed=" + bestSeed + " bestSteps=" + bestSteps); if (seed != initialSeed) { try { @@ -938,9 +938,9 @@ public static void findMinimalTestCase(final RefreshingTableTestCase test, final } catch (Exception | Error e) { failed = true; bestSeed = seed; - bestSteps = maxSteps.intValue() + 1; + bestSteps = maxSteps.get() + 1; e.printStackTrace(); - System.out.println("Candidate: seed=" + seed + " numSteps=" + (maxSteps.intValue() + 1)); + System.out.println("Candidate: seed=" + seed + " numSteps=" + (maxSteps.get() + 1)); } } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ByteTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ByteTestSource.java index 4f438ef6d1c..36997719baf 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ByteTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ByteTestSource.java @@ -89,7 +89,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); @@ -100,7 +100,7 @@ public void accept(final long v) { @Override public void accept(final long v) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); ii.increment(); } }); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/CharTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/CharTestSource.java index 76bfdde5a2a..3492187382c 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/CharTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/CharTestSource.java @@ -85,7 +85,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); @@ -96,7 +96,7 @@ public void accept(final long v) { @Override public void accept(final long v) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); ii.increment(); } }); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/DoubleTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/DoubleTestSource.java index 0d1200b54e2..5ff5a5eb85c 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/DoubleTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/DoubleTestSource.java @@ -89,7 +89,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); @@ -100,7 +100,7 @@ public void accept(final long v) { @Override public void accept(final long v) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); ii.increment(); } }); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/FloatTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/FloatTestSource.java index 88dc891c3c1..75727875e0b 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/FloatTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/FloatTestSource.java @@ -89,7 +89,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); @@ -100,7 +100,7 @@ public void accept(final long v) { @Override public void accept(final long v) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); ii.increment(); } }); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableByteTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableByteTestSource.java index 0ce296a07bc..705f38d850f 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableByteTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableByteTestSource.java @@ -77,7 +77,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } @@ -91,7 +91,7 @@ public void accept(final long v) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableCharTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableCharTestSource.java index 44c1a284f0e..f44a08610db 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableCharTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableCharTestSource.java @@ -73,7 +73,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } @@ -87,7 +87,7 @@ public void accept(final long v) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableDoubleTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableDoubleTestSource.java index 73eae42886a..ebc6c99da9a 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableDoubleTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableDoubleTestSource.java @@ -77,7 +77,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } @@ -91,7 +91,7 @@ public void accept(final long v) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableFloatTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableFloatTestSource.java index 13f907a3649..898f4f729a4 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableFloatTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableFloatTestSource.java @@ -77,7 +77,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } @@ -91,7 +91,7 @@ public void accept(final long v) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableIntTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableIntTestSource.java index ff8bd6571e0..861902ed16b 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableIntTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableIntTestSource.java @@ -77,7 +77,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } @@ -91,7 +91,7 @@ public void accept(final long v) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableLongTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableLongTestSource.java index c33bf786b67..cc6a6ec3c2d 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableLongTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableLongTestSource.java @@ -77,7 +77,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } @@ -91,7 +91,7 @@ public void accept(final long v) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableObjectTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableObjectTestSource.java index ddfe85acc56..86e62718bac 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableObjectTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableObjectTestSource.java @@ -10,15 +10,12 @@ import io.deephaven.base.verify.Assert; import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.Chunk; -import io.deephaven.chunk.ChunkType; -import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.attributes.Values; import io.deephaven.engine.rowset.RowSet; import io.deephaven.engine.rowset.RowSetBuilderSequential; import io.deephaven.engine.rowset.RowSetFactory; import io.deephaven.engine.table.impl.AbstractColumnSource; import io.deephaven.engine.table.impl.ImmutableColumnSourceGetDefaults; -import io.deephaven.util.type.TypeUtils; import io.deephaven.util.mutable.MutableInt; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; @@ -77,7 +74,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableShortTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableShortTestSource.java index 6fd13f2fbd2..6edd89a8b47 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableShortTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ImmutableShortTestSource.java @@ -77,7 +77,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); } ii.increment(); } @@ -91,7 +91,7 @@ public void accept(final long v) { public void accept(final long v) { // the unit test framework will ask us to add things, we need to conveniently ignore it if (!data.containsKey(v)) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); } ii.increment(); } diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/IntTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/IntTestSource.java index f0171e2eda0..31e01a03991 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/IntTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/IntTestSource.java @@ -89,7 +89,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); @@ -100,7 +100,7 @@ public void accept(final long v) { @Override public void accept(final long v) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); ii.increment(); } }); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/LongTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/LongTestSource.java index 5ae67ceb9ec..027fdc0de5f 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/LongTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/LongTestSource.java @@ -89,7 +89,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); @@ -100,7 +100,7 @@ public void accept(final long v) { @Override public void accept(final long v) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); ii.increment(); } }); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ObjectTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ObjectTestSource.java index f7a55f1d0f1..9980f6eb900 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ObjectTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ObjectTestSource.java @@ -10,8 +10,6 @@ import io.deephaven.base.verify.Assert; import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.Chunk; -import io.deephaven.chunk.ChunkType; -import io.deephaven.chunk.ObjectChunk; import io.deephaven.chunk.attributes.Values; import io.deephaven.engine.rowset.RowSet; import io.deephaven.engine.rowset.RowSetBuilderRandom; @@ -21,7 +19,6 @@ import io.deephaven.engine.updategraph.TerminalNotification; import io.deephaven.engine.updategraph.UpdateCommitter; import io.deephaven.util.mutable.MutableInt; -import io.deephaven.util.type.TypeUtils; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; import java.util.function.LongConsumer; @@ -87,7 +84,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); diff --git a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ShortTestSource.java b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ShortTestSource.java index 6e527193a11..30e03f831f1 100644 --- a/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ShortTestSource.java +++ b/engine/test-utils/src/main/java/io/deephaven/engine/testutil/sources/ShortTestSource.java @@ -89,7 +89,7 @@ public synchronized void add(final RowSet rowSet, Chunk vs) { @Override public void accept(final long v) { - data.put(v, vcs.get(ii.intValue())); + data.put(v, vcs.get(ii.get())); ii.increment(); } }); @@ -100,7 +100,7 @@ public void accept(final long v) { @Override public void accept(final long v) { - data.put(v, TypeUtils.unbox(vcs.get(ii.intValue()))); + data.put(v, TypeUtils.unbox(vcs.get(ii.get()))); ii.increment(); } }); diff --git a/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/BarrageStreamGeneratorImpl.java b/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/BarrageStreamGeneratorImpl.java index 52fc71fe4ed..6a4fae92ee3 100644 --- a/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/BarrageStreamGeneratorImpl.java +++ b/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/BarrageStreamGeneratorImpl.java @@ -650,8 +650,8 @@ private InputStream getInputStream(final View view, final long offset, final int // These buffers must be aligned to an 8-byte boundary in order for efficient alignment in languages like // C++. - if (size.intValue() % 8 != 0) { - final int paddingBytes = (8 - (size.intValue() % 8)); + if (size.get() % 8 != 0) { + final int paddingBytes = (8 - (size.get() % 8)); size.add(paddingBytes); streams.add(new DrainableByteArrayInputStream(PADDING_BUFFER, 0, paddingBytes)); } @@ -684,7 +684,7 @@ private InputStream getInputStream(final View view, final long offset, final int }; numRows = columnVisitor.visit(view, offset, targetBatchSize, addStream, fieldNodeListener, bufferListener); - actualBatchSize.setValue(numRows); + actualBatchSize.set(numRows); final WritableChunk noChunk = nodeOffsets.get(); RecordBatch.startNodesVector(header, noChunk.size()); @@ -715,7 +715,7 @@ private InputStream getInputStream(final View view, final long offset, final int final int headerOffset = RecordBatch.endRecordBatch(header); header.finish(MessageHelper.wrapInMessage(header, headerOffset, - org.apache.arrow.flatbuf.MessageHeader.RecordBatch, size.intValue())); + org.apache.arrow.flatbuf.MessageHeader.RecordBatch, size.get())); // now create the proto header try (final ExposedByteArrayOutputStream baos = new ExposedByteArrayOutputStream()) { @@ -744,7 +744,7 @@ protected void writeHeader( } cos.writeTag(Flight.FlightData.DATA_BODY_FIELD_NUMBER, WireFormat.WIRETYPE_LENGTH_DELIMITED); - cos.writeUInt32NoTag(size.intValue()); + cos.writeUInt32NoTag(size.get()); cos.flush(); } @@ -784,7 +784,7 @@ private void processBatches(Consumer visitor, final View view, getInputStream(view, offset, batchSize, actualBatchSize, metadata, columnVisitor); int bytesToWrite = is.available(); - if (actualBatchSize.intValue() == 0) { + if (actualBatchSize.get() == 0) { throw new IllegalStateException("No data was written for a batch"); } @@ -795,7 +795,7 @@ private void processBatches(Consumer visitor, final View view, visitor.accept(is); bytesWritten.add(bytesToWrite); - offset += actualBatchSize.intValue(); + offset += actualBatchSize.get(); metadata = null; } else { // can't write this, so close the input stream and retry @@ -804,7 +804,7 @@ private void processBatches(Consumer visitor, final View view, } // recompute the batch limit for the next message - int bytesPerRow = bytesToWrite / actualBatchSize.intValue(); + int bytesPerRow = bytesToWrite / actualBatchSize.get(); if (bytesPerRow > 0) { int rowLimit = maxMessageSize / bytesPerRow; diff --git a/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/VarBinaryChunkInputStreamGenerator.java b/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/VarBinaryChunkInputStreamGenerator.java index 5f090472c79..3b28b8a3458 100644 --- a/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/VarBinaryChunkInputStreamGenerator.java +++ b/extensions/barrage/src/main/java/io/deephaven/extensions/barrage/chunk/VarBinaryChunkInputStreamGenerator.java @@ -363,7 +363,7 @@ public int drainTo(final OutputStream outputStream) throws IOException { try { logicalSize.add(LongSizedDataStructure.intSize("int cast", byteStorage.getPayloadSize((int) idx, (int) idx))); - dos.writeInt(logicalSize.intValue()); + dos.writeInt(logicalSize.get()); } catch (final IOException e) { throw new UncheckedDeephavenException("couldn't drain data to OutputStream", e); } diff --git a/extensions/parquet/table/src/test/java/io/deephaven/parquet/table/ParquetTableReadWriteTest.java b/extensions/parquet/table/src/test/java/io/deephaven/parquet/table/ParquetTableReadWriteTest.java index b7e192bd764..f7ed18a056f 100644 --- a/extensions/parquet/table/src/test/java/io/deephaven/parquet/table/ParquetTableReadWriteTest.java +++ b/extensions/parquet/table/src/test/java/io/deephaven/parquet/table/ParquetTableReadWriteTest.java @@ -3260,11 +3260,11 @@ private void assertBooleanColumnStatistics(SerialByteColumnIterator iterator, St if (value == NULL_BYTE) { nullCount.increment(); } else { - if (min.intValue() == NULL_BYTE || value < min.intValue()) { - min.setValue(value); + if (min.get() == NULL_BYTE || value < min.get()) { + min.set(value); } - if (max.intValue() == NULL_BYTE || value > max.intValue()) { - max.setValue(value); + if (max.get() == NULL_BYTE || value > max.get()) { + max.set(value); } } }); @@ -3272,8 +3272,8 @@ private void assertBooleanColumnStatistics(SerialByteColumnIterator iterator, St assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue() == 1, statistics.genericGetMin()); - assertEquals(max.intValue() == 1, statistics.genericGetMax()); + assertEquals(min.get() == 1, statistics.genericGetMin()); + assertEquals(max.get() == 1, statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3298,11 +3298,11 @@ private void assertBooleanArrayColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value ? 1 : 0); + if (max.get() == NULL_BYTE || (value ? 1 : 0) > max.get()) { + max.set(value ? 1 : 0); } } } @@ -3311,8 +3311,8 @@ private void assertBooleanArrayColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_BYTE || value > max.get()) { + max.set(value); } } }); @@ -3342,8 +3342,8 @@ private void assertByteColumnStatistics(SerialByteColumnIterator iterator, Stati assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue(), (int) statistics.genericGetMin()); - assertEquals(max.intValue(), (int) statistics.genericGetMax()); + assertEquals(min.get(), (int) statistics.genericGetMin()); + assertEquals(max.get(), (int) statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3368,11 +3368,11 @@ private void assertByteArrayColumnStatistics(SerialObjectColumnIterator if (value == NULL_BYTE) { nullCount.increment(); } else { - if (min.intValue() == NULL_BYTE || value < min.intValue()) { - min.setValue(value); + if (min.get() == NULL_BYTE || value < min.get()) { + min.set(value); } - if (max.intValue() == NULL_BYTE || value > max.intValue()) { - max.setValue(value); + if (max.get() == NULL_BYTE || value > max.get()) { + max.set(value); } } } @@ -3381,8 +3381,8 @@ private void assertByteArrayColumnStatistics(SerialObjectColumnIterator assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue(), (int) statistics.genericGetMin()); - assertEquals(max.intValue(), (int) statistics.genericGetMax()); + assertEquals(min.get(), (int) statistics.genericGetMin()); + assertEquals(max.get(), (int) statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3407,11 +3407,11 @@ private void assertByteVectorColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_BYTE || value > max.get()) { + max.set(value); } } } @@ -3420,8 +3420,8 @@ private void assertByteVectorColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_CHAR || value > max.get()) { + max.set(value); } } }); @@ -3451,8 +3451,8 @@ private void assertCharColumnStatistics(SerialCharacterColumnIterator iterator, assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue(), (int) statistics.genericGetMin()); - assertEquals(max.intValue(), (int) statistics.genericGetMax()); + assertEquals(min.get(), (int) statistics.genericGetMin()); + assertEquals(max.get(), (int) statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3477,11 +3477,11 @@ private void assertCharArrayColumnStatistics(SerialObjectColumnIterator if (value == NULL_CHAR) { nullCount.increment(); } else { - if (min.intValue() == NULL_CHAR || value < min.intValue()) { - min.setValue(value); + if (min.get() == NULL_CHAR || value < min.get()) { + min.set(value); } - if (max.intValue() == NULL_CHAR || value > max.intValue()) { - max.setValue(value); + if (max.get() == NULL_CHAR || value > max.get()) { + max.set(value); } } } @@ -3490,8 +3490,8 @@ private void assertCharArrayColumnStatistics(SerialObjectColumnIterator assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue(), (int) statistics.genericGetMin()); - assertEquals(max.intValue(), (int) statistics.genericGetMax()); + assertEquals(min.get(), (int) statistics.genericGetMin()); + assertEquals(max.get(), (int) statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3516,11 +3516,11 @@ private void assertCharVectorColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_CHAR || value > max.get()) { + max.set(value); } } } @@ -3529,8 +3529,8 @@ private void assertCharVectorColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_SHORT || value > max.get()) { + max.set(value); } } }); @@ -3560,8 +3560,8 @@ private void assertShortColumnStatistics(SerialShortColumnIterator iterator, Sta assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue(), (int) statistics.genericGetMin()); - assertEquals(max.intValue(), (int) statistics.genericGetMax()); + assertEquals(min.get(), (int) statistics.genericGetMin()); + assertEquals(max.get(), (int) statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3586,11 +3586,11 @@ private void assertShortArrayColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_SHORT || value > max.get()) { + max.set(value); } } } @@ -3599,8 +3599,8 @@ private void assertShortArrayColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_SHORT || value > max.get()) { + max.set(value); } } } @@ -3638,8 +3638,8 @@ private void assertShortVectorColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_INT || value > max.get()) { + max.set(value); } } }); @@ -3669,8 +3669,8 @@ private void assertIntColumnStatistics(SerialIntegerColumnIterator iterator, Sta assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue(), (int) statistics.genericGetMin()); - assertEquals(max.intValue(), (int) statistics.genericGetMax()); + assertEquals(min.get(), (int) statistics.genericGetMin()); + assertEquals(max.get(), (int) statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3695,11 +3695,11 @@ private void assertIntArrayColumnStatistics(SerialObjectColumnIterator it if (value == NULL_INT) { nullCount.increment(); } else { - if (min.intValue() == NULL_INT || value < min.intValue()) { - min.setValue(value); + if (min.get() == NULL_INT || value < min.get()) { + min.set(value); } - if (max.intValue() == NULL_INT || value > max.intValue()) { - max.setValue(value); + if (max.get() == NULL_INT || value > max.get()) { + max.set(value); } } } @@ -3708,8 +3708,8 @@ private void assertIntArrayColumnStatistics(SerialObjectColumnIterator it assertEquals(nullCount.longValue(), statistics.getNumNulls()); if (itemCount.longValue() != nullCount.longValue()) { // There are some non-null values, so min and max should be non-null and equal to observed values. - assertEquals(min.intValue(), (int) statistics.genericGetMin()); - assertEquals(max.intValue(), (int) statistics.genericGetMax()); + assertEquals(min.get(), (int) statistics.genericGetMin()); + assertEquals(max.get(), (int) statistics.genericGetMax()); } else { // Everything is null, statistics should be empty. assertFalse(statistics.hasNonNullValue()); @@ -3734,11 +3734,11 @@ private void assertIntVectorColumnStatistics(SerialObjectColumnIterator max.intValue()) { - max.setValue(value); + if (max.get() == NULL_INT || value > max.get()) { + max.set(value); } } } @@ -3747,8 +3747,8 @@ private void assertIntVectorColumnStatistics(SerialObjectColumnIterator= size) { - numSteps.setValue(maxSteps); // pretend we finished + numSteps.set(maxSteps); // pretend we finished return; } } @@ -751,13 +751,13 @@ private abstract class SubscriptionChangingHelper extends SharedProducerForAllCl void runTest() { createTable(); createNuggets(); - final int maxSteps = numSteps.intValue(); + final int maxSteps = numSteps.get(); final RemoteNugget[] nuggetsToValidate = nuggets.toArray(new RemoteNugget[0]); - for (numSteps.setValue(0); numSteps.intValue() < maxSteps; numSteps.increment()) { + for (numSteps.set(0); numSteps.get() < maxSteps; numSteps.increment()) { for (int rt = 0; rt < numConsumerCoalesce; ++rt) { // coalesce updates in producer for (int pt = 0; pt < numProducerCoalesce; ++pt) { - maybeChangeSub(numSteps.intValue(), rt, pt); + maybeChangeSub(numSteps.get(), rt, pt); final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast(); updateGraph.runWithinUnitTestCycle(() -> GenerateTableUpdates.generateShiftAwareTableUpdates( diff --git a/server/test-utils/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java b/server/test-utils/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java index 7a67b1c31f2..2811d3e04f4 100644 --- a/server/test-utils/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java +++ b/server/test-utils/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java @@ -716,7 +716,7 @@ public void testFlightInfo() { } }); - Assert.eq(seenTables.intValue(), "seenTables.intValue()", 2); + Assert.eq(seenTables.get(), "seenTables.intValue()", 2); } @Test @@ -749,7 +749,7 @@ public void testGetSchema() { } }); - Assert.eq(seenTables.intValue(), "seenTables.intValue()", 2); + Assert.eq(seenTables.get(), "seenTables.intValue()", 2); } @Test @@ -881,13 +881,13 @@ public T transform(T source) { ExecutionContext.getContext().getQueryScope().putParam(tableName, table); // export from query scope to our session; this transforms the table - assertEquals(0, numTransforms.intValue()); + assertEquals(0, numTransforms.get()); try (final TableHandle handle = clientSession.execute(TicketTable.fromQueryScopeField(tableName))) { // place the transformed table into the scope; wait on the future to ensure the server-side operation // completes clientSession.publish(resultTableName, handle).get(); } - assertEquals(1, numTransforms.intValue()); + assertEquals(1, numTransforms.get()); // check that the table was transformed Object result = ExecutionContext.getContext().getQueryScope().readParamValue(resultTableName, null);