You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (JIRA)" <ji...@apache.org> on 2017/05/29 21:29:04 UTC
[jira] [Created] (DRILL-5549) SELECT * against a CSV file with
empty headers produces error
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:
{code}
org.apache.drill.common.exceptions.UserRemoteException:
SYSTEM ERROR: HeaderError: The file must define at least one header.
{code}
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:
{code}
1:
2: fred
3: barney
{code}
(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
(v6.3.15#6346)