-
Notifications
You must be signed in to change notification settings - Fork 4.1k
opt: select on empty table with no columns causes panic #28388
Copy link
Copy link
Closed
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.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.S-2-temp-unavailabilityTemp crashes or other availability problems. Can be worked around or resolved by restarting.Temp crashes or other availability problems. Can be worked around or resolved by restarting.
Description
In optbuilder, this test will cause a panic:
exec-ddl
CREATE TABLE no_cols_table ()
----
build
SELECT * FROM no_cols_table
----
The code hits this panic:
| panic("presentation property doesn't apply to non-relational operators") |
This was discovered when implementing table references. In particular the following results in a panic,
CREATE TABLE t (x INT, y INT)
SELECT * FROM [53(3) as t]
Where column 3 is the hidden column, rowid.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.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.S-2-temp-unavailabilityTemp crashes or other availability problems. Can be worked around or resolved by restarting.Temp crashes or other availability problems. Can be worked around or resolved by restarting.