Repository navigation
feat: state unsupported queries in SQL terms and flag internal errors - #76
Merged
omer-cengel merged 2 commits intoOct 11, 2026
Merged
omer-cengel merged 2 commits into
omer-cengel merged 2 commits into
Conversation
Set operations, other statement kinds, computed projections and RETURNING items, LATERAL, subquery and CTE-named sources, unsupported join kinds, INSERT ... SELECT, and joined or multi-table writes on every write now fail with a diagnostic that names the construct and, where one exists, what to write instead. A parenthesized SELECT is analyzed as the query it encloses, and a parenthesized single VALUES row still analyzes as before.
A failure that is not one of sqlcj's own diagnostics is reported as one located line that names the schema file, query, query group, or package and asks for a defect report, without the failure's message or class.
omer-cengel
deleted the
feature/unsupported-query-diagnostics-and-internal-errors
branch
October 11, 2026 18:18
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.
Summary
Queries outside the supported subset used to fail with raw parser class names or cast-failure messages, and an unexpected failure inside sqlcj passed its exception message straight to the user. Every unsupported query now fails with one located diagnostic that names the construct in SQL terms and, where one exists, what to write instead. Any failure that is not one of sqlcj's own diagnostics is reported as a located internal-error line that asks for a defect report.
Changes
UNION,INTERSECT, andEXCEPT, written directly or in parentheses, are rejected with a suggestion to write one query perSELECT. Every statement other thanSELECT,INSERT,UPDATE, andDELETE, includingVALUESandTABLEstatements, is rejected naming the supported kinds, before the annotation is checked.SELECTis analyzed as the query it encloses, at any depth.RETURNINGitem is rejected naming the expression and the items that are supported.LATERALsource, a subquery inFROM, and a source that names aWITHclause of its own query are each rejected with their own diagnostic, so a CTE named like a table never reads that table.FULL,RIGHT,CROSS,NATURAL,USING, and comma-separated joins each get their own diagnostic, and those that can be rewritten say how.INSERT ... SELECT, with or without parentheses, is rejected on every insert. A parenthesized singleVALUESrow still analyzes as before.UPDATE ... FROM, comma-joinedUPDATE,DELETE ... USING, and joinedDELETEare rejected on every write, not only when the write returns rows.; please report this sqlcj defect, without the failure's message or class.Scope and non-goals
VALUES,INSERT ... SELECT, and joined writes are still unsupported. Only how they are reported changes.