Repository navigation
perf(kernel): amortize DECIMAL string allocations - #599
Draft
vuanhphung wants to merge 3 commits into
Draft
vuanhphung wants to merge 3 commits into
vuanhphung wants to merge 3 commits into
Conversation
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Top-level kernel DECIMAL formatting accounts for 27% of catalog-scan allocation objects. Append into immutable Go-owned chunks, starting at 64 B and doubling to 4 KiB, with one arena per DECIMAL column and no batch reset; Thrift, float mode, nested JSON and Arrow batches are unchanged. Adjacent overlap: #514, #437, #513 and #597.
A retained string can pin up to 4 KiB of other values from its column (keeping every 100th row retains 29.7 -> 376.1 MiB), so callers retaining a few values can use
strings.Clone.Verification: pure-Go/kernel units, race/checkptr, default/changed-code tagged lint, 43 live e2e passes, 10 complete value/type/metadata checksums, 14 assertion-failing mutants and the noCopy vet probe pass. Go 1.27.3/bindings v1.5.0; ABBA fresh processes, warmup discarded, 10 local and 8 live samples/side. Table shows median / p95.
Do not ship this SHA: 500 MB drain 4.26% and total 3.60% gains miss the ~5% end-to-end bar; controlled saving is 85 ns/row (~4.5%). One-row results still cost +101 ns/+202 B; 100k cached point values retain 4.58 -> 9.16 MiB, while keeping one whole column improves 141.83 -> 118.35 MiB.
Adversarial review: round 1 findings addressed; re-review pending, keep draft.
This pull request and its description were written by Isaac.