public static String convertStringToLiteralForSQL(String value, PrimitiveCategory category) {
    if (shouldEncloseQuotes(category)) {
      return "'" + value.replace("'", "\\'") + "'";
    }
    return value;
  }
Returns whether it is possible to implicitly convert an object of Class
from to Class to.
serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java