Skip to content

feat: Add groupBy as a new feature in repository #622

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

Merged
merged 2 commits into from
Feb 17, 2025
Merged

Conversation

gabrielmpetrescu
Copy link
Collaborator

No description provided.

Copy link

what-the-diff bot commented Feb 6, 2025

PR Summary

  • Introduction of Group By Feature
    The system now has a feature that allows users to group results based on specific columns. For example, if the data has columns for 'Name', 'Age', and 'Location', users can group the results by 'Location' to better understand the distribution of data.

  • Group By Parameter Retrieval Function
    A new method has been added in code for the system to collect and understand 'group by' instructions from the user's input.

  • Storage of Grouping Information
    A space in the system memory (a static property) named $groupBy is defined to keep the list of fields that can be targeted for the grouping function.

  • Grouping Logic
    The pull request introduces methods in code to manage the user's 'group by' instructions. The introduced method, applyGroupBy, interprets the user's instructions and executes the group by operations.

  • Error Handling for Grouping
    The system has enhanced its error handling mechanism in the case of an attempted grouping by an invalid or ungroupable column.

  • Testing of New Feature
    This change also accompanies new test scenarios. The test scenarios ensure the successful execution of grouping as well as the proper management of invalid grouping commands.

Copy link
Collaborator

@binaryk binaryk left a comment

Choose a reason for hiding this comment

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

Some psalm issues.

@gabrielmpetrescu gabrielmpetrescu merged commit ae006b5 into 9.x Feb 17, 2025
9 of 10 checks passed
@binaryk
Copy link
Collaborator

binaryk commented Feb 17, 2025

Thank you!

@arthurkirkosa arthurkirkosa deleted the add-group-by branch February 17, 2025 08:00
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