boolean isComment(String line) {
    // SQL92 comment prefix is "--"
    // beeline also supports shell-style "#" prefix
    String lineTrimmed = line.trim();
    return lineTrimmed.startsWith("#") || lineTrimmed.startsWith("--");
  }
Test whether a line is a comment.

@param line
         the line to be tested

@return true if a comment
beeline/src/java/org/apache/hive/beeline/BeeLine.java