Class JsonLoaderOptions
java.lang.Object
org.apache.drill.exec.store.easy.json.parser.JsonStructureOptions
org.apache.drill.exec.store.easy.json.loader.JsonLoaderOptions
Extends the
JsonStructureOptions
class, which provides
JSON syntactic options, with a number of semantic options enforced
at the JSON loader level.-
Field Summary
Modifier and TypeFieldDescriptionboolean
JSON returns values as typed tokens.boolean
Drill prior to version 1.18 would read a null string array element as the string "null".boolean
Enable support for Mongo-style extended types:
{ field: { "$type": value }, ...
Type to use for a field which contains all nulls, or all empty arrays.boolean
Forces all numbers to be double, even if the first number that appears is an integer.boolean
boolean
If a field contains all nulls, all empty arrays, or the first non-empty array contains a null ([ null, ... ]
, then the default action is to read the column as JSON: literally convert the values (of any JSON complexity) to JSON string of that structure.Fields inherited from class org.apache.drill.exec.store.easy.json.parser.JsonStructureOptions
allowNanInf, enableEscapeAnyChar, skipMalformedDocument, skipMalformedRecords, skipOuterList
-
Constructor Summary
-
Method Summary
-
Field Details
-
allTextMode
public boolean allTextModeJSON returns values as typed tokens. IfallTextMode
is set, the structure parser converts all scalars (exceptnull
) to text and forwards the values to the listener as text. Implements Drill's "all-text mode" for JSON. -
readNumbersAsDouble
public boolean readNumbersAsDoubleForces all numbers to be double, even if the first number that appears is an integer. -
unionEnabled
public boolean unionEnabled -
classicArrayNulls
public boolean classicArrayNullsDrill prior to version 1.18 would read a null string array element as the string "null". Drill 1.18 and later reads the same token as a blank string. This flag forces the pre-1.18 behavior.For
{a: [null]}
- If true: --> "null"
- if false: --> ""
-
unknownsAsJson
public boolean unknownsAsJsonIf a field contains all nulls, all empty arrays, or the first non-empty array contains a null ([ null, ... ]
, then the default action is to read the column as JSON: literally convert the values (of any JSON complexity) to JSON string of that structure. Iffalse
, then uses the default type. -
nullType
Type to use for a field which contains all nulls, or all empty arrays. Also the default type for an array that starts with thenull
value, ifunknownsAsJson
isfalse
. -
enableExtendedTypes
public boolean enableExtendedTypesEnable support for Mongo-style extended types:
{ field: { "$type": value }, ... }<?code>
-
-
Constructor Details
-
JsonLoaderOptions
public JsonLoaderOptions() -
JsonLoaderOptions
-