Skip to content

Conversation

@stanbrub
Copy link
Collaborator

@stanbrub stanbrub commented Jun 3, 2025

  • Added rolling_count_where_time and rolling_count_where_tick
  • Added agg.count_where
  • Added cum_count_where
  • Scaled and tested
  • Upgrade some version for the distro docker-compose.yml (Nobody thus far has even used this.)
  • Fixed a mispelling in the publish.py query

@stanbrub stanbrub self-assigned this Jun 3, 2025
@stanbrub stanbrub linked an issue Jun 3, 2025 that may be closed by this pull request
@stanbrub stanbrub requested a review from cpwright June 3, 2025 21:34
@cpwright
Copy link

@lbooker42 can you please look at the count where tests?

@lbooker42 lbooker42 self-requested a review January 28, 2026 17:39
public class CountWhereTest {
final StandardTestRunner runner = new StandardTestRunner(this);

@BeforeEach
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to add a few more aggs for testing. Specifically, a conditional (something like num1 % 3 == 0), then AND / OR filters.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to test each filter type separately:

from deephaven.filters import or_

aggRangeFilter = agg.count_where(col="count", filters=["num1 > 3"])
aggConditionalFilter = agg.count_where(col="count", filters=["num1 % 3 = 0"])
aggAndFilter = agg.count_where(col="count", filters=["num1 > 3", "num1 % 3 = 0"])
aggOrFilter = agg.count_where(col="count", filters=or_(["num1 > 3", "num1 % 3 = 0"]))

Taking countWhere1Group as an example, we should have four tests:

  • countWhere1GroupRangeFilter
  • countWhere1GroupConditionalFilter
  • countWhere1GroupAndFilter
  • countWhere1GroupOrFilter

Where each test uses the appropriate aggregation.

public class CountWhereTest {
final StandardTestRunner runner = new StandardTestRunner(this);

@BeforeEach
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to test each filter type separately:

from deephaven.filters import or_

aggRangeFilter = agg.count_where(col="count", filters=["num1 > 3"])
aggConditionalFilter = agg.count_where(col="count", filters=["num1 % 3 = 0"])
aggAndFilter = agg.count_where(col="count", filters=["num1 > 3", "num1 % 3 = 0"])
aggOrFilter = agg.count_where(col="count", filters=or_(["num1 > 3", "num1 % 3 = 0"]))

Taking countWhere1Group as an example, we should have four tests:

  • countWhere1GroupRangeFilter
  • countWhere1GroupConditionalFilter
  • countWhere1GroupAndFilter
  • countWhere1GroupOrFilter

Where each test uses the appropriate aggregation.

}

@Test
void cumCountWhere0Group1Col() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to test each filter type separately:

from deephaven.filters import or_

aggRangeFilter = agg.count_where(col="count", filters=["num1 > 3"])
aggConditionalFilter = agg.count_where(col="count", filters=["num1 % 3 = 0"])
aggAndFilter = agg.count_where(col="count", filters=["num1 > 3", "num1 % 3 = 0"])
aggOrFilter = agg.count_where(col="count", filters=or_(["num1 > 3", "num1 % 3 = 0"]))

Taking cumCountWhere0Group1Col as an example, we should have four tests:

  • cumCountWhereRangeFilter0Group1Col
  • cumCountWhereConditionalFilter0Group1Col
  • cumCountWhereAndFilter0Group1Col
  • cumCountWhereOrFilter0Group1Col

Where each test uses the appropriate aggregation.

""";

@Test
void rollingCountWhereTick0Group3Ops() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to test each filter type separately:

from deephaven.filters import or_

aggRangeFilter = agg.count_where(col="count", filters=["num1 > 3"])
aggConditionalFilter = agg.count_where(col="count", filters=["num1 % 3 = 0"])
aggAndFilter = agg.count_where(col="count", filters=["num1 > 3", "num1 % 3 = 0"])
aggOrFilter = agg.count_where(col="count", filters=or_(["num1 > 3", "num1 % 3 = 0"]))

Taking rollingCountWhereTick0Group3Ops as an example, we should have four tests:

  • rollingCountWhereRangeFilterTick0Group3Ops
  • rollingCountWhereConditionalFilterTick0Group3Ops
  • rollingCountWhereAndFilterTick0Group3Ops
  • rollingCountWhereOrFilterTick0Group3Ops

Where each test uses the appropriate aggregation.

""";

@Test
void rollingCountWhereTime0Group3Ops() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to test each filter type separately:

from deephaven.filters import or_

aggRangeFilter = agg.count_where(col="count", filters=["num1 > 3"])
aggConditionalFilter = agg.count_where(col="count", filters=["num1 % 3 = 0"])
aggAndFilter = agg.count_where(col="count", filters=["num1 > 3", "num1 % 3 = 0"])
aggOrFilter = agg.count_where(col="count", filters=or_(["num1 > 3", "num1 % 3 = 0"]))

Taking rollingCountWhereTime0Group3Ops as an example, we should have four tests:

  • rollingCountWhereRangeFilterTime0Group3Ops
  • rollingCountWhereConditionalFilterTime0Group3Ops
  • rollingCountWhereTimeAndFilter0Group3Ops
  • rollingCountWhereTimeOrFilter0Group3Ops

Where each test uses the appropriate aggregation.

}

@Test
void countWhere3Group() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think 3groups testing is needed for CountWhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typo in publish.py

3 participants