Class Expressions


  • public class Expressions
    extends Object
    • Constructor Detail

      • Expressions

        public Expressions()
    • Method Detail

      • select

        public static Object select​(org.apache.avro.Schema schema,
                                    Object datum,
                                    String path)
      • filterSchema

        public static org.apache.avro.Schema filterSchema​(org.apache.avro.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] => schema is the element schema * maps are dereferenced by key => schema is the value schema
        Parameters:
        schema - an Avro schema
        fieldPaths - selected field paths
        Returns:
        a filtered schema
      • filterSchema

        public static org.apache.avro.Schema filterSchema​(org.apache.avro.Schema schema,
                                                          List<String> fieldPaths)