[ https://issues.apache.org/jira/browse/DRILL-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arina Ielchiieva updated DRILL-3090: ------------------------------------ Fix Version/s: (was: Future) 1.16.0 > 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 > Priority: Minor > Fix For: 1.16.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 (v7.6.3#76005)