private static boolean shouldEncloseQuotes(PrimitiveCategory category) {
    switch(category) {
      case STRING:
      case DATE:
      case TIMESTAMP:
      case TIMESTAMPLOCALTZ:
      case BINARY:
      case INTERVAL_DAY_TIME:
      case INTERVAL_YEAR_MONTH:
        return true;
      case VOID:
      case BOOLEAN:
      case BYTE:
      case SHORT:
      case INT:
      case LONG:
      case FLOAT:
      case DOUBLE:
      case DECIMAL:
      case UNKNOWN:
      default:
        return false;
    }
  }
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