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

Needs better error message for table function when having incorrect table path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.0, 1.10.0
    • None
    • Functions - Drill
    • None

    Description

      When schema is missing from table path or full path to table is not given, the error message displayed is very misleading. For example, the query below runs successfully with correct table path:

      select columns[0],columns[1],columns[2] from table(`dfs.drillTestDir`.`/table_function/header.csv`(type=>'text',lineDelimiter=>'\r\n',fieldDelimiter=>',',skipFirstLine=>true));
      -----------------------

      EXPR$0 EXPR$1 EXPR$2

      -----------------------

      1 aaa bbb
      2 ccc ddd
      3 eee null
      4 fff ggg

      -----------------------

      However if the part of the path is left out, for example the schema, then a very misleading error is thrown:

      SQL>select columns[0] from table(`table_function/cr_lf.csv`(type=>'text', lineDelimiter=>'\r\n'))
      1: SQLPrepare = [MapR][Drill] (1040) Drill failed to execute the query: select columns[0] from table(`table_function/cr_lf.csv`(type=>'text', lineDelimiter=>'\r\n'))
      [30027]Query execution error. Details:[
      SYSTEM ERROR: SqlValidatorException: No match found for function signature table_function/cr_lf.csv(type => <CHARACTER>, lineDelimiter => <CHARACTER>)

      Error should indicate that table `table_function/cr_lf.csv` is not found.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              knguyen Krystal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: