public interface TableFunction
The parameters tell Calcite the allowed parameters. Functions created from
this class are most useful when used with named arguments:
Calcite provides actual arguments as an array, with null values for arguments
which the user did not provide. That form is not helpful for this use case.
The caller converts those a map, with only the actual arguments set. The
call also provides a row schema, obtained from the Calcite
SELECT ... FROM TABLE(thisFn(foo -> "bar", answer -> 42))
EXTEND
extension. The result is an ExternalTableSpec which the caller uses
to create the Calcite form of an external table.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
TableFunction.ParameterDefn |
static class |
TableFunction.ParameterType |
| Modifier and Type | Method and Description |
|---|---|
ExternalTableSpec |
apply(String fnName,
Map<String,Object> args,
List<ColumnSpec> columns,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper) |
List<TableFunction.ParameterDefn> |
parameters() |
List<TableFunction.ParameterDefn> parameters()
ExternalTableSpec apply(String fnName, Map<String,Object> args, List<ColumnSpec> columns, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.