* Generates {@link TableFieldSchema} for fields which are of repeated type like collection or
* array. It recursively generates schema for the parameter type of the collection or array.
*/
private TableFieldSchema getSchemaOfRepeatedFields(Field field) {
Class<?> parameterType = BigQueryFieldUtil.getParameterTypeOfRepeatedField(field);
TableFieldSchema tf = parseFieldAnnotations(field);
tf.setMode(BigQueryFieldMode.REPEATED.getValue());
if (BigqueryFieldMarshallers.getMarshaller(parameterType) != null) {
return tf.setType(BigQueryDataTypeUtil.getBigQueryType(
BigqueryFieldMarshallers.getMarshaller(parameterType).getSchemaType()));
}
tf.setType(BigQueryConstants.RECORD_TYPE);
return tf.setFields(getSchema(parameterType));
}