Re: [PATCH] Cover get_json_table_plan() with tests

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: solai v <solai(dot)cdac(at)gmail(dot)com>
Cc: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Jonathan Gonzalez V(dot)" <jonathan(dot)abdiel(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: [PATCH] Cover get_json_table_plan() with tests
Date: 2026-09-05 01:02:39
Message-ID: CAGRkXqSJ5eeKO97kuE5C5NgJhMojeU01006yy0vTmvzv6wo8NQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> If anyone else believes that we should do 92% -> 95%

Hi Aleksander,

Thanks for making the patch.

I measured get_json_table_plan() with clang source-based coverage.

Your v3 is already 100% line coverage. The one thing it misses is a
region: the UNION arm of "j->cross ? CROSS : UNION" is never run
(llvm-cov: True 1 / False 0 on that line), so region coverage is 97%.

Small fix: add a third path and use both sibling joins in the plan --
PLAN (p OUTER ((p1 UNION p2) CROSS p3)). Now UNION is added so
region coverage goes to 100% (line stays 100%). Patch attached, test
passes.

Also, given there is no other comments, move to wait for committer

Thanks,
Shihao

Attachment Content-Type Size
v4-0001-Improve-get_json_table_plan-test-coverage.patch application/octet-stream 3.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2026-09-05 01:52:00 Re: Teach pg_upgrade to deal with invalid databases
Previous Message Masahiko Sawada 2026-09-05 00:11:07 Re: REPACK (CONCURRENTLY) backend waits indefinitely when decoding worker fails to start