Skip to content

VALUES is never considered non-nullable #22088

@neilconway

Description

@neilconway

Describe the bug

Expressions from VALUES are always considered nullable, which (1) inhibits some optimization opportunities, at least in theory (2) is inconsistent with other similar situations where we do nullability analysis; see example.

To Reproduce

I think the behavior here is inconsistent:

> DESCRIBE SELECT 1 FROM VALUES (5);
+-------------+-----------+-------------+
| column_name | data_type | is_nullable |
+-------------+-----------+-------------+
| Int64(1)    | Int64     | NO          |
+-------------+-----------+-------------+
1 row(s) fetched.
Elapsed 0.002 seconds.

> DESCRIBE VALUES (5);
+-------------+-----------+-------------+
| column_name | data_type | is_nullable |
+-------------+-----------+-------------+
| column1     | Int64     | YES         |
+-------------+-----------+-------------+
1 row(s) fetched.
Elapsed 0.002 seconds.

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions