• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codenotary / immudb / 29190098042
85%
master: 85%

Build:
Build:
LAST BUILD BRANCH: fix/pgsql-empty-parse-panic
DEFAULT BRANCH: master
Ran 12 Jul 2026 11:08AM UTC
Jobs 1
Files 311
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jul 2026 10:59AM UTC coverage: 84.968% (-0.005%) from 84.973%
29190098042

Pull #2110

gh-ci

vchaindz
chore(sql): treat nil row-value slots as SQL NULL in remaining consumers

The projection-pushdown optimization leaves Row.ValuesByPosition[i]
nil for columns a query does not reference. A repo-wide audit after
the fileSorter.encodeRow panic (#2100) found five more consumers that
dereference every positional slot and stay safe only because
projection currently repopulates rows before they run:

- CTE materialization (materializeCTE/materializeRecursiveCTE)
  type-asserted v.(ValueExp) on each slot: hard panic on a nil
  interface. Extracted rowValuesToValueExps, which substitutes a
  typed SQL NULL.
- Row.digest (DISTINCT, diff) called v.Type() on every slot; nil now
  digests the same as NULL.
- setOpRowReader.rowDigest (EXCEPT/INTERSECT) called v.IsNull(); nil
  now digests the same as NULL.
- sqlRowsToProto (gRPC row serialization) dereferenced every slot;
  nil now serializes as SQL NULL.
- embedded/document readers dereferenced positions 0/1 unchecked; nil
  or missing slots now return ErrUnexpectedValue.

None of these is reachable today: every external Resolve passes nil
scanSpecs and SelectStmt.Resolve always projects before returning.
The guards remove the reliance on the "projection always runs first"
invariant, which has already broken once. Unit tests encode the
nil-slot-equals-NULL contract.

The same audit confirmed the empty-statement-slice class from #2100 is
fully closed: every ParseSQL/ParseSQLString call site is now length-
guarded, range-based, or parses hardcoded non-empty input.
Pull Request #2110: fix(pgsql): guard extended-query Parse against zero parsed statements + nil row-value-slot hardening

41 of 62 new or added lines in 7 files covered. (66.13%)

2 existing lines in 1 file now uncovered.

45258 of 53265 relevant lines covered (84.97%)

126001.43 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
80.72
-10.45% embedded/document/document_reader.go
8
86.35
-0.57% embedded/document/engine.go
3
84.97
0.02% pkg/pgsql/server/query_machine.go

Coverage Regressions

Lines Coverage ∆ File
2
76.09
-0.36% pkg/database/lazy_db.go
Jobs
ID Job ID Ran Files Coverage
1 29190098042.1 12 Jul 2026 11:08AM UTC 311
84.97
Source Files on build 29190098042
  • Tree
  • List 311
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #2110
  • PR Base - master (#28933776347)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc