private GroupType convertMap(String alias, FieldSchema fieldSchema) {
    Schema innerSchema = fieldSchema.schema;
    if (innerSchema == null || innerSchema.size() != 1) {
      throw new SchemaConversionException("Invalid map Schema, schema should contain exactly one field: " + fieldSchema);
    }
    FieldSchema innerField = null;
    try {
      innerField = innerSchema.getField(0);
    } catch (FrontendException fe) {
      throw new SchemaConversionException("Invalid map schema, cannot infer innerschema: ", fe);
    }
    Type convertedValue = convertWithName(innerField, "value");
    return ConversionPatterns.stringKeyMapType(Repetition.OPTIONAL, alias, name(innerField.alias, "map"),
        convertedValue);
  }
private GroupType convertMap ( String alias , FieldSchema fieldSchema ) { Schema innerSchema = fieldSchema . schema ; if ( innerSchema == null || innerSchema . size ( ) != 1 ) { throw new SchemaConversionException ( "Invalid map Schema, schema should contain exactly one field: " + fieldSchema ) ; } FieldSchema innerField = null ; try { innerField = innerSchema . getField ( 0 ) ; } catch ( FrontendException fe ) { throw new SchemaConversionException ( "Invalid map schema, cannot infer innerschema: " , fe ) ; } Type convertedValue = convertWithName ( innerField , "value" ) ; return ConversionPatterns . stringKeyMapType ( Repetition . OPTIONAL , alias , name ( innerField . alias , "map" ) , convertedValue ) ; }
@param alias
@param fieldSchema
@return an optional group containing one repeated group field (key, value)
@throws FrontendException