Skip to content

EXPLAIN output contains insufficient information to understand types #12997

@findepi

Description

@findepi

For example:

> explain select a as c from (VALUES (NULL), (NULL), (NULL)) as T(a);
+---------------+---------------------------------------+
| plan_type     | plan                                  |
+---------------+---------------------------------------+
| logical_plan  | Projection: t.a AS c                  |
|               |   SubqueryAlias: t                    |
|               |     Projection: column1 AS a          |
|               |       Values: (NULL), (NULL), (NULL)  |
| physical_plan | ProjectionExec: expr=[column1@0 as c] |
|               |   ValuesExec                          |
|               |                                       |
+---------------+---------------------------------------+

from the output one could assume the type of a to be Null, but it used to be Utf8 eg in in DF v40, as can be seen using arrow_typeof

> select arrow_typeof(a) as c from (VALUES (NULL), (NULL), (NULL)) as T(a);
+------+
| c    |
+------+
| Utf8 |
| Utf8 |
| Utf8 |
+------+

Using arrow_typeof should not be needed to reason about EXPLAIN plans.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions