class RowPartitionComputer implements PartitionComputer<Row> {

	@Override
	public LinkedHashMap<String, String> generatePartValues(Row in) throws Exception {
		LinkedHashMap<String, String> partSpec = new LinkedHashMap<>();

		for (int i = 0; i < partitionIndexes.length; i++) {
			int index = partitionIndexes[i];
			Object field = in.getField(index);
			String partitionValue = field != null ? field.toString() : null;
			if (partitionValue == null || "".equals(partitionValue)) {
				partitionValue = defaultPartValue;
			}
			partSpec.put(partitionColumns[i], partitionValue);
		}
		return partSpec;
	}

	public  RowPartitionComputer(String defaultPartValue, String[] columnNames, String[] partitionColumns);

}