columnIndexedByUuid.put(column.getUuid().toString(), i);
}
FieldDescriptor[] nullFields = null;
Map<FieldDescriptor,Integer> nullableIndexesByField = null;
for (FieldDescriptor field : tableMessage.getFields()) {
ColumnOptions options = field.getOptions().getExtension(ColumnOptions.fdbsql);
if (options.hasUuid()) {
Integer columnIndex = columnIndexedByUuid.get(options.getUuid());
if (columnIndex != null) {
fields[columnIndex] = field;
columnIndexesByField.put(field, columnIndex);
}
}
else if (options.hasNullForField()) {
if (nullFields == null) {
nullFields = new FieldDescriptor[nfields];
nullableIndexesByField = new HashMap<>(nfields);
}
FieldDescriptor forField = tableMessage.findFieldByNumber(options.getNullForField());
Integer columnIndex = columnIndexesByField.get(forField);
nullFields[columnIndex] = field;
nullableIndexesByField.put(field, columnIndex);
}
}