Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13783

Display a secondary prompt on beeline for multi-line statements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.1.0
    • Beeline
    • None

    Description

      # beeline -u jdbc:hive2://localhost:10000
      [...]
      Beeline version 1.1.0-cdh5.4.5 by Apache Hive
      0: jdbc:hive2://localhost:10000> "
      0: jdbc:hive2://localhost:10000> select * from foo;
      Error: Error while compiling statement: FAILED: ParseException line 2:17 character '<EOF>' not supported here (state=42000,code=40000)
      0: jdbc:hive2://localhost:10000> 
      

      After (accidentally) entering a lonely quote character on its own line and pressing Enter, I get back the normal prompt. This easily makes me believe I'm about to type a new command from scratch, e.g. a select query as in the example, which ends up not working due to parsing error.

      Expected behavior: When a previous command is continued, or a quote is opened or anything like this, a differently looking secondary prompt should be displayed rather than the normal prompt; as this is done in e.g. hive, impala, mysql, bash..., e.g.:

      # beeline -u jdbc:hive2://localhost:10000
      [...]
      Beeline version 1.1.0-cdh5.4.5 by Apache Hive
      0: jdbc:hive2://localhost:10000> "
                                     > ...
      

      Attachments

        1. HIVE-13783.01.patch
          2 kB
          Vihang Karajgaonkar

        Activity

          People

            vihangk1 Vihang Karajgaonkar
            vihangk1 Vihang Karajgaonkar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: