Skip to content

opt: select on empty table with no columns causes panic #28388

@madhavsuresh

Description

@madhavsuresh

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.

Metadata

Metadata

Assignees

Labels

A-sql-optimizerSQL logical planning and optimizations.C-bugCode 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions