private String getStringValueForInsert(Object value, Type type) {
    String template = "\'%s\'";
    if (value == null) {
      return "NULL";
    } else if (type.equals(Types.TimestampType.withoutZone())) {
      return String.format(template, Timestamp.valueOf((LocalDateTime) value));
    } else if (type.equals(Types.TimestampType.withZone())) {
      return String.format(template, Timestamp.from(((OffsetDateTime) value).toInstant()));
    } else if (type.equals(Types.BooleanType.get())) {
      // in hive2 boolean type values must not be surrounded in apostrophes. Otherwise the value is translated to true.
      return value.toString();
    } else {
      return String.format(template, value.toString());
    }
  }
Truncates an Iceberg table.
@param table The iceberg table to truncate
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestTables.java