You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lift single-file SQL limitations (JOIN, GROUP BY, subqueries, aggregates) #571
.scdb single-file mode does not support JOIN, GROUP BY, subqueries, aggregates, DELETE without WHERE and other advanced SQL (see docs/storage/SINGLE_FILE_SQL_LIMITATIONS.md). SCDMS must currently block these with an explanation, which limits the studio on single-file databases.
Needed
Investigate lifting (a subset of) these limitations, prioritising JOIN and simple aggregates/subqueries.
Until then, keep the documented limitation list authoritative so SCDMS can show accurate capability reasons.
This issue's premise is stale — measured, not read
I re-derived the claim by executing the whole matrix on 2026-12-06 against a .scdb file and a directory database
side by side (same DDL, same rows, same statements). Single-file mode is not missing JOIN, GROUP BY, subqueries,
aggregates or DELETE without WHERE: it shares the SqlParser with directory mode, and these all return the same
rows in both modes — measured, not inferred:
Statement
Directory
.scdb
INNER JOIN / LEFT JOIN / RIGHT JOIN / FULL OUTER JOIN
same rows
same rows
GROUP BY (+ COUNT/SUM), HAVING
same rows
same rows
subquery in FROM, subquery in WHERE (IN (SELECT …))
same rows
same rows
SELECT AVG(total), COUNT, MIN, MAX over a clean column
same rows
same rows
DELETE FROM t (no WHERE), UPDATE … (no WHERE)
same rows
same rows
SELECT *, WHERE (=, AND/OR), ORDER BY, LIMIT/OFFSET, DISTINCT, LIKE, IN, BETWEEN, IS NULL
same rows
same rows
window functions (ROW_NUMBER() OVER …), UNION, CASE
same rows
same rows
So there is nothing to "lift" for the items this issue lists.
What is genuinely still missing (different list)
Executing the matrix produced a new, precise list; it is filed as #580 with the evidence and the workarounds, and docs/storage/SINGLE_FILE_SQL_LIMITATIONS.md now documents it as Verified gaps (the file previously claimed several
things that are not true — five rows were wrong and are corrected):
a view cannot be queried in either mode (SELECT … FROM <view> → Table <view> does not exist);
WHERE predicates that meet a NULL disagree between the modes and both depart from SQL;
SUM/AVG/MIN/MAX over a column containing a NULL throw InvalidCastException;
sqlite_master answers on directory only, sqlite_schema on neither.
The documentation half of this issue is done
docs/storage/SINGLE_FILE_SQL_LIMITATIONS.md is rewritten from the measurement: every row of the DDL/DML/SELECT and
introspection matrices was executed on both modes on 2026-12-06, the five wrong rows are corrected
(INSERT OR IGNORE/INSERT OR REPLACE, sqlite_master/sqlite_schema, BEGIN/COMMIT/ROLLBACK, STORAGE = COLUMNAR, EXPLAIN), the broken duplicate FluentMigrator table is removed, and the file states its method
and date so the next reader can re-run it. SCDMS can show accurate capability reasons from that file, and from information_schema, today.
Closing this as done: the investigation found the premise stale, the capability list is now authoritative, and the real
remaining gaps are scoped in #580.
Activity
Merge pull request #581 from MPCoreDeveloper/docs/571-measured-single…
MPCoreDeveloper commentedon Dec 6, 2026
This issue's premise is stale — measured, not read
I re-derived the claim by executing the whole matrix on 2026-12-06 against a
.scdbfile and a directory databaseside by side (same DDL, same rows, same statements). Single-file mode is not missing JOIN, GROUP BY, subqueries,
aggregates or
DELETEwithoutWHERE: it shares theSqlParserwith directory mode, and these all return the samerows in both modes — measured, not inferred:
.scdbINNER JOIN/LEFT JOIN/RIGHT JOIN/FULL OUTER JOINGROUP BY(+COUNT/SUM),HAVINGFROM, subquery inWHERE(IN (SELECT …))SELECT AVG(total),COUNT,MIN,MAXover a clean columnDELETE FROM t(noWHERE),UPDATE …(noWHERE)SELECT *,WHERE(=,AND/OR),ORDER BY,LIMIT/OFFSET,DISTINCT,LIKE,IN,BETWEEN,IS NULLROW_NUMBER() OVER …),UNION,CASESo there is nothing to "lift" for the items this issue lists.
What is genuinely still missing (different list)
Executing the matrix produced a new, precise list; it is filed as #580 with the evidence and the workarounds, and
docs/storage/SINGLE_FILE_SQL_LIMITATIONS.mdnow documents it as Verified gaps (the file previously claimed severalthings that are not true — five rows were wrong and are corrected):
SELECT … FROM <view>→Table <view> does not exist);WHEREpredicates that meet aNULLdisagree between the modes and both depart from SQL;SUM/AVG/MIN/MAXover a column containing aNULLthrowInvalidCastException;sqlite_masteranswers on directory only,sqlite_schemaon neither.The documentation half of this issue is done
docs/storage/SINGLE_FILE_SQL_LIMITATIONS.mdis rewritten from the measurement: every row of the DDL/DML/SELECT andintrospection matrices was executed on both modes on 2026-12-06, the five wrong rows are corrected
(
INSERT OR IGNORE/INSERT OR REPLACE,sqlite_master/sqlite_schema,BEGIN/COMMIT/ROLLBACK,STORAGE = COLUMNAR,EXPLAIN), the broken duplicate FluentMigrator table is removed, and the file states its methodand date so the next reader can re-run it. SCDMS can show accurate capability reasons from that file, and from
information_schema, today.Closing this as done: the investigation found the premise stale, the capability list is now authoritative, and the real
remaining gaps are scoped in #580.