-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[To dev/1.3] Pipe: Added max / min function to aggregate-processor (#15459) #15469
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
Conversation
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.
Pull Request Overview
This PR adds new max and min aggregate operator functionality to the pipe aggregate-processor, updating both the aggregated result and intermediate result operator sets, and extends test coverage accordingly.
- New imports and operator registrations for MaxValueOperator and MinValueOperator have been added.
- New operator classes (MaxOperator, MinOperator, MaxValueOperator, MinValueOperator) are introduced with parallel behavior to existing operators.
- The integration tests are updated to reflect the increased number of operators.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| StandardStatisticsOperatorProcessor.java | Registers new max/min operators in both aggregated result and intermediate result operator sets. |
| MinOperator.java, MaxOperator.java | Implements new numeric operator classes for min and max values. |
| AbsoluteMaxOperator.java | Updates parameters with final modifiers for improved consistency. |
| MinValueOperator.java, MaxValueOperator.java | Introduces new aggregated result operator classes for min and max. |
| IoTDBPipeAggregateIT.java | Updates operator list and expected result count in integration tests. |
Comments suppressed due to low confidence (1)
integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeAggregateIT.java:119
- [nitpick] The expected result count has changed from 20 to 24 due to the inclusion of max and min operators; consider adding a comment in the test to explain the update.
Collections.singleton("24,"));
| () -> new IntegralPoweredSumOperator(3), | ||
| () -> new IntegralPoweredSumOperator(4)))); | ||
| () -> new IntegralPoweredSumOperator(4), | ||
| MaxOperator::new, |
Copilot
AI
May 8, 2025
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.
[nitpick] Ensure that the ordering of supplier operator additions reflects the intended operator evaluation sequence for clarity and maintainability.
| public boolean initAndGetIsSupport(int initialInput, long initialTimestamp) { | ||
| intValue = initialInput; | ||
| return super.initAndGetIsSupport(initialInput, initialTimestamp); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean initAndGetIsSupport(long initialInput, long initialTimestamp) { |
Copilot
AI
May 8, 2025
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.
[nitpick] For consistency with other similar operator implementations, consider declaring the method parameters as final.
| public boolean initAndGetIsSupport(int initialInput, long initialTimestamp) { | |
| intValue = initialInput; | |
| return super.initAndGetIsSupport(initialInput, initialTimestamp); | |
| } | |
| @Override | |
| public boolean initAndGetIsSupport(long initialInput, long initialTimestamp) { | |
| public boolean initAndGetIsSupport(final int initialInput, final long initialTimestamp) { | |
| intValue = initialInput; | |
| return super.initAndGetIsSupport(initialInput, initialTimestamp); | |
| } | |
| @Override | |
| public boolean initAndGetIsSupport(final long initialInput, final long initialTimestamp) { |
Description
As the title said.
#15459
This PR has:
for an unfamiliar reader.
for code coverage.
Key changed/added classes (or packages if there are too many classes) in this PR