Skip to content

Return an error when the SQL query contains nested Explain #744

Closed
@HaoYang670

Description

@HaoYang670

In datafusion, we met a bug (apache/datafusion#4378) which the datafusion-CLI will panic when the query contains nested EXPLAIN.

We fixed this bug using a workaround way, and currently the datafusion will return an Internal error when meeting these invalid explain queries. However the error is generated when converting a logical plan to a physical plan, which is too late.

We'd like the sqlparser to return a parsing error when parsing these invalid query string.
An ideal example is:

> explain explain select 1;
ParseError ...

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