Class Catalog
java.lang.Object
se.kuseman.payloadbuilder.api.catalog.Catalog
Catalog. Defines the hooking points for retrieving data, functions etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Schemaprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close catalog.getExecutionStatistics(IExecutionContext context) Return summarized execution statistics for provided context.Return registered functions for this catalogprotected TupleVectorgetFunctionsTupleVector(Schema schema) Return a functions tuple vector that can be used forgetSystemTableDataSource(IQuerySession, String, QualifiedName, DatasourceData)when functions is requested.getName()getOperatorFunction(String name) Get operator function info by namegetScalarFunction(String name) Get scalar function info by namegetScanDataSource(IQuerySession session, String catalogAlias, QualifiedName table, DatasourceData data) Create a scanIDatasourcefor provided tablegetSeekDataSource(IQuerySession session, String catalogAlias, ISeekPredicate seekPredicate, DatasourceData data) Create a seekIDatasourcefor provided predicategetSystemTableDataSource(IQuerySession session, String catalogAlias, QualifiedName table, DatasourceData data) Get system datasource for provided table.getSystemTableSchema(IQuerySession session, String catalogAlias, QualifiedName table) Return table schema for a system tablegetTableFunction(String name) Get table function info by namegetTableSchema(IQuerySession session, String catalogAlias, QualifiedName table) Deprecated.getTableSchema(IQuerySession session, String catalogAlias, QualifiedName table, List<Option> options) Return the table schema information for provided table.protected voidregisterFunction(FunctionInfo functionInfo) Register function
-
Field Details
-
SYSTEM_CATALOG_ALIAS
- See Also:
-
SYS_TABLES
- See Also:
-
SYS_TABLES_NAME
- See Also:
-
SYS_COLUMNS
- See Also:
-
SYS_COLUMNS_NAME
- See Also:
-
SYS_COLUMNS_TABLE
- See Also:
-
SYS_FUNCTIONS
- See Also:
-
SYS_FUNCTIONS_NAME
- See Also:
-
SYS_FUNCTIONS_DESCRIPTION
- See Also:
-
SYS_FUNCTIONS_TYPE
- See Also:
-
SYS_INDICES
- See Also:
-
SYS_INDICES_TABLE
- See Also:
-
SYS_INDICES_COLUMNS
- See Also:
-
SYS_FUNCTIONS_SCHEMA
-
-
Constructor Details
-
Catalog
-
-
Method Details
-
getName
-
getTableSchema
@Deprecated public TableSchema getTableSchema(IQuerySession session, String catalogAlias, QualifiedName table) Deprecated.Use#getTableSchema(IExecutionContext, String, QualifiedName, List)insteadReturn the table schema information for provided table. -
getTableSchema
public TableSchema getTableSchema(IQuerySession session, String catalogAlias, QualifiedName table, List<Option> options) Return the table schema information for provided table. -
getScanDataSource
public IDatasource getScanDataSource(IQuerySession session, String catalogAlias, QualifiedName table, DatasourceData data) Create a scanIDatasourcefor provided table -
getSeekDataSource
public IDatasource getSeekDataSource(IQuerySession session, String catalogAlias, ISeekPredicate seekPredicate, DatasourceData data) Create a seekIDatasourcefor provided predicate -
getSystemTableDataSource
public IDatasource getSystemTableDataSource(IQuerySession session, String catalogAlias, QualifiedName table, DatasourceData data) Get system datasource for provided table. This method should return a system operator for various system tables like: - tables - Return tables in catalog - Preferable to return at least one column 'name' - columns - Return columns in catalog - Preferable to return at least two columns 'table', 'name' - indices - Return indices in catalog - Preferable to return at least two columns 'table', 'columns' - functions - Return functions in catalog - Preferable to return at least two columns 'name', 'description' NOTE! It's optional to implement this method, but it's a good way to expose things that the catalog supports NOTE! It's perfectly fine to support other system tables than listed above NOTE! The provided query session is not the session used when executing the query it's provided fromIDatasource -
getSystemTableSchema
public TableSchema getSystemTableSchema(IQuerySession session, String catalogAlias, QualifiedName table) Return table schema for a system table -
getExecutionStatistics
Return summarized execution statistics for provided context. This is executed after an ANALZYE query and lets catalogs aggregate data for all it's datasources -
getFunctions
Return registered functions for this catalog -
registerFunction
Register function -
getScalarFunction
Get scalar function info by name -
getTableFunction
Get table function info by name -
getOperatorFunction
Get operator function info by name -
getFunctionsTupleVector
Return a functions tuple vector that can be used forgetSystemTableDataSource(IQuerySession, String, QualifiedName, DatasourceData)when functions is requested. -
close
public void close()Close catalog. Is called by clients to shut down to be able to close resources etc.
-
#getTableSchema(IExecutionContext, String, QualifiedName, List)instead