Skip to content

Create DDL Command DESCRIBE/EXPLAIN/SHOW #17466

@comphead

Description

@comphead

The idea is to output the schema for query similar to DuckDB or Apache Spark

D describe select map_extract(map([1], ['a']), 1)[1];
┌────────────────────────────────────────────────────────────────────┬─────────────┬─────────┬─────────┬─────────┬─────────┐
│                            column_name                             │ column_type │  null   │   key   │ default │  extra  │
│                              varchar                               │   varchar   │ varchar │ varchar │ varchar │ varchar │
├────────────────────────────────────────────────────────────────────┼─────────────┼─────────┼─────────┼─────────┼─────────┤
│ map_extract("map"(main.list_value(1), main.list_value('a')), 1)[1] │ VARCHAR     │ YES     │         │         │         │
└────────────────────────────────────────────────────────────────────┴─────────────┴─────────┴─────────┴─────────┴─────────┘
D

it would require some discussion what command to use? Some possible options below

Possible DDL options

DESCRIBE query - like in DuckDB
EXPLAIN SCHEMA query
SHOW SCHEMA query

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions