public inbox for [email protected]  
help / color / mirror / Atom feed
From: Henson Choi <[email protected]>
To: Tatsuo Ishii <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Row pattern recognition
Date: Mon, 22 Jun 2026 16:07:43 +0900
Message-ID: <CAAAe_zDG=5kJa=snRXuwARvVS1SEvLyiV84igPZx4nYu62EWNA@mail.gmail.com> (raw)
In-Reply-To: <CAAAe_zCKh1ucJVJ0hsoiA-jCoveP2VC7-cpzTZ3D=B-HPhv0uA@mail.gmail.com>
References: <CACJufxH_Z5aaYEir3=GHoZu-0pKzQdScu85LgCm1C8n=oQo=4Q@mail.gmail.com>
	<CAAAe_zAe8CRN-ggNhcP7b-ALiRrHxKTXBWbNVMhdW_QoO=1c4Q@mail.gmail.com>
	<CACJufxHEu+zYWdpi4gP7FbL+fjMhk8VOF7LJDU4CG=ZMYEPb-w@mail.gmail.com>
	<[email protected]>
	<CAAAe_zCKh1ucJVJ0hsoiA-jCoveP2VC7-cpzTZ3D=B-HPhv0uA@mail.gmail.com>

Hi Tatsuo, Jian,

Please find attached (coverage.tgz) the code coverage analysis for the RPR
branch.

* Measurement setup
- Target: PostgreSQL RPR branch, modified-lines basis (RPR-base..RPR diff)
- Build: gcc --enable-coverage with --with-llvm (LLVM JIT module included;
both C and C++ instrumented)
- Tests: make check-world (regression + TAP + contrib; no forced JIT
settings)

* Results
- Modified-line coverage: 2,608 / 2,702 (96.5%)
- Functions: 172 / 173 (99.4%)
- Breakdown of the 94 uncovered lines:
  - Reachable (coverable by tests): 28 lines
  - Unreachable (defensive / dead code): 66 lines
    - worth cleaning up (Assert / remove / coverage-exclude): 22 lines
    - best kept as idiomatic guards (enum default, pg_unreachable(),
      public windowapi.h relpos guards): 44 lines

* Projected coverage (modified-lines basis)
- Current:                                              96.5%  (2,608 /
2,702)
- After adding the proposed tests (+28 reachable):      97.6%  (2,636 /
2,702)
- After also cleaning up only the lines worth changing
  (-22; the 44 idiomatic guards are kept on purpose):   98.4%  (2,636 /
2,680)
- If every unreachable line were removed (not advised
  for the idiomatic guards):                            ~100%  (no residual
uncovered lines)

* Picking a target -- your input would help
The analysis points to three possible levels:
  (a) tests only             -> 97.6%   (add tests for the 28 reachable
lines)
  (b) tests + safe cleanups  -> 98.4%   (also Assert/remove the 22
worth-fixing lines;
                                         keep the 44 idiomatic guards as-is)
  (c) full cleanup           -> ~100%   (also rework the idiomatic guards
-- usually undesirable)
My own inclination sits somewhere between (a) and (b): add all the
reachable-line tests, and
clean up only the most clear-cut lines (e.g. the arithmetic-underflow
Assert conversions and
the dead _equalRPRPattern body), while deciding the remaining defensive
lines case by case
rather than touching all 22 at once. I'd value your view on how far to take
this.

One caveat: this reachable/unreachable classification was produced with AI
assistance, so it
may be wrong in places. When I actually write the test cases I will
scrutinize each item
individually and verify it against a coverage build before proposing
anything.

* What the report contains
Each uncovered line carries a collapsible box stating:
- Reachable / Unreachable classification + confidence
- Reachable: the concrete SQL test that covers it
- Unreachable: the reason it cannot execute, and the recommended source
change
Consecutive lines on the same straight-line flow (no branch in between) are
merged into one box.

* How to view
  tar xzf coverage.tgz
  # open coverage/index.html in a browser
  #  -> pick a file -> expand the collapsible box under each red
(uncovered) line

* Contents
- coverage/index.html  : per-file coverage overview
- coverage/html/       : per-file detail (source + uncovered-line analysis)
- coverage/untested.md : checklist of uncovered lines

Please review. Feel free to reply with any questions.

Best regards,
Henson


Attachments:

  [application/x-gzip] coverage.tgz (911.2K, 3-coverage.tgz)
  download

view thread (143+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Row pattern recognition
  In-Reply-To: <CAAAe_zDG=5kJa=snRXuwARvVS1SEvLyiV84igPZx4nYu62EWNA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox