Class ScalarListener
java.lang.Object
org.apache.drill.exec.store.easy.json.values.ScalarListener
- All Implemented Interfaces:
ValueListener
- Direct Known Subclasses:
BigIntListener,BinaryValueListener,BooleanListener,DateValueListener,DecimalValueListener,DoubleListener,IntervalValueListener,StrictBigIntValueListener,StrictDoubleValueListener,StrictIntValueListener,StrictStringValueListener,TimestampValueListener,TimeValueListener,UtcDateValueListener,UtcTimestampValueListener,VarCharListener
Base class for scalar field listeners
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final JsonLoaderImplprotected final ScalarWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddValueToListenerMap(String key, Object value) protected voidaddValueToListenerMap(String key, String value) Adds a field's most recent value to the column listener map.voidCalled when a parser converts a JSON structure to text rather than delivering the token directly.voidonValue(com.fasterxml.jackson.core.JsonToken token, TokenIterator tokenizer) Called for a JSON scalar token.schema()protected voidprotected voidsetNull()protected UserExceptiontypeConversionError(String jsonType)
-
Field Details
-
loader
-
writer
-
isArray
protected final boolean isArray
-
-
Constructor Details
-
ScalarListener
-
-
Method Details
-
schema
-
onValue
Description copied from interface:ValueListenerCalled for a JSON scalar token.- Specified by:
onValuein interfaceValueListener- Parameters:
token- the scalar tokentokenizer- provides access to the value of the token
-
onText
Description copied from interface:ValueListenerCalled when a parser converts a JSON structure to text rather than delivering the token directly.- Specified by:
onTextin interfaceValueListener- Parameters:
value- the string value of the parsed token or structure
-
setNull
protected void setNull() -
setArrayNull
protected void setArrayNull() -
typeConversionError
-
addValueToListenerMap
Adds a field's most recent value to the column listener map. This data is only stored if the listener column map is defined, and has keys.- Parameters:
key- The key of the listener fieldvalue- The value of to be retained
-
addValueToListenerMap
-