-
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.
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.
In optbuilder, this test will cause a panic:
The code hits this panic:
cockroach/pkg/sql/opt/xform/physical_props.go
Line 61 in 6e44714
This was discovered when implementing table references. In particular the following results in a panic,
Where column
3is the hidden column,rowid.