Repository navigation
Conversation
A base table's VARIANT, OBJECT or ARRAY column was guarded, and charged json_fidelity, whenever the table was read, so strict mode refused SELECT ticket_id FROM tickets because of an unread ARRAY column. The guard and the charge now apply only when the statement names the column, uses a star other than COUNT(*)'s, or joins NATURAL; the guard's failure is loud, so a missed read raises rather than returns a wrong value.
Only the json_fidelity charge depends on whether the statement may read the column; the guard stays, so a read the scan missed raises loudly instead of returning an unguarded value.
Contributor
Author
|
Superseded by #133 (fix/builtin-launch-refusals), which implements the same contract: a base table's VARIANT, OBJECT or ARRAY column needs json_fidelity only where the statement may read it. #133 also skips the json guard for unread columns, and treats a positional |
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
Under strict mode, any table with a VARIANT, OBJECT or ARRAY column refused every query with SQ0008 json_fidelity, even when no semi-structured value was read. For example,
SELECT ticket_id FROM ticketswas refused because of an unread ARRAY column, and it was the largest strict blocker in the realistic-query corpus.Changes
Verification
--builtin-policychecks that scalar reads and a UNION ALL branch convert. Naming the ARRAY column in the select list or WHERE, a star, or a NATURAL join still need json_fidelity.