Skip to content

Improve error message for CREATE EXTERNAL TABLE typos #6288

@alamb

Description

@alamb

If a user puts a typo like this (HEAD rather than HEADER) in their SQL

CREATE EXTERNAL TABLE t(c1 int)
STORED AS CSV
WITH HEAD ROW
LOCATION 'foo.csv';

The Parser returns the somewhat confusing error sql parser error: Missing LOCATION clause in CREATE EXTERNAL TABLE statement

It would be great if the message was something more "expected LOCATION, HEADER, ... got HEAD" that gave the user a hint of what was was wrong

See original suggestion posted by @tz70s in #6257 (comment)

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