Object value = entry.getValue();
int idx = tableInfo.partitionedBy().indexOf(entry.getKey());
try {
ReferenceInfo referenceInfo = tableInfo.partitionedByColumns().get(idx);
Object converted = referenceInfo.type().value(value);
values[idx] = converted == null ? null : DataTypes.STRING.value(converted);
} catch (IndexOutOfBoundsException ex) {
throw new IllegalArgumentException(
String.format("\"%s\" is no known partition column", entry.getKey().fqn()));
}