public abstract class FormattedInputSourceDefn extends BaseInputSourceDefn
BaseInputSourceDefn.AdHocTableFunction, BaseInputSourceDefn.PartialTableFunction| Modifier and Type | Field and Description |
|---|---|
static String |
FORMAT_PARAMETER |
| Constructor and Description |
|---|
FormattedInputSourceDefn() |
| Modifier and Type | Method and Description |
|---|---|
protected List<TableFunction.ParameterDefn> |
addFormatParameters(List<TableFunction.ParameterDefn> properties)
Add format properties to the base set, in the order of the formats,
in the order defined by the format.
|
protected abstract List<TableFunction.ParameterDefn> |
adHocTableFnParameters()
Overridden by subclasses to provide the list of table function parameters for
this specific input format.
|
void |
bind(TableDefnRegistry registry)
Gather information about the set of format definitions.
|
protected InputFormat |
convertArgsToFormat(Map<String,Object> args,
List<ColumnSpec> columns,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
Convert SQL arguments, and the column schema, to an input format, if required.
|
protected ExternalTableSpec |
convertPartialFormattedTable(ResolvedExternalTable table,
Map<String,Object> args,
List<ColumnSpec> columns,
Map<String,Object> sourceMap)
Converted a formatted external table given the table definition, function
args, columns and the merged generic JSON map representing the input source.
|
protected InputFormat |
convertTableToFormat(ResolvedExternalTable table)
Convert the format spec, if any, to an input format.
|
protected BaseInputSourceDefn.AdHocTableFunction |
defineAdHocTableFunction()
Overridden by each subclass to define the parameters needed by each
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.
|
adHocTableFn, auditInputSource, convertArgsToSource, convertArgsToSourceMap, convertArgsToTable, convertCompletedTable, convertSource, convertTable, convertTableToSource, inputSourceClass, selectPartialTableColumnsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpartialTableFn, typeValuepublic static final String FORMAT_PARAMETER
public void bind(TableDefnRegistry registry)
InputSourceDefnbind in interface InputSourceDefnbind in class BaseInputSourceDefnpublic void validate(ResolvedExternalTable table)
InputSourceDefnvalidate in interface InputSourceDefnvalidate in class BaseInputSourceDefntable - a catalog table spec with the input source and input format
properties parsed into generic Java mapsprotected BaseInputSourceDefn.AdHocTableFunction defineAdHocTableFunction()
BaseInputSourceDefndefineAdHocTableFunction in class BaseInputSourceDefnprotected abstract List<TableFunction.ParameterDefn> adHocTableFnParameters()
protected List<TableFunction.ParameterDefn> addFormatParameters(List<TableFunction.ParameterDefn> properties)
protected InputFormat convertTableToFormat(ResolvedExternalTable table)
BaseInputSourceDefnconvertTableToFormat in class BaseInputSourceDefnprotected InputFormat convertArgsToFormat(Map<String,Object> args, List<ColumnSpec> columns, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
BaseInputSourceDefnconvertArgsToFormat in class BaseInputSourceDefnprotected ExternalTableSpec convertPartialFormattedTable(ResolvedExternalTable table, Map<String,Object> args, List<ColumnSpec> columns, Map<String,Object> sourceMap)
table - the resolved external table from the catalogargs - values of arguments from an SQL table function. Here we consider
only the format arguments; input source arguments should already
have been handledcolumns - the set of columns provided by the SQL table functionsourceMap - the generic JSON map for the input source with function
parameters merged into the definition in the catalogCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.