Repository navigation
docs: correct the JSON_ARRAYAGG and JSON_OBJECTAGG example output - #24736
tongriyaotxt wants to merge 1 commit into
Conversation
|
Hi @tongriyaotxt. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @tongriyaotxt! |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Both examples on this page showed an output order that the current release does not produce, and aggregate order is not guaranteed in the first place: - JSON_ARRAYAGG showed [2, 1]; the current release returns [1, 2]. - JSON_OBJECTAGG showed rose, orchid, tulip; the current release returns rose, tulip, orchid. Correct both outputs and state that the order of the values in the array and the order of the rows in the result are not guaranteed, so the examples are not read as a promise about ordering. Signed-off-by: YG <tongriyaotxt@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
417fe39 to
4bbe1e5
Compare
First-time contributors' checklist
What is changed, added, or deleted? (Required)
Both examples on this page show an output order that the current release does not produce, and aggregate order is not guaranteed in the first place. This PR corrects the outputs and states the guarantee explicitly.
JSON_ARRAYAGG()showed[2, 1]for:A fresh
tidb-server --store=unistore -P 4000(master) returns[1, 2]:The output is corrected to
[1, 2], followed by: "The order of the values in the resulting array is not guaranteed."JSON_OBJECTAGG()showed the three groups in the orderrose,orchid,tulip. The same server returnsrose,tulip,orchidfor the documented query. The rows are put in that order, followed by: "The order of the rows in the result is not guaranteed."Both statements are aggregate queries without
ORDER BY, so no specific order is part of the contract. Showing one order without that caveat makes the examples look like promises about ordering, which is the part worth fixing regardless of which order a given build happens to produce.Which TiDB version(s) do your changes apply to? (Required)
Picking master only, because this is an example/wording correction that does not depend on a version-specific behavior change.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?