Skip to content

Conversation

@colinbarry
Copy link
Contributor

@colinbarry colinbarry commented Jun 30, 2025

Description

Implement frequencies_as_map which returns a map of frequencies of the items in the collection. The result is in the form {value: count}, where value is always a string. For example, frequencies_as_map([1,3,5,7,9,9]) returns:

{
  1: 1,
  3: 1,
  5: 1,
  7: 1,
  9: 2
}

Pull request type

  • Bugfix
  • Algorithm/Module
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

######################################

Reviewer checklist (the reviewer checks this part)

Module/Algorithm

  • Core algorithm/module implementation
  • Query module implementation
  • Tests provided (unit / e2e)
  • Code documentation
  • README short description

Documentation checklist

  • Add the documentation label tag
  • Add the bug / feature label tag
  • Add the milestone for which this feature is intended
    • If not known, set for a later milestone
  • Write a release note, including added/changed clauses
    • Added collections.frequencies_as_map function to count element occurrences in a list.
  • Link the documentation PR here
    • [Documentation PR link]

@colinbarry colinbarry self-assigned this Jun 30, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 2, 2025

@sonarqubecloud
Copy link

@gitbuda gitbuda modified the milestones: mage-v3.5.0, mage-v3.6.0 Aug 27, 2025
@colinbarry colinbarry removed this from the mage-v3.6.0 milestone Oct 1, 2025
@colinbarry
Copy link
Contributor Author

Removed milestone, since this is not making 3.6.

@colinbarry colinbarry force-pushed the feat/frequencies-as-map branch from 2c62f84 to 15f068b Compare November 5, 2025 12:23
@colinbarry colinbarry added this to the mage-v3.7.0 milestone Nov 5, 2025
@colinbarry colinbarry added the feature feature label Nov 5, 2025
@colinbarry colinbarry force-pushed the feat/frequencies-as-map branch from d868511 to c19d362 Compare November 5, 2025 12:27
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2025

@colinbarry colinbarry added the Docs needed Docs needed label Nov 5, 2025
@colinbarry colinbarry enabled auto-merge November 5, 2025 15:12
@colinbarry colinbarry requested a review from DavIvek November 5, 2025 15:12
@colinbarry colinbarry added this pull request to the merge queue Nov 5, 2025
Merged via the queue into main with commit 1a23026 Nov 5, 2025
9 checks passed
@colinbarry colinbarry deleted the feat/frequencies-as-map branch November 5, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs needed Docs needed feature feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement apoc.coll.frequenciesAsMap

4 participants