FieldSchema otherFs = otherlist.get(idx) ; FieldSchema mergedFs = myFs.mergePrefixFieldSchema(otherFs, otherTakesAliasPrecedence, allowMergeableTypes); outputList.add(mergedFs) ;
/*** * Recursively prefix merge two schemas * @param otherFs the other field schema to be merged with * @param otherTakesAliasPrecedence true if aliases from the other * field schema take precedence * @return the prefix merged field schema this can be null if one schema is null and * allowIncompatibleTypes is true * * @throws SchemaMergeException if they cannot be merged */ public Schema.FieldSchema mergePrefixFieldSchema(Schema.FieldSchema otherFs, boolean otherTakesAliasPrecedence) throws SchemaMergeException { return mergePrefixFieldSchema(otherFs, otherTakesAliasPrecedence, false); }
/*** * Recursively prefix merge two schemas * @param otherFs the other field schema to be merged with * @return the prefix merged field schema this can be null if one schema is null and * allowIncompatibleTypes is true * * @throws SchemaMergeException if they cannot be merged */ public Schema.FieldSchema mergePrefixFieldSchema(Schema.FieldSchema otherFs) throws SchemaMergeException { return mergePrefixFieldSchema(otherFs, true, false); }