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
Modifier and TypeFieldDescriptionprotected final boolean
protected final JsonLoaderImpl
protected final ScalarWriter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addValueToListenerMap
(String key, Object value) protected void
addValueToListenerMap
(String key, String value) Adds a field's most recent value to the column listener map.void
Called when a parser converts a JSON structure to text rather than delivering the token directly.void
onValue
(com.fasterxml.jackson.core.JsonToken token, TokenIterator tokenizer) Called for a JSON scalar token.schema()
protected void
protected void
setNull()
protected UserException
typeConversionError
(String jsonType)
-
Field Details
-
loader
-
writer
-
isArray
protected final boolean isArray
-
-
Constructor Details
-
ScalarListener
-
-
Method Details
-
schema
-
onValue
Description copied from interface:ValueListener
Called for a JSON scalar token.- Specified by:
onValue
in interfaceValueListener
- Parameters:
token
- the scalar tokentokenizer
- provides access to the value of the token
-
onText
Description copied from interface:ValueListener
Called when a parser converts a JSON structure to text rather than delivering the token directly.- Specified by:
onText
in 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
-