Thread
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix incorrect comment in JsonTablePlanJoinNextRow()
- b5062a4e57fc 19 (unreleased) landed
- f3fb145a0adb 18.4 landed
- 1a2d60cc0410 17.10 landed
-
[PATCH] Fix wrong comment in JsonTablePlanJoinNextRow()
胡传文 <463945512@qq.com> — 2026-04-15T08:28:44Z
Hi, Found a misleading comment in JsonTablePlanJoinNextRow() while reading the JSON_TABLE execution code. The function returns false when both siblings are exhausted (meaning no more rows), but the comment says "there are more rows" — the exact opposite of what's happening. The code itself is correct. if (!JsonTablePlanNextRow(planstate->right)) { /* Right sibling ran out of row, so there are more rows. */ /* wrong */ return false; } A reader might reasonably treat this as a bug and flip the return value, which would cause JSON_TABLE UNION plans to loop indefinitely. Patch attached. Regards, Chuanwen Hu -
Re: [PATCH] Fix wrong comment in JsonTablePlanJoinNextRow()
Chao Li <li.evan.chao@gmail.com> — 2026-04-16T02:05:08Z
> On Apr 15, 2026, at 16:28, 胡传文 <463945512@qq.com> wrote: > > Hi, > Found a misleading comment in JsonTablePlanJoinNextRow() while reading > the JSON_TABLE execution code. > The function returns false when both siblings are exhausted (meaning no > more rows), but the comment says "there are more rows" — the exact > opposite of what's happening. The code itself is correct. > if (!JsonTablePlanNextRow(planstate->right)) > { > /* Right sibling ran out of row, so there are more rows. */ /* wrong */ > return false; > } > A reader might reasonably treat this as a bug and flip the return value, > which would cause JSON_TABLE UNION plans to loop indefinitely. > Patch attached. > Regards, > Chuanwen Hu<fix-jsontable-comment.patch> The fix looks correct to me. I guess “no” was just unintentionally missed. A small comment, I just feel “too” you newly added might not be needed. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ -
Re: [PATCH] Fix wrong comment in JsonTablePlanJoinNextRow()
amit <amitlangote09@gmail.com> — 2026-04-16T03:03:22Z
Hi, On Thu, Apr 16, 2026 at 11:05 AM Chao Li <li.evan.chao@gmail.com> wrote: > > On Apr 15, 2026, at 16:28, 胡传文 <463945512@qq.com> wrote: > > > > Hi, > > Found a misleading comment in JsonTablePlanJoinNextRow() while reading > > the JSON_TABLE execution code. > > The function returns false when both siblings are exhausted (meaning no > > more rows), but the comment says "there are more rows" — the exact > > opposite of what's happening. The code itself is correct. > > if (!JsonTablePlanNextRow(planstate->right)) > > { > > /* Right sibling ran out of row, so there are more rows. */ /* wrong */ > > return false; > > } > > A reader might reasonably treat this as a bug and flip the return value, > > which would cause JSON_TABLE UNION plans to loop indefinitely. > > Patch attached. Thanks for the report and the patch. > The fix looks correct to me. I guess “no” was just unintentionally missed. > > A small comment, I just feel “too” you newly added might not be needed. Actually, I'd keep it, because it ties the comment to the left-sibling check just above. Will push the attached down to v17. -- Thanks, Amit Langote -
Re: [PATCH] Fix wrong comment in JsonTablePlanJoinNextRow()
amit <amitlangote09@gmail.com> — 2026-04-16T05:17:22Z
On Thu, Apr 16, 2026 at 12:03 PM Amit Langote <amitlangote09@gmail.com> wrote: > On Thu, Apr 16, 2026 at 11:05 AM Chao Li <li.evan.chao@gmail.com> wrote: > > > On Apr 15, 2026, at 16:28, 胡传文 <463945512@qq.com> wrote: > > > > > > Hi, > > > Found a misleading comment in JsonTablePlanJoinNextRow() while reading > > > the JSON_TABLE execution code. > > > The function returns false when both siblings are exhausted (meaning no > > > more rows), but the comment says "there are more rows" — the exact > > > opposite of what's happening. The code itself is correct. > > > if (!JsonTablePlanNextRow(planstate->right)) > > > { > > > /* Right sibling ran out of row, so there are more rows. */ /* wrong */ > > > return false; > > > } > > > A reader might reasonably treat this as a bug and flip the return value, > > > which would cause JSON_TABLE UNION plans to loop indefinitely. > > > Patch attached. > > Thanks for the report and the patch. > > > The fix looks correct to me. I guess “no” was just unintentionally missed. > > > > A small comment, I just feel “too” you newly added might not be needed. > > Actually, I'd keep it, because it ties the comment to the left-sibling > check just above. > > Will push the attached down to v17. Done. -- Thanks, Amit Langote