Skip to content

Commit

Permalink
Cleanups noted in code review
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaudy committed Jun 4, 2024
1 parent 76ff5f4 commit a1e00bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ public void testSelectDistinctDate() {
});
final Table result = SUT.selectDistinct(PARTITIONING_COLUMN_DEFINITION.getName());
assertIsSatisfied();
final @NotNull String columnName = PARTITIONING_COLUMN_DEFINITION.getName();
final String columnName = PARTITIONING_COLUMN_DEFINITION.getName();
final ObjectVector<String> distinctDatesVector = ColumnVectors.ofObject(result, columnName, String.class);
assertEquals(expectedDistinctDates.length, distinctDatesVector.size());
final String[] distinctDates = distinctDatesVector.toArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.function.BiFunction;

import io.deephaven.util.mutable.MutableInt;
import io.deephaven.vector.IntVector;
import org.jetbrains.annotations.NotNull;
import org.junit.experimental.categories.Category;

Expand Down Expand Up @@ -654,20 +653,18 @@ private void sortTester(int ncols, int size, Comparable[][] columnData, Table so
}

private void sortTester(int ncols, int size, Comparable[][] columnData, Table source, boolean isRefreshing) {
((QueryTable) source).setRefreshing(isRefreshing);
source.setRefreshing(isRefreshing);

// Now sort the table by the sentinel, which should just give us a simple ordering.
assertEquals(source.size(), size);

Table result0 = source.sort("Sentinel");
// show(result0);
final MutableInt expected = new MutableInt(1);
try (final CloseablePrimitiveIteratorOfInt sentinelIterator = result0.integerColumnIterator("Sentinel")) {
sentinelIterator.forEachRemaining((final int actual) -> assertEquals(expected.getAndIncrement(), actual));
}

Table result1 = source.sortDescending("Sentinel");
// show(result1);
expected.set(size);
try (final CloseablePrimitiveIteratorOfInt sentinelIterator = result1.integerColumnIterator("Sentinel")) {
sentinelIterator.forEachRemaining((final int actual) -> assertEquals(expected.getAndAdd(-1), actual));
Expand All @@ -683,8 +680,6 @@ private void sortTester(int ncols, int size, Comparable[][] columnData, Table so
System.out.println("Sorted by " + Arrays.toString(colNames));
Table resultAscending = source.sort(colNames);
Table resultDescending = source.sortDescending(colNames);
// TableTools.show(resultAscending);
// TableTools.show(resultDescending);

final MultiColumnSortHelper multiColumnSortHelper = new MultiColumnSortHelper(columnData, ii);
try (final CloseablePrimitiveIteratorOfInt sentinelAscending =
Expand Down

0 comments on commit a1e00bb

Please sign in to comment.