Class DrillTable
java.lang.Object
org.apache.drill.exec.planner.logical.DrillTable
- All Implemented Interfaces:
org.apache.calcite.schema.Table,org.apache.calcite.schema.TranslatableTable
- Direct Known Subclasses:
AbstractHBaseDrillTable,CassandraDynamicTable,DrillHiveTable,DynamicDrillTable,InfoSchemaDrillTable,StaticDrillTable
public abstract class DrillTable
extends Object
implements org.apache.calcite.schema.Table, org.apache.calcite.schema.TranslatableTable
-
Constructor Summary
ConstructorsConstructorDescriptionDrillTable(String storageEngineName, StoragePlugin plugin, String userName, DrillTableSelection selection) Creates a DrillTable instance for a @{code TableType#Table} table.DrillTable(String storageEngineName, StoragePlugin plugin, org.apache.calcite.schema.Schema.TableType tableType, String userName, DrillTableSelection selection) Creates a DrillTable instance.DrillTable(String storageEngineName, StoragePlugin plugin, org.apache.calcite.schema.Schema.TableType tableType, String userName, DrillTableSelection selection, MetadataProviderManager metadataProviderManager) DrillTable(String storageEngineName, StoragePlugin plugin, DrillTableSelection selection) TODO: Same purpose as other constructor except the impersonation user is the user who is running the Drillbit process. -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.apache.calcite.schema.Schema.TableTypeReturns manager forTableMetadataProviderwhich may provide null for the case when scan wasn't created.org.apache.calcite.schema.StatisticinthashCode()booleanisRolledUp(String column) booleanrolledUpColumnValidInsideAgg(String column, org.apache.calcite.sql.SqlCall call, org.apache.calcite.sql.SqlNode parent, org.apache.calcite.config.CalciteConnectionConfig config) voidsetGroupScan(GroupScan scan) voidsetOptions(SessionOptionManager options) voidsetTableMetadataProviderManager(MetadataProviderManager metadataProviderManager) org.apache.calcite.rel.RelNodetoRel(org.apache.calcite.plan.RelOptTable.ToRelContext context, org.apache.calcite.plan.RelOptTable table) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.Table
getRowType
-
Constructor Details
-
DrillTable
public DrillTable(String storageEngineName, StoragePlugin plugin, String userName, DrillTableSelection selection) Creates a DrillTable instance for a @{code TableType#Table} table.- Parameters:
storageEngineName- StorageEngine name.plugin- Reference to StoragePlugin.userName- Whom to impersonate while reading the contents of the table.selection- Table contents (type and contents depend on type of StoragePlugin).
-
DrillTable
public DrillTable(String storageEngineName, StoragePlugin plugin, org.apache.calcite.schema.Schema.TableType tableType, String userName, DrillTableSelection selection) Creates a DrillTable instance.- Parameters:
storageEngineName- StorageEngine name.plugin- Reference to StoragePlugin.tableType- the JDBC table typeuserName- Whom to impersonate while reading the contents of the table.selection- Table contents (type and contents depend on type of StoragePlugin).
-
DrillTable
public DrillTable(String storageEngineName, StoragePlugin plugin, org.apache.calcite.schema.Schema.TableType tableType, String userName, DrillTableSelection selection, MetadataProviderManager metadataProviderManager) -
DrillTable
TODO: Same purpose as other constructor except the impersonation user is the user who is running the Drillbit process. Once we add impersonation to non-FileSystem storage plugins such as Hive, HBase etc, we can remove this constructor.
-
-
Method Details
-
setOptions
-
setGroupScan
-
setTableMetadataProviderManager
-
getGroupScan
- Throws:
IOException
-
getMetadataProviderManager
Returns manager forTableMetadataProviderwhich may provide null for the case when scan wasn't created. This method should be used only for the case when it is possible to obtainTableMetadataProviderwhen supplier returns null orTableMetadataProviderusage may be omitted.- Returns:
- supplier for
TableMetadataProvider
-
getStorageEngineConfig
-
getPlugin
-
getSelection
-
getStorageEngineName
-
getUserName
-
getStatistic
public org.apache.calcite.schema.Statistic getStatistic()- Specified by:
getStatisticin interfaceorg.apache.calcite.schema.Table
-
toRel
public org.apache.calcite.rel.RelNode toRel(org.apache.calcite.plan.RelOptTable.ToRelContext context, org.apache.calcite.plan.RelOptTable table) - Specified by:
toRelin interfaceorg.apache.calcite.schema.TranslatableTable
-
getJdbcTableType
public org.apache.calcite.schema.Schema.TableType getJdbcTableType()- Specified by:
getJdbcTableTypein interfaceorg.apache.calcite.schema.Table
-
rolledUpColumnValidInsideAgg
public boolean rolledUpColumnValidInsideAgg(String column, org.apache.calcite.sql.SqlCall call, org.apache.calcite.sql.SqlNode parent, org.apache.calcite.config.CalciteConnectionConfig config) - Specified by:
rolledUpColumnValidInsideAggin interfaceorg.apache.calcite.schema.Table
-
isRolledUp
- Specified by:
isRolledUpin interfaceorg.apache.calcite.schema.Table
-
hashCode
public int hashCode() -
equals
-