Package org.apache.druid.segment.nested
Class StructuredDataProcessor
- java.lang.Object
-
- org.apache.druid.segment.nested.StructuredDataProcessor
-
public abstract class StructuredDataProcessor extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStructuredDataProcessor.ProcessedValue<T>static classStructuredDataProcessor.ProcessResultsAccumulates the list of literal field paths and a rough size estimation forStructuredDataProcessor
-
Constructor Summary
Constructors Modifier Constructor Description protectedStructuredDataProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static intestimateStringSize(String value)this is copied fromStringDimensionDictionary.estimateSizeOfValue(String)static intgetDoubleObjectEstimateSize()static intgetLongObjectEstimateSize()abstract StructuredDataProcessor.ProcessedValue<?>processArrayField(ArrayList<NestedPathPart> fieldPath, List<?> array)Process aListorObjectreturning aStructuredDataProcessor.ProcessedValueif no further processing should be performed by theStructuredDataProcessor, else a return value of null indicates that each element of the array will be processed separately as a newNestedPathArrayElementpart.abstract StructuredDataProcessor.ProcessedValue<?>processField(ArrayList<NestedPathPart> fieldPath, Object fieldValue)StructuredDataProcessor.ProcessResultsprocessFields(Object raw)Process some object, traversing any nested structure and returning a list of all paths which created aStructuredDataProcessor.ProcessedValueduring processing, represented as an ordered sequence ofNestedPathPart.
-
-
-
Method Detail
-
processField
public abstract StructuredDataProcessor.ProcessedValue<?> processField(ArrayList<NestedPathPart> fieldPath, @Nullable Object fieldValue)
-
processArrayField
@Nullable public abstract StructuredDataProcessor.ProcessedValue<?> processArrayField(ArrayList<NestedPathPart> fieldPath, @Nullable List<?> array)
Process aListorObjectreturning aStructuredDataProcessor.ProcessedValueif no further processing should be performed by theStructuredDataProcessor, else a return value of null indicates that each element of the array will be processed separately as a newNestedPathArrayElementpart.
-
processFields
public StructuredDataProcessor.ProcessResults processFields(Object raw)
Process some object, traversing any nested structure and returning a list of all paths which created aStructuredDataProcessor.ProcessedValueduring processing, represented as an ordered sequence ofNestedPathPart. This method processes plain java objects, for eachMapit adds aStructuredDataProcessor.MapFieldto the path, forListaStructuredDataProcessor.ArrayField,ObjectaStructuredDataProcessor.ArrayField, and so on.StructuredDataProcessor.ArrayFieldandStructuredDataProcessor.ArrayFieldwill be processed byprocessArrayField(ArrayList, List)
-
estimateStringSize
public static int estimateStringSize(@Nullable String value)
this is copied fromStringDimensionDictionary.estimateSizeOfValue(String)
-
getLongObjectEstimateSize
public static int getLongObjectEstimateSize()
-
getDoubleObjectEstimateSize
public static int getDoubleObjectEstimateSize()
-
-