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 class
StructuredDataProcessor.ProcessedValue<T>
static class
StructuredDataProcessor.ProcessResults
Accumulates the list of literal field paths and a rough size estimation forStructuredDataProcessor
-
Constructor Summary
Constructors Modifier Constructor Description protected
StructuredDataProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static int
estimateStringSize(String value)
this is copied fromStringDimensionDictionary.estimateSizeOfValue(String)
static int
getDoubleObjectEstimateSize()
static int
getLongObjectEstimateSize()
abstract StructuredDataProcessor.ProcessedValue<?>
processArrayField(ArrayList<NestedPathPart> fieldPath, List<?> array)
Process aList
orObject
returning aStructuredDataProcessor.ProcessedValue
if 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 newNestedPathArrayElement
part.abstract StructuredDataProcessor.ProcessedValue<?>
processField(ArrayList<NestedPathPart> fieldPath, Object fieldValue)
StructuredDataProcessor.ProcessResults
processFields(Object raw)
Process some object, traversing any nested structure and returning a list of all paths which created aStructuredDataProcessor.ProcessedValue
during 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 aList
orObject
returning aStructuredDataProcessor.ProcessedValue
if 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 newNestedPathArrayElement
part.
-
processFields
public StructuredDataProcessor.ProcessResults processFields(Object raw)
Process some object, traversing any nested structure and returning a list of all paths which created aStructuredDataProcessor.ProcessedValue
during processing, represented as an ordered sequence ofNestedPathPart
. This method processes plain java objects, for eachMap
it adds aStructuredDataProcessor.MapField
to the path, forList
aStructuredDataProcessor.ArrayField
,Object
aStructuredDataProcessor.ArrayField
, and so on.StructuredDataProcessor.ArrayField
andStructuredDataProcessor.ArrayField
will 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()
-
-