Krystal created DRILL-5225:
------------------------------

             Summary: Needs better error message for table function when having 
incorrect table path
                 Key: DRILL-5225
                 URL: https://issues.apache.org/jira/browse/DRILL-5225
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
    Affects Versions: 1.9.0, 1.10.0
            Reporter: Krystal


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to