-
Notifications
You must be signed in to change notification settings - Fork 4.1k
opt: internal error because optbuilder addCasts adds a tuple[] cast that we don't support #70831
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-queriesSQL Queries TeamSQL Queries Teambranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.
Description
This is spun off to track a failure causing #70663 #70669 #70667 #70666 and #70670
The error internal error: no volatility for cast tuple[]::tuple{bool, unknown}[] is returned when running this query.
SELECT * FROM (VALUES (ARRAY[(true, NULL)])) AS v1
EXCEPT ALL SELECT * FROM (VALUES (ARRAY[]::RECORD[])) AS v2;
Using bisect I found that the bug was introduced in 4037bd8 which made it into v21.1.0 and was also backported to v20.2 (#61086). This commit seems to modify addCasts in optbuilder/union.go in a way that causes it to add casts that we don't actually support.
cc @mgartner and @yuzefovich who were tagged on the above issues.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-queriesSQL Queries TeamSQL Queries Teambranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.
Type
Projects
Status
Done