test: DH-19379 Added CountWhere operations#406
test: DH-19379 Added CountWhere operations#406stanbrub wants to merge 8 commits intodeephaven:mainfrom
Conversation
|
@lbooker42 can you please look at the count where tests? |
| public class CountWhereTest { | ||
| final StandardTestRunner runner = new StandardTestRunner(this); | ||
|
|
||
| @BeforeEach |
There was a problem hiding this comment.
I'd like to add a few more aggs for testing. Specifically, a conditional (something like num1 % 3 == 0), then AND / OR filters.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
I don't think 3groups testing is needed for CountWhere
rolling_count_where_timeandrolling_count_where_tickagg.count_wherecum_count_wheredocker-compose.yml(Nobody thus far has even used this.)publish.pyquery