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

Wrong error type for "SELECT a" from a CSV file without headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.10.0
    • 1.17.0
    • None
    • None

    Description

      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 a FROM `dfs.data.example.csv`
      

      The result is correct: an error:

      org.apache.drill.common.exceptions.UserRemoteException: 
      DATA_READ ERROR: Selected column 'a' must have name 'columns' or must be plain '*'
      

      But, the type of error is wrong. This is not a data read error: the file read just fine. The problem is a semantic error: a query form that is not compatible wth the storage plugin.

      Suggest using UserException.unsupportedError() instead since the user is asking the plugin to do something that the plugin does not support.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: