Repository navigation
fix(query): accept lists in reverse and return them reversed - #1945
Open
katarinasupe wants to merge 2 commits into
Open
katarinasupe wants to merge 2 commits into
katarinasupe wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Draft
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the list form of
reverse()to the Lists table inpages/querying/functions.mdx:reverse(list: List[any]) -> (List[any]). The string form in the String functions table is unchanged.Left out of the docs, covered by the release note below:
reverse([])returns[]andreverse(null)returnsnull, as the neighboring rows leave null and empty input unstated; the type error for other argument types now nameslistamong the accepted types ('reverse' argument at position 1 must be either 'null', 'string' or 'list'.), which no page quotes.Ran on the 20261122 daily MAGE build (
3.14.0+122~34167af2e2b5, the merge commit of memgraph/memgraph#5425; tests passed) and onmemgraph/memgraph-mage:3.14.0for comparison. Lists, the empty list,null, nested values (reversed at the top level only), strings and the error for an integer, a map and a boolean all behave as the product PR describes. On 3.14.0, every list argument failed with'reverse' argument at position 1 must be either 'null' or 'string'.The page change adds nocypherblocks.Product PR
memgraph/memgraph#5425
Checklist
featureorbugfixlabel addedRelease note
Copied into the release notes when the release is prepared. Fix an item if it's wrong; keep the heading and the item format.
Bug fixes
reverse()accepts a list and returns its elements in reverse order.#5425
Noticed, not fixed
Read by the release check, which fixes these in one PR per release. Fix an item if it's wrong; keep the heading and one line per item, starting with the page.
pages/querying/functions.mdx: the frontmatterdescriptionis two marketing sentences ("Unlock the graph analysis potential…") over 160 characters; it should say what the reader can do in one sentence.pages/querying/functions.mdx: in the Pattern functions table, the Name column saysgethopsCounterbut the signature isgetHopsCounter().pages/querying/functions.mdx: in the Lists table,rangesays "a list of value in given range" anduniformSamplelacks a final period.pages/querying/functions.mdx: in the String functions table, thereversestring row says "the order of all characters … have been reversed" (should be "has"), andcontainssays "has an element which is equal to", which doesn't describe strings.