You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Westin (JIRA)" <ji...@apache.org> on 2015/05/22 19:32:17 UTC

[jira] [Updated] (DRILL-3090) sqlline : save SQL to script file and replay from script, results in error

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

Chris Westin updated DRILL-3090:
--------------------------------
    Component/s:     (was: Tools, Build & Test)
                 Client - CLI

> sqlline : save SQL to script file and replay from script, results in error
> --------------------------------------------------------------------------
>
>                 Key: DRILL-3090
>                 URL: https://issues.apache.org/jira/browse/DRILL-3090
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - CLI
>    Affects Versions: 1.0.0
>         Environment: ffbb9c7adc6360744bee186e1f69d47dc743f73e
>            Reporter: Khurram Faraaz
>            Assignee: Steven Phillips
>            Priority: Minor
>             Fix For: 1.1.0
>
>
> Save a SQL query to a script file and replay the SQL from the script file using !run, on sqlline prompt throws error. We should not see the error when we replay the SQL from the script file.
> {code}
> 0: jdbc:drill:schema=dfs.tmp> !script file3
> Saving command script to "/opt/mapr/drill/drill-1.0.0/bin/file3". Enter "script" with no arguments to stop it.
> 0: jdbc:drill:schema=dfs.tmp> select * from sys.drillbits;
> +------------+------------+--------------+------------+------------+
> |  hostname  | user_port  | control_port | data_port  |  current   |
> +------------+------------+--------------+------------+------------+
> | centos-04.qa.lab | 31010      | 31011        | 31012      | false      |
> | centos-02.qa.lab | 31010      | 31011        | 31012      | false      |
> | centos-01.qa.lab | 31010      | 31011        | 31012      | false      |
> | centos-03.qa.lab | 31010      | 31011        | 31012      | true       |
> +------------+------------+--------------+------------+------------+
> 4 rows selected (0.176 seconds)
> 0: jdbc:drill:schema=dfs.tmp> !script
> Script closed. Enter "run /opt/mapr/drill/drill-1.0.0/bin/file3" to replay it.
> 0: jdbc:drill:schema=dfs.tmp> !run /opt/mapr/drill/drill-1.0.0/bin/file3
> 1/2          select * from sys.drillbits;
> +------------+------------+--------------+------------+------------+
> |  hostname  | user_port  | control_port | data_port  |  current   |
> +------------+------------+--------------+------------+------------+
> | centos-04 | 31010      | 31011        | 31012      | false      |
> | centos-02 | 31010      | 31011        | 31012      | false      |
> | centos-01 | 31010      | 31011        | 31012      | false      |
> | centos-03 | 31010      | 31011        | 31012      | true       |
> +------------+------------+--------------+------------+------------+
> 4 rows selected (0.178 seconds)
> 2/2          !script
> Usage: script <filename>
> Aborting command set because "force" is false and command failed: "!script"
> {code}
> I looked at the contents of file3 under /opt/mapr/drill/drill-1.0.0/bin
> There seems to be an additional/extra "!script" in the file.
> {code}
> [root@centos-01 bin]# cat file3
> select * from sys.drillbits;
> !script
> [root@centos-01 bin]# 
> {code}



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