private static 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
common/src/java/org/apache/hive/common/util/HiveStringUtils.java