Skip to content

Conversation

@Caideyipi
Copy link
Collaborator

Description

As the title said.
#15459


This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@SteveYurongSu SteveYurongSu self-assigned this May 8, 2025
@SteveYurongSu SteveYurongSu requested a review from Copilot May 8, 2025 03:19
Copy link
Contributor

Copilot AI left a 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,
Copy link

Copilot AI May 8, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +35
public boolean initAndGetIsSupport(int initialInput, long initialTimestamp) {
intValue = initialInput;
return super.initAndGetIsSupport(initialInput, initialTimestamp);
}

@Override
public boolean initAndGetIsSupport(long initialInput, long initialTimestamp) {
Copy link

Copilot AI May 8, 2025

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.

Suggested change
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) {

Copilot uses AI. Check for mistakes.
@SteveYurongSu SteveYurongSu merged commit b3052df into apache:dev/1.3 May 8, 2025
24 of 25 checks passed
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.

2 participants