Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2597

Sqlline fails when script contains comments

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 1.15.0
    • Component/s: Client - CLI
    • Labels:
      None

      Description

      Sqlline fails if option -f or - -run= is used, and the DDL file contains a comment.

      File contents:

      -- comments
      drop view abc;
      create view abc;
      

      *Fails to recognize comments starting with - - *

      ${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
      

      However, it does recognizes comments enclosed within /* ... */

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vitalii Vitalii Diravka
                Reporter:
                agirish Abhishek Girish
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: