boolean needsContinuation(String line) {
    if (isHelpRequest(line)) {
      return false;
    }

    if (line.startsWith(COMMAND_PREFIX)) {
      return false;
    }

    if (isComment(line)) {
      return false;
    }

    String trimmed = line.trim();

    if (trimmed.length() == 0) {
      return false;
    }

    if (!getOpts().isAllowMultiLineCommand()) {
      return false;
    }

    return !trimmed.endsWith(getOpts().getDelimiter());
  }
Test whether a line requires a continuation.

@param line
         the line to be tested

@return true if continuation required
beeline/src/java/org/apache/hive/beeline/BeeLine.java