Skip to content

chore(reader): suppress java:S6218 on SelectedArrays views - #605

Closed
dfa1 wants to merge 1 commit into
mainfrom
fix/sonar-s6218-selected-arrays
Closed

dfa1 wants to merge 1 commit into
mainfrom
fix/sonar-s6218-selected-arrays

Conversation

@dfa1

@dfa1 dfa1 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Fixes the Sonar quality gate (new reliability rating C): ten java:S6218 findings in SelectedArrays, suppressed with the standard comment. #602 deletes these views outright.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x

Ten array-carrying records in SelectedArrays fail the new-code reliability
condition of the quality gate. Same standard suppression as the other
records; #602 removes these views altogether.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x
dfa1 added a commit that referenced this pull request Oct 24, 2026
…ys (#602)

SelectedArrays wrapped every selected column in an index-mapped view
(get(i) = inner.get(rows[i])) over a long[rowCount] built per chunk.
It now copies the selected rows into flat buffers in the chunk's arena,
as Rust's filter does: a flat buffer is copied by a typed per-row gather
at density <= 0.5 and by one bulk copy per run of consecutive rows above
it; other leaves copy through their accessors; dictionaries still copy
only their codes. The selection is a sorted int[] sized to the matches.

The ten view records go away, and with them the java:S6218 findings
that failed the Sonar quality gate (supersedes #605).

JavaVsJniFilterBenchmark.javaFilterClose, ohlc.vortex, -f 3, ops/s
(the 0.001 label selects about 11% of rows on this file):

  selectivity   main          branch        alloc/op main -> branch
  0.001         6581 ± 605    6505 ± 532    913 KB -> 195 KB
  0.01          6918 ± 563    6740 ± 239    913 KB -> 196 KB
  0.1           6001 ± 88     5194 ± 311    987 KB -> 363 KB
  1.0           3144 ± 148    2285 ± 343    1429 KB -> 1247 KB

The dense end is slower: the copy moves rows the view never touched, and
this benchmark reads each row once, the view's best case. A BitSet
selection was tried first and lost at every density: walking it with
nextSetBit once per column cost more than the filter's own row test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SwhK4W5cgj7y7s4ZPCif5x
@dfa1

dfa1 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #606: the SelectedArrays view records are deleted instead of suppressed.

@dfa1 dfa1 closed this Oct 24, 2026
@dfa1
dfa1 deleted the fix/sonar-s6218-selected-arrays branch October 24, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant