Class ElasticsearchSchema
java.lang.Object
org.apache.calcite.schema.impl.AbstractSchema
org.apache.calcite.adapter.elasticsearch.ElasticsearchSchema
- All Implemented Interfaces:
Schema
Each table in the schema is an ELASTICSEARCH index.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.schema.impl.AbstractSchema
AbstractSchema.FactoryNested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
Schema.TableType -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSchema(org.elasticsearch.client.RestClient client, com.fasterxml.jackson.databind.ObjectMapper mapper, @Nullable String index) Allows schema to be instantiated from existing elastic search client. -
Method Summary
Modifier and TypeMethodDescriptionReturns a map of tables in this schema by name.Methods inherited from class org.apache.calcite.schema.impl.AbstractSchema
getExpression, getFunctionMultimap, getFunctionNames, getFunctions, getSubSchema, getSubSchemaMap, getSubSchemaNames, getTable, getTableNames, getType, getTypeMap, getTypeNames, isMutable, snapshot, subSchemas, tables
-
Constructor Details
-
ElasticsearchSchema
public ElasticsearchSchema(org.elasticsearch.client.RestClient client, com.fasterxml.jackson.databind.ObjectMapper mapper, @Nullable String index) Allows schema to be instantiated from existing elastic search client.- Parameters:
client- existing client instancemapper- mapper for JSON (de)serializationindex- name of ES index
-
-
Method Details
-
getTableMap
Description copied from class:AbstractSchemaReturns a map of tables in this schema by name.The implementations of
AbstractSchema.getTableNames()andAbstractSchema.getTable(String)depend on this map. The default implementation of this method returns the empty map. Override this method to change their behavior.- Overrides:
getTableMapin classAbstractSchema- Returns:
- Map of tables in this schema by name
-