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

Command containing semicolon is broken in Beeline

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Beeline
    • Labels:
      None

      Description

      The Beeline command (!cmd) containing semicolon is broken.
      For example:
      !connect jdbc:hive2://localhost:10001/default;principal=hive/xyz.com@realm.com
      is broken because the included ";" makes it not to run with execCommandWithPrefix as a whole command.

            if (line.startsWith(COMMAND_PREFIX) && !line.contains(";")) {
              // handle the case "!cmd" for beeline
              return execCommandWithPrefix(line);
            } else {
              return commands.sql(line, getOpts().getEntireLineAsCommand());
            }
      

        Attachments

        1. HIVE-12259.patch
          2 kB
          Chaoyu Tang

          Issue Links

            Activity

              People

              • Assignee:
                ctang Chaoyu Tang
                Reporter:
                ctang Chaoyu Tang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: