[ 
https://issues.apache.org/jira/browse/DRILL-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vitalii Diravka resolved DRILL-2597.
------------------------------------
       Resolution: Won't Fix
    Fix Version/s:     (was: Future)
                   1.15.0

Looks like it is no more an issue with the SqlLine 1.6.0 version:
{code}
vitalii@vitalii-pc:/tmp/drill/bin$ ./sqlline -u 'jdbc:drill:drillbit=localhost' 
--run="/tmp/DDL.sql"
1/5          -- comment
2/5          use dfs.tmp;
+-------+--------------------------------------+
|  ok   |               summary                |
+-------+--------------------------------------+
| true  | Default schema changed to [dfs.tmp]  |
+-------+--------------------------------------+
1 row selected (0.154 seconds)
3/5          drop view if exists abc;
+-------+---------------------------------------------------------+
|  ok   |                         summary                         |
+-------+---------------------------------------------------------+
| true  | View [abc] deleted successfully from schema [dfs.tmp].  |
+-------+---------------------------------------------------------+
1 row selected (0.098 seconds)
4/5          create view abc as select * from cp.`employee.json` limit 2;
+-------+------------------------------------------------------+
|  ok   |                       summary                        |
+-------+------------------------------------------------------+
| true  | View 'abc' created successfully in 'dfs.tmp' schema  |
+-------+------------------------------------------------------+
1 row selected (0.101 seconds)
5/5          select * from abc;
+--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+
| employee_id  |    full_name     | first_name  | last_name  | position_id  |   
position_title    | store_id  | department_id  | birth_date  |       hire_date  
      |  salary  | supervisor_id  | education_level  | marital_status  | gender 
 |  management_role   |
+--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+
| 1            | Sheri Nowmer     | Sheri       | Nowmer     | 1            | 
President           | 0         | 1              | 1961-08-26  | 1994-12-01 
00:00:00.0  | 80000.0  | 0              | Graduate Degree  | S               | 
F       | Senior Management  |
| 2            | Derrick Whelply  | Derrick     | Whelply    | 2            | 
VP Country Manager  | 0         | 1              | 1915-07-03  | 1994-12-01 
00:00:00.0  | 40000.0  | 1              | Graduate Degree  | M               | 
M       | Senior Management  |
+--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+
2 rows selected (0.11 seconds)
Closing: org.apache.drill.jdbc.impl.DrillConnectionImpl
Apache Drill 1.15.0-SNAPSHOT
"A Drill in the hand is better than two in the bush."
{code}
The similar result for 
{code}
vitalii@vitalii-pc:/tmp/drill/bin$ ./sqlline -u 'jdbc:drill:drillbit=localhost' 
-f ="/tmp/DDL.sql"
{code}

> Sqlline fails when script contains comments
> -------------------------------------------
>
>                 Key: DRILL-2597
>                 URL: https://issues.apache.org/jira/browse/DRILL-2597
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - CLI
>    Affects Versions: 0.8.0
>            Reporter: Abhishek Girish
>            Assignee: Vitalii Diravka
>            Priority: Major
>             Fix For: 1.15.0
>
>
> Sqlline fails if option -f or - -run= is used, and the DDL file contains a 
> comment. 
> *File contents:*
> {code}
> -- comments
> drop view abc;
> create view abc;
> {code}
> *Fails to recognize comments starting with - - *
> {code}
> ${DRILL_HOME}/bin/sqlline -u "jdbc:drill:schema=dfs.tmp"  --run=abc.sql
> Drill log directory: /opt/mapr/drill/drill-0.8.0/logs
> 1/50         -- comments
> Aborting command set because "force" is false and command failed: "-- 
> comments "
> Closing: org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection
> sqlline version 1.1.6
> # ${DRILL_HOME}/bin/sqlline -u "jdbc:drill:schema=dfs.tmp"  -f abc.sql
> Drill log directory: /opt/mapr/drill/drill-0.8.0/logs
> 1/50         -- comments
> Aborting command set because "force" is false and command failed: "-- comment"
> Closing: org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection
> sqlline version 1.1.6
> {code}
> However, it does recognizes comments enclosed within /* ... */



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to