Repository navigation
docs(storage): re-measure the single-file SQL matrix against the code (#571) - #581
Merged
Merged
Conversation
…fixes #571) The file claimed INSERT OR IGNORE/REPLACE, sqlite_master/sqlite_schema and BEGIN/COMMIT/ROLLBACK work on both modes, that STORAGE=COLUMNAR is unsupported on single-file and that a broken duplicated FluentMigrator table was authoritative. Every row was re-derived by executing it on 2026-12-06 against a .scdb file and a directory database side by side: five claims were wrong, and the measurement found four real defects (views registered but not queryable, WHERE/NULL divergence between the modes, SUM/AVG/MIN/MAX throwing on a NULL, sqlite_master/sqlite_schema inconsistent). Those are documented as Verified gaps with workarounds and tracked in #580; the matrices now state their method and date. JOIN/GROUP BY/subqueries/aggregates/DELETE without WHERE are at parity, so #571 static limitation list was stale.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.



Why
Issue #571 says
.scdbsingle-file mode "does not support JOIN, GROUP BY, subqueries, aggregates, DELETE without WHEREand other advanced SQL (see
docs/storage/SINGLE_FILE_SQL_LIMITATIONS.md)". The user pushed back: we aligned the SQLsyntax a while ago, and the docs drift from the code.
So I stopped reading and executed the whole matrix instead: the same DDL, the same rows and the same statements
against a
.scdbfile and a directory database, side by side, on 2026-12-06.Result
JOIN(INNER/LEFT/RIGHT/FULL),GROUP BY,HAVING, subqueries inFROMandWHERE, aggregates, window functions,UNION,CASE,DISTINCT,LIKE,IN,BETWEEN,IS [NOT] NULL,ORDER BY,LIMIT/OFFSET, everyALTER TABLEform andDELETE/UPDATEwithoutWHEREreturn the same rows on both modes. The issue's premisewas stale — there is nothing to lift.
What the measurement did find
Five claims in the old file were wrong, and there are four real defects (filed as #580 with the evidence and
workarounds):
INSERT OR IGNORE/INSERT OR REPLACE✅Unsupported SQL statement: INSERT ORin both modessqlite_master✅ on single-filesqlite_schema✅ on bothBEGIN/COMMIT/ROLLBACK"silently ignored" on single-fileUnsupported SQL statementin both modesSTORAGE = COLUMNAR❌ on single-fileEXPLAIN✅The old file also carried a broken duplicate FluentMigrator table (half the rows had no directory column, and two
rows contradicted the table above them). Removed.
Real defects found while measuring: a view is registered but
SELECT … FROM <view>answersTable <view> does not existin both modes;WHEREpredicates that meet aNULLdisagree between the modes and bothdepart from SQL;
SUM/AVG/MIN/MAXover a column containing aNULLthrowInvalidCastException;sqlite_master/sqlite_schemaare inconsistent between the modes.What the file looks like now
Every matrix states the method and the date, the corrected rows carry the observed behaviour, the four defects are a
Verified gaps section with the workaround a consumer should use today (
AND col IS NOT NULL,information_schema), the FluentMigrator table is one clean table, and the footer says how it was produced so the nextreader re-runs it instead of trusting it.