public class LocalInputSourceDefn extends FormattedInputSourceDefn
LocalInputSource.BaseInputSourceDefn.AdHocTableFunction, BaseInputSourceDefn.PartialTableFunction| Modifier and Type | Field and Description |
|---|---|
protected static String |
BASE_DIR_FIELD |
static String |
BASE_DIR_PARAMETER
Base directory for file or filter operations.
|
protected static String |
FILES_FIELD |
static String |
FILES_PARAMETER |
protected static String |
FILTER_FIELD |
static String |
FILTER_PARAMETER |
static String |
TYPE_KEY |
FORMAT_PARAMETER| Constructor and Description |
|---|
LocalInputSourceDefn() |
| Modifier and Type | Method and Description |
|---|---|
protected List<TableFunction.ParameterDefn> |
adHocTableFnParameters()
Overridden by subclasses to provide the list of table function parameters for
this specific input format.
|
protected void |
auditInputSource(Map<String,Object> jsonMap)
Optional step to audit or adjust the input source properties prior to
conversion via Jackson.
|
protected void |
convertArgsToSourceMap(Map<String,Object> jsonMap,
Map<String,Object> args)
Convert SQL arguments to the corresponding "generic JSON" form in the given map.
|
protected ExternalTableSpec |
convertCompletedTable(ResolvedExternalTable table,
Map<String,Object> args,
List<ColumnSpec> columns)
Complete a partial table using the table function arguments and columns provided.
|
ExternalTableSpec |
convertTable(ResolvedExternalTable table)
Convert a complete (that is, fully-defined) table spec to an external table spec.
|
protected Class<? extends InputSource> |
inputSourceClass()
Overridden by each subclass to return the input source class to be
used for JSON conversions.
|
TableFunction |
partialTableFn(ResolvedExternalTable table)
Provide a definition for a SQL table function that completes a partial table
spec from the catalog.
|
String |
typeValue()
Type value for this format: same as the type string used in the serialized
JSON for this input source.
|
void |
validate(ResolvedExternalTable table)
Given a external table catalog spec, with the JSON input source and format
properties parsed to generic Java maps, validate that the properties are
valid prior to saving the spec into the catalog.
|
addFormatParameters, bind, convertArgsToFormat, convertPartialFormattedTable, convertTableToFormat, defineAdHocTableFunctionadHocTableFn, convertArgsToSource, convertArgsToTable, convertSource, convertTableToSource, selectPartialTableColumnspublic static final String TYPE_KEY
public static final String BASE_DIR_PARAMETER
public static final String FILTER_PARAMETER
public static final String FILES_PARAMETER
protected static final String BASE_DIR_FIELD
protected static final String FILES_FIELD
protected static final String FILTER_FIELD
public String typeValue()
InputSourceDefnprotected Class<? extends InputSource> inputSourceClass()
BaseInputSourceDefninputSourceClass in class BaseInputSourceDefnpublic void validate(ResolvedExternalTable table)
InputSourceDefnvalidate in interface InputSourceDefnvalidate in class FormattedInputSourceDefntable - a catalog table spec with the input source and input format
properties parsed into generic Java mapsprotected List<TableFunction.ParameterDefn> adHocTableFnParameters()
FormattedInputSourceDefnadHocTableFnParameters in class FormattedInputSourceDefnprotected void convertArgsToSourceMap(Map<String,Object> jsonMap, Map<String,Object> args)
BaseInputSourceDefnconvertArgsToSourceMap in class BaseInputSourceDefnpublic TableFunction partialTableFn(ResolvedExternalTable table)
InputSourceDefnInputSourceDefn.adHocTableFn().table - a catalog table spec with the input source and input format
properties parsed into generic Java mapsprotected ExternalTableSpec convertCompletedTable(ResolvedExternalTable table, Map<String,Object> args, List<ColumnSpec> columns)
BaseInputSourceDefnEXTENDS clause: the implementation should decide
if columns are required (or allowed) depending on whether the partial spec already
defines columns.convertCompletedTable in class BaseInputSourceDefntable - the partial table spec, with input source and format parsed into a
generic Java mapargs - the argument values provided in the SQL table function call. The arguments
use the Java types defined in the parameter definitions.columns - the set of columns (if any) from the SQL EXTEND clauseprotected void auditInputSource(Map<String,Object> jsonMap)
BaseInputSourceDefnjsonMap.auditInputSource in class BaseInputSourceDefnpublic ExternalTableSpec convertTable(ResolvedExternalTable table)
InputSourceDefnFROM
clause without using a table function.convertTable in interface InputSourceDefnconvertTable in class BaseInputSourceDefnCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.