Skip to content

Conversation

@mattjubb
Copy link

@mattjubb mattjubb commented Sep 5, 2022

Thanks for contributing.

Description

  • Added support for multiple grouping / aggregation columns via the pivot method. kept the old method contract as is but now delegates to shared logic
  • renamed column1/column2/column3 to groupedColumn/pivotColumn/aggregatedColumn to make it more
    obvious what the meaning of each argument is
  • not entirely sure the approach of concatenating the pivot value with aggregated column name ie "2012.Score" is the best, open to suggestions here.

Note: first time contributing to a project on github so let me know if i've done something wrong

Testing

yes added tests for 3 use cases 1) both multiple grouping and aggregation columns 2) multiple grouping and single aggregation 3) single grouping and

List<String> aggregatedColumnNames,
AggregateFunction<?, ?> aggregateFunction) {
return pivot(
groupingColumnNames.stream().map(this::categoricalColumn).collect(Collectors.toList()),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Codacy is complaining that you're doing Collectors.toList here when toList is already statically imported. I'm fine either way to want it as long as it's consistent

Copy link
Author

Choose a reason for hiding this comment

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

fixed, thanks

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2025

@frankwondon
Copy link

frankwondon commented Oct 5, 2025 via email

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