Class ElasticsearchJson.AggregationsDeserializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonDeserializer<T>
-
- com.fasterxml.jackson.databind.deser.std.StdDeserializer<ElasticsearchJson.Aggregations>
-
- org.apache.calcite.adapter.elasticsearch.ElasticsearchJson.AggregationsDeserializer
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
,java.io.Serializable
- Enclosing class:
- ElasticsearchJson
static class ElasticsearchJson.AggregationsDeserializer extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<ElasticsearchJson.Aggregations>
Allows to de-serialize nested aggregation structures.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.String>
IGNORE_TOKENS
-
Constructor Summary
Constructors Constructor Description AggregationsDeserializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ElasticsearchJson.Aggregations
deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext ctxt)
private static boolean
isMissingBucket(com.fasterxml.jackson.databind.JsonNode key)
Determines if current key is a missing field key.private static ElasticsearchJson.Aggregations
parseAggregations(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.node.ObjectNode node)
private static ElasticsearchJson.Bucket
parseBucket(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ObjectNode node)
private static ElasticsearchJson.Aggregation
parseBuckets(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ArrayNode nodes)
private static ElasticsearchJson.MultiValue
parseValue(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ObjectNode node)
-
Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer
_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, deserializeWithType, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
-
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
-
-
-
Method Detail
-
deserialize
public ElasticsearchJson.Aggregations deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws java.io.IOException
- Specified by:
deserialize
in classcom.fasterxml.jackson.databind.JsonDeserializer<ElasticsearchJson.Aggregations>
- Throws:
java.io.IOException
-
parseAggregations
private static ElasticsearchJson.Aggregations parseAggregations(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.node.ObjectNode node) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
parseValue
private static ElasticsearchJson.MultiValue parseValue(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ObjectNode node) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
parseBuckets
private static ElasticsearchJson.Aggregation parseBuckets(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ArrayNode nodes) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
isMissingBucket
private static boolean isMissingBucket(com.fasterxml.jackson.databind.JsonNode key)
Determines if current key is a missing field key. Missing key is returned when document does not have pivoting attribute (exampleGROUP BY _MAP['a.b.missing']
). It helps grouping documents which don't have a field. In relational algebra this would normally benull
.Please note that missing value is different for each type.
- Parameters:
key
- currentkey
(usually string) as returned by ES- Returns:
true
if this value
-
parseBucket
private static ElasticsearchJson.Bucket parseBucket(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ObjectNode node) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-