Repository navigation
Refuse arrays of CASE and subquery results stored as BLOB - #193
Merged
Merged
Conversation
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.
#181 typed an array element from a column, a cast, a literal or a call, so an element built by
CASEor by a scalar subquery still reached SQLite.ARRAY[CASE WHEN id > 0 THEN b END],array_agg(CASE id WHEN 1 THEN u END)underUuidRepresentation::Blob,ARRAY[(SELECT b FROM t LIMIT 1)]andARRAY[d.x]over a deriveddecode(...) AS xall translated and then failed withJSON cannot hold BLOB values.A
CASEnow takes the common type of its results, the way PostgreSQL'sselect_common_typeresolves it, through the same sql-traits ruleARRAY[...]already uses. A scalar subquery takes the type of its first output column, and a column a derived table or CTE defines by an expression is typed from that expression rather than only when it names another column.sqlparser main now parses
DROP FOREIGN TABLEasObjectType::ForeignTable, which the drop match did not cover. It is dropped with a warning, like theCREATE FOREIGN TABLEthat never reached the output.