set_join_fieldviews = async ({ table, columns, fields }) => {
  //legacy
  for (const segment of columns) {
    const { join_field, join_fieldview } = segment;
    if (!join_fieldview) continue;

    const field = table.getField(join_field);
    if (field && field.type === "File") segment.field_type = "File";
    else if (field?.type.name && field?.type?.fieldviews[join_fieldview])
      segment.field_type = field.type.name;
  }
}
@param {object} opts
@param {object} opts.layout
@param {object[]} opts.fields
@returns {Promise<void>}