Package org.apache.calcite.adapter.tpch
Class TpchSchema
- java.lang.Object
-
- org.apache.calcite.schema.impl.AbstractSchema
-
- org.apache.calcite.adapter.tpch.TpchSchema
-
- All Implemented Interfaces:
Schema
public class TpchSchema extends AbstractSchema
Schema that provides TPC-H tables, populated according to a particular scale factor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
TpchSchema.TpchQueryableTable<E extends io.airlift.tpch.TpchEntity>
Definition of a table in the TPC-H schema.-
Nested classes/interfaces inherited from class org.apache.calcite.schema.impl.AbstractSchema
AbstractSchema.Factory
-
Nested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
Schema.TableType
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
columnPrefix
private com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String>
columnPrefixes
private int
part
private int
partCount
private double
scaleFactor
private com.google.common.collect.ImmutableMap<java.lang.String,Table>
tableMap
-
Constructor Summary
Constructors Constructor Description TpchSchema(double scaleFactor, int part, int partCount, boolean columnPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,Table>
getTableMap()
Returns 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
-
-
-
-
Field Detail
-
scaleFactor
private final double scaleFactor
-
part
private final int part
-
partCount
private final int partCount
-
columnPrefix
private final boolean columnPrefix
-
tableMap
private final com.google.common.collect.ImmutableMap<java.lang.String,Table> tableMap
-
columnPrefixes
private final com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> columnPrefixes
-
-
Method Detail
-
getTableMap
protected java.util.Map<java.lang.String,Table> getTableMap()
Description copied from class:AbstractSchema
Returns 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:
getTableMap
in classAbstractSchema
- Returns:
- Map of tables in this schema by name
-
-