Denys Ordynskiy created DRILL-7332:
--------------------------------------

             Summary: Drill requires parentheses in the empty file for 'LOAD' 
argument in the 'CREATE SCHEMA' command
                 Key: DRILL-7332
                 URL: https://issues.apache.org/jira/browse/DRILL-7332
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 1.16.0
            Reporter: Denys Ordynskiy
            Assignee: Arina Ielchiieva
             Fix For: 1.17.0


Description:
 - created csvh table: {color:#205081}create table dfs.tmp.`test_table` (col1) 
as select full_name from cp.`employee.json` limit 3;{color}
 - created text file on the local file system `for_load` with text without 
parentheses: {color:#14892c}col1 varchar not null{color}
 - created some schema file: {color:#205081}create or replace schema *LOAD* 
'file:///home/user/for_load' for table dfs.tmp.`test_table` properties 
('drill.strict' = 'false');{color} - schema was created successfully;
- remove all text from the `for_load` file and try to create the same schema: 
{color:#205081}create or replace schema *LOAD* 'file:///home/user/for_load' for 
table dfs.tmp.`test_table` properties ('drill.strict' = 'false');{color}

*Actual result:*
Drill throws an error:
{color:#d04437}Error: RESOURCE ERROR: Unable to parse schema []: Line [1], 
position [0], offending symbol [@0,0:-1='<EOF>',<-1>,1:0]: mismatched input 
'<EOF>' expecting {'(', ID, QUOTED_ID}

Error while preparing / creating schema for [%s] dfs.tmp.test_table

[Error Id: faad9c09-2e3e-428c-bd7a-6da8832a943b ] (state=,code=0){color}

*Expected result:*
Since Drill doesn't require parentheses for non empty `for_load` file (with 
some columns),
It couldn't require parentheses for the empty file, used in the `LOAD` argument.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to