public interface InputFormatDefn
InputFormat. Provides the logic to
convert from a table spec or SQL function arguments to a specific
form of InputFormat. There is one instance of this interface for each
supported InputFormat.| Modifier and Type | Method and Description |
|---|---|
InputFormat |
convertFromArgs(Map<String,Object> args,
List<ColumnSpec> columns,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
Create an input format instance from the values provided as arguments that
correspond to the defined parameters.
|
InputFormat |
convertFromTable(ResolvedExternalTable table)
Create an input format from a resolved catalog table spec.
|
List<TableFunction.ParameterDefn> |
parameters()
Obtain the parameters used to fully define an input format in a SQL function
that defines an external table from scratch.
|
String |
typeValue() |
void |
validate(ResolvedExternalTable table)
Given a resolved table that has the serialized JSON converted to a Java map,
validate the values of that map, typically by converting that map the target
input format object (after adjustments and filling in dummy columns.) THe
goal is to validate the information the user has provided in the table spec.
|
String typeValue()
format
property for SQL functions.void validate(ResolvedExternalTable table)
List<TableFunction.ParameterDefn> parameters()
InputFormat convertFromArgs(Map<String,Object> args, List<ColumnSpec> columns, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
args - the actual arguments for the defined parameterscolumns - the columns provided in SQL, typically via the `EXTEND` clause,
but perhaps from an the table spec, if the function is for
a partial tablejsonMapper - the mapper to use to perform conversionsIAE - if the arguments are not validInputFormat convertFromTable(ResolvedExternalTable table)
table - resolved form of a table spec, with the format JSON parsed into
a JSON mapIAE - if the spec is not validCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.