Class NestedPathFinder

java.lang.Object
org.apache.druid.segment.nested.NestedPathFinder

public class NestedPathFinder extends Object
  • Field Details

  • Constructor Details

    • NestedPathFinder

      public NestedPathFinder()
  • Method Details

    • find

      @Nullable public static Object find(@Nullable Object data, List<NestedPathPart> path)
      Dig through a thing to find stuff
    • findKeys

      @Nullable public static Object[] findKeys(@Nullable Object data, List<NestedPathPart> path)
      find the list of 'keys' at some path. - if the thing at a path is an object (map), return the fields - if the thing at a path is an array (list or array), return the 0 based element numbers - if the thing is a simple value, return null
    • toNormalizedJsonPath

      public static String toNormalizedJsonPath(List<NestedPathPart> paths)
    • parseJsonPath

      public static List<NestedPathPart> parseJsonPath(@Nullable String path)
      split a JSONPath path into a series of extractors to find things in stuff
    • toNormalizedJqPath

      public static String toNormalizedJqPath(List<NestedPathPart> paths)
      Given a list of part finders, convert it to a "normalized" 'jq' path format that is consistent with how StructuredDataProcessor constructs field path names
    • parseJqPath

      public static List<NestedPathPart> parseJqPath(@Nullable String path)
      split a jq path into a series of extractors to find things in stuff