Repository navigation
Read non-strict values without dispatching on the column type - #372
Merged
Merged
Conversation
Non-strict queries decide each value's Julia type from its storage class,
but the read went through two dynamic dispatches: `getcolumn` on the
column's declared `Type` and `sqlitevalue` on the storage class's type.
`getvalue` now branches on the storage class and calls the reader for it
directly, and `getcolumn(::Row{false}, i)` no longer dispatches on the
declared type, which never changes a non-strict value.
200k rows x 5 columns into `Tables.columntable` (Julia 1.12): 470 ms ->
86 ms, 3.40M -> 1.70M allocations; a row loop reading one integer column:
66 ms -> 29 ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #372 +/- ##
=======================================
Coverage 96.80% 96.81%
=======================================
Files 5 5
Lines 782 784 +2
=======================================
+ Hits 757 759 +2
Misses 25 25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quinnj
referenced
this pull request
Oct 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Non-strict queries (the default) decide each value's Julia type from its SQLite storage class, but every cell went through two dynamic dispatches:
Tables.getcolumnon the column's declaredType, thensqlitevalueon the storage class's type.getvaluenow branches on the storage class and calls the matching reader directly, andgetcolumn(::Row{false}, i)skips dispatching on the declared type, which never changes a non-strict value. Values are unchanged: integers, floats, and text use the same readers, and blobs keep the existing type rule.Benchmarks (Chairmarks
@b, 200k rows; columns INTEGER, REAL, TEXT, all-NULL INTEGER, half-NULL REAL):Tables.columntable(non-strict)Tables.columntable(strict)Verification: new testset reading INTEGER, REAL, TEXT, serialized-Symbol, raw-BLOB, and NULL values from one column through both row access and
columntable(passes before and after); fullPkg.test()passes locally (SQLite 499/499).This touches the function next to the one #370 changes; they don't overlap.
🤖 Generated with Claude Code