drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Rogers (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5549) SELECT * against a CSV file with empty headers produces error
Date Mon, 29 May 2017 21:29:04 GMT
Paul Rogers created DRILL-5549:

             Summary: SELECT * against a CSV file with empty headers produces error
                 Key: DRILL-5549
                 URL: https://issues.apache.org/jira/browse/DRILL-5549
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 1.10.0
            Reporter: Paul Rogers
            Priority: Minor

See DRILL-5548 for background. This test is very similar except that the input file has a
single blank line. Since the CSV plugin is set up to read headers, this represents a non-empty
file, with no headers and no data.

The result this time is somewhat different:

SYSTEM ERROR: HeaderError: The file must define at least one header.

If we fix the issue in DRILL-5548 (empty file), we should use the same solution for a file
with an empty header.

Suppose the file was not entirely empty, suppose it was:

2: fred
3: barney

(Note: line numbers shown to force display of blank line...)

Here, we have an empty header, but we have data. We can't know that we have data while reading
the header. While this is a pathological case, and an invalid CSV file, this second case does
suggest that the right solution to the two empty cases is to use the special {{columns}} array
when the header is empty. This will allow Drill to gracefully handle the case above for a
file with no header but with data.

This message was sent by Atlassian JIRA

View raw message