Skip to content

create external table should fail to parse if syntax is incorrect #4262

@andygrove

Description

@andygrove

Describe the bug
When using create external table with csv files we can specify with header row to indicate that the file contains headers.

I ran this and forgot the syntax and omitted the word row and it did not process the header row and also did not fail and tell me that the syntax was incorrect.

To Reproduce

❯ create external table taxi_zone stored as csv with header location "/mnt/bigdata/nyctaxi/taxi+_zone_lookup.csv";
0 rows in set. Query took 0.008 seconds.
❯ select * from taxi_zone limit 10;
+------------+---------------+-------------------------+--------------+
| column_1   | column_2      | column_3                | column_4     |
+------------+---------------+-------------------------+--------------+
| LocationID | Borough       | Zone                    | service_zone |
| 1          | EWR           | Newark Airport          | EWR          |
| 2          | Queens        | Jamaica Bay             | Boro Zone    |
| 3          | Bronx         | Allerton/Pelham Gardens | Boro Zone    |
| 4          | Manhattan     | Alphabet City           | Yellow Zone  |
| 5          | Staten Island | Arden Heights           | Boro Zone    |
| 6          | Staten Island | Arrochar/Fort Wadsworth | Boro Zone    |
| 7          | Queens        | Astoria                 | Boro Zone    |
| 8          | Queens        | Astoria Park            | Boro Zone    |
| 9          | Queens        | Auburndale              | Boro Zone    |
+------------+---------------+-------------------------+--------------+

Expected behavior
SQL should have failed to parse.

Additional context
None

Task list

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions