Skip to content

Conversation

@lowka
Copy link
Contributor

@lowka lowka commented Oct 8, 2024

Modifies AggregateRow by removing all not state related fields from it.
Makes Accumulator and AccumulatorWrapper stateless.

https://issues.apache.org/jira/browse/IGNITE-23335


Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

@lowka lowka force-pushed the ignite-23335 branch 2 times, most recently from 9e4e2c6 to 5bdfc3c Compare October 8, 2024 11:09
@lowka lowka marked this pull request as ready for review October 10, 2024 09:13
lowka added 2 commits October 11, 2024 13:19
# Conflicts:
#	modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/agg/Accumulators.java

acc.accumulator().end(state, result);

output[i + cardinality] = acc.convertResult(result.get());
Copy link
Member

@AMashenkov AMashenkov Oct 14, 2024

Choose a reason for hiding this comment

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

Can allFields be replaced with mapping?
i + cardinality can be mapping.get(i)

Or allFields may differ from row to row?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mapping would make things even more confusing, because there are the following lines at the end of this method.

if (groupId != NO_GROUP_ID && type == AggregateType.MAP) {
   output[output.length - 1] = groupId;
}

@ygerzhedovich ygerzhedovich merged commit da15233 into apache:main Oct 15, 2024
@ygerzhedovich ygerzhedovich deleted the ignite-23335 branch October 15, 2024 10:17
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.

3 participants