class ValueVectorElementFormatter {

  public String format(Object value, TypeProtos.MinorType minorType) {
    switch (minorType) {
      case TIMESTAMP:
        if (value instanceof LocalDateTime) {
          return format((LocalDateTime) value,
                        options.getString(ExecConstants.WEB_DISPLAY_FORMAT_TIMESTAMP),
                        (v, p) -> v.format(getTimestampFormatter(p)));
        }
      case DATE:
        if (value instanceof LocalDate) {
          return format((LocalDate) value,
                        options.getString(ExecConstants.WEB_DISPLAY_FORMAT_DATE),
                        (v, p) -> v.format(getDateFormatter(p)));
        }
      case TIME:
        if (value instanceof LocalTime) {
          return format((LocalTime) value,
                        options.getString(ExecConstants.WEB_DISPLAY_FORMAT_TIME),
                        (v, p) -> v.format(getTimeFormatter(p)));
        }
      case VARBINARY:
        if (value instanceof byte[]) {
          byte[] bytes = (byte[]) value;
          return org.apache.drill.common.util.DrillStringUtils.toBinaryString(bytes);
        }
      default:
        return value.toString();
    }
  }

  public  ValueVectorElementFormatter(OptionManager options);

}