public static Schema filterSchema(Schema schema, String... fieldPaths) {
    """
	a.2.b[3]["key"]
	* optional (union with null) should be ignored
	* unions should match by position number or short name (e.g. 2, user)
	* fields should match by name
	* arrays are dereferenced by position [n] =&gt; schema is the element schema
	* maps are dereferenced by key =&gt; schema is the value schema
	
	@param schema an Avro schema
	@param fieldPaths selected field paths
	@return a filtered schema
    """
    return filterSchema(schema, Lists.newArrayList(fieldPaths));
  }
public static Schema filterSchema(Schema schema, String... fieldPaths) {
    return filterSchema(schema, Lists.newArrayList(fieldPaths));
  }
public static Schema filterSchema ( Schema schema , String ... fieldPaths ) { return filterSchema ( schema , Lists . newArrayList ( fieldPaths ) ) ; }
a.2.b[3]["key"]
* optional (union with null) should be ignored
* unions should match by position number or short name (e.g. 2, user)
* fields should match by name
* arrays are dereferenced by position [n] =&gt; schema is the element schema
* maps are dereferenced by key =&gt; schema is the value schema

@param schema an Avro schema
@param fieldPaths selected field paths
@return a filtered schema
a . 2 . b [ 3 ] [ key ] * optional ( union with null ) should be ignored * unions should match by position number or short name ( e . g . 2 user ) * fields should match by name * arrays are dereferenced by position [ n ] = &gt ; schema is the element schema * maps are dereferenced by key = &gt ; schema is the value schema