-
Notifications
You must be signed in to change notification settings - Fork 3
test: DH-19379 Added CountWhere operations #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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
rolling_count_where_timeandrolling_count_where_tickagg.count_wherecum_count_wheredocker-compose.yml(Nobody thus far has even used this.)publish.pyquery