Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5555

CSV file without headers: "SELECT a" fails, "SELECT columns, a" succeeds

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.10.0
    • Fix Version/s: None
    • Component/s: Storage - Text & CSV
    • Labels:
      None

      Description

      Consider the case discussed in DRILL-5554. Do exactly the same setup, but with a slightly different query. The results are much different.

      Create a CSV file without headers:

      10,foo,bar
      

      Use a CSV storage plugin configured to not skip the first line and not read headers.

      Then, issue the following query:

      SELECT columns, a FROM `dfs.data.example.csv`
      

      Result:

      columns,a
      ["10","foo","bar"],null
      

      Schema:

      columns(VARCHAR:REPEATED), 
      a(INT:OPTIONAL)
      

      Since the query in DRILL-5554 fails:

      SELECT a FROM ...
      

      Expected the query described here to also fail, for a similar reason.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              paul-rogers Paul Rogers
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: