private boolean isMultiLine(String line) {
    line = line.trim();
    if (line.endsWith(beeLine.getOpts().getDelimiter()) || beeLine.isComment(line)) {
      return false;
    }
    // handles the case like line = show tables; --test comment
    List<String> cmds = getCmdList(line, false);
    if (!cmds.isEmpty() && cmds.get(cmds.size() - 1).trim().startsWith("--")) {
      return false;
    }
    return true;
  }
Extract and clean up the first command in the input.
beeline/src/java/org/apache/hive/beeline/Commands.java