diff --git a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CountWhereOperator.java b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CountWhereOperator.java index cb943c79a75..ceed2af13b1 100644 --- a/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CountWhereOperator.java +++ b/engine/table/src/main/java/io/deephaven/engine/table/impl/by/CountWhereOperator.java @@ -114,10 +114,10 @@ static class BaseContext implements SafeCloseable { } } resultsChunk = WritableBooleanChunk.makeWritableChunk(size); - //noinspection unchecked + // noinspection unchecked filterChunks = new Chunk[filters.length][]; for (int ii = 0; ii < filters.length; ii++) { - //noinspection unchecked + // noinspection unchecked filterChunks[ii] = new Chunk[filters[ii].recorders.length]; } } diff --git a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAggBy.java b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAggBy.java index f6d73bf7ead..a1eb0b7b4f3 100644 --- a/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAggBy.java +++ b/engine/table/src/test/java/io/deephaven/engine/table/impl/TestAggBy.java @@ -139,7 +139,8 @@ public void testBy() { Filter.and(Filter.from("B <= 10", "B >= 5")))), // Multiple input columns AggCountWhere("filter10", "B >= 5", "C == 1"), - AggCountWhere("filter11", "B >= 5 && C == 1 && A == 0")), + AggCountWhere("filter11", "B >= 5 && C == 1 && A == 0"), + AggCountWhere("filter12", "B >= 5", "C >= 1")), "A"); show(doubleCounted); assertEquals(2, doubleCounted.size()); @@ -183,6 +184,9 @@ public void testBy() { counts = ColumnVectors.ofLong(doubleCounted, "filter11"); assertEquals(4L, counts.get(0)); assertEquals(0L, counts.get(1)); + counts = ColumnVectors.ofLong(doubleCounted, "filter12"); + assertEquals(4L, counts.get(0)); + assertEquals(2L, counts.get(1)); doubleCounted = table.aggBy( List.of( @@ -199,7 +203,8 @@ public void testBy() { Filter.and(Filter.from("B <= 10", "B >= 5")))), // Multiple input columns AggCountWhere("filter10", "B >= 5", "C == 1"), - AggCountWhere("filter11", "B >= 5 && C == 1 && A == 0"))); + AggCountWhere("filter11", "B >= 5 && C == 1 && A == 0"), + AggCountWhere("filter12", "B >= 5", "C >= 1"))); show(doubleCounted); assertEquals(1, doubleCounted.size()); @@ -225,6 +230,8 @@ public void testBy() { assertEquals(6L, counts.get(0)); counts = ColumnVectors.ofLong(doubleCounted, "filter11"); assertEquals(4L, counts.get(0)); + counts = ColumnVectors.ofLong(doubleCounted, "filter12"); + assertEquals(6L, counts.get(0)); // Lets do some interesting incremental computations, as this is the use case that I'm really aiming at. For // example, getting the count, and average on each update. @@ -389,7 +396,10 @@ public Table e() { AggCountWhere("filter10", "intCol >= 5", "doubleCol <= 10.0"), AggCountWhere("filter11", "intCol >= 5 && intColNulls != 3 && doubleCol <= 10.0"), // DynamicWhereFilter - AggCountWhere("filter12", new DynamicWhereFilter(setTable, true, MatchPairFactory.getExpressions("intCol")))), + AggCountWhere("filter12", + new DynamicWhereFilter(setTable, true, + MatchPairFactory.getExpressions("intCol"))), + AggCountWhere("filter13", "doubleCol >= 5", "doubleColNulls >= 1")), "Sym").sort("Sym"); } }, @@ -414,7 +424,10 @@ public Table e() { AggCountWhere("filter10", "intCol >= 5", "doubleCol <= 10.0"), AggCountWhere("filter11", "intCol >= 5 && intColNulls != 3 && doubleCol <= 10.0"), // DynamicWhereFilter - AggCountWhere("filter12", new DynamicWhereFilter(setTable, true, MatchPairFactory.getExpressions("intCol"))))); + AggCountWhere("filter12", + new DynamicWhereFilter(setTable, true, + MatchPairFactory.getExpressions("intCol"))), + AggCountWhere("filter13", "doubleCol >= 5", "doubleColNulls >= 1"))); } }, new QueryTableTest.TableComparator( diff --git a/table-api/src/main/java/io/deephaven/api/agg/Aggregation.java b/table-api/src/main/java/io/deephaven/api/agg/Aggregation.java index 0787c15b763..b927ae9f561 100644 --- a/table-api/src/main/java/io/deephaven/api/agg/Aggregation.java +++ b/table-api/src/main/java/io/deephaven/api/agg/Aggregation.java @@ -226,8 +226,8 @@ static Count AggCount(String resultColumn) { } /** - * Create a {@link io.deephaven.api.agg.CountWhere count} aggregation with the supplied output column name, - * counting values that pass the supplied {@code filters}. + * Create a {@link io.deephaven.api.agg.CountWhere count} aggregation with the supplied output column name, counting + * values that pass the supplied {@code filters}. * * @param resultColumn The {@link Count#column() output column} name * @return The aggregation @@ -237,8 +237,8 @@ static CountWhere AggCountWhere(String resultColumn, String... filters) { } /** - * Create a {@link io.deephaven.api.agg.CountWhere count} aggregation with the supplied output column name, - * counting values that pass the supplied {@code filter}. + * Create a {@link io.deephaven.api.agg.CountWhere count} aggregation with the supplied output column name, counting + * values that pass the supplied {@code filter}. * * @param resultColumn The {@link Count#column() output column} name * @return The aggregation