Package org.apache.druid.segment.nested
Class StructuredDataProcessor
java.lang.Object
org.apache.druid.segment.nested.StructuredDataProcessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classAccumulates the list of literal field paths and a rough size estimation forStructuredDataProcessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intestimateStringSize(String value) this is copied fromStringDimensionDictionary.estimateSizeOfValue(String)static intstatic intabstract 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) 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.
-
Constructor Details
-
StructuredDataProcessor
protected StructuredDataProcessor()
-
-
Method Details
-
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
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
this is copied fromStringDimensionDictionary.estimateSizeOfValue(String) -
getLongObjectEstimateSize
public static int getLongObjectEstimateSize() -
getDoubleObjectEstimateSize
public static int getDoubleObjectEstimateSize()
-