Skip to content

Check validity before removing VarBinView nullability - #10267

Closed
connortsui20 wants to merge 1 commit into
ct/stats-writer-cache-computationfrom
ct/stats-nullability-proof
Closed

connortsui20 wants to merge 1 commit into
ct/stats-writer-cache-computationfrom
ct/stats-nullability-proof

Conversation

@connortsui20

@connortsui20 connortsui20 commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Superseded by #10269, which groups this change with the related statistics work. The original commits and branch are preserved.

Original PR description

Tracking Issue: #10177

Summary

Removing nullability from a VarBinView can expose null-row bytes as UTF-8 or make previously hidden views accessible. A cached Boolean minimum is a semantic claim, so it cannot establish the validity required by that unchecked conversion. Incorrect claims can enter through a safe cache transfer, even when the original result was computed correctly for its own input.

Changes

Check the executed validity bits at the VarBinView cast's unchecked-construction boundary. Constant validity retains its existing shortcuts, and strings do not need another UTF-8 scan because every exposed row was already valid in the source. Other cast kernels retain their cached shortcuts.

Stack

Depends on #10266 in migration stack #10229.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20 connortsui20 added the changelog/fix A bug fix label Oct 3, 2026
@connortsui20
connortsui20 added this pull request to stack #10229 October 3, 2026 02:37
@codspeed

codspeed Bot commented Oct 3, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 48.14%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

❌ 1 regressed benchmark
✅ 2102 untouched benchmarks
⏩ 503 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation bench_compare_sliced_dict_primitive[(2500, 10000)] 42.8 µs 82.4 µs -48.14%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ct/stats-nullability-proof (bb58423) with ct/stats-writer-cache-computation (aef451a)

Open in CodSpeed

Footnotes

  1. 503 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@connortsui20
connortsui20 removed this pull request from stack #10229 October 5, 2026 10:31
@connortsui20
connortsui20 deleted the ct/stats-nullability-proof branch October 5, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant