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
ConstructorDescriptionDrillTable
(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 TypeMethodDescriptionboolean
org.apache.calcite.schema.Schema.TableType
Returns manager forTableMetadataProvider
which may provide null for the case when scan wasn't created.org.apache.calcite.schema.Statistic
int
hashCode()
boolean
isRolledUp
(String column) boolean
rolledUpColumnValidInsideAgg
(String column, org.apache.calcite.sql.SqlCall call, org.apache.calcite.sql.SqlNode parent, org.apache.calcite.config.CalciteConnectionConfig config) void
setGroupScan
(GroupScan scan) void
setOptions
(SessionOptionManager options) void
setTableMetadataProviderManager
(MetadataProviderManager metadataProviderManager) org.apache.calcite.rel.RelNode
toRel
(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, wait
Methods 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 forTableMetadataProvider
which 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 obtainTableMetadataProvider
when supplier returns null orTableMetadataProvider
usage may be omitted.- Returns:
- supplier for
TableMetadataProvider
-
getStorageEngineConfig
-
getPlugin
-
getSelection
-
getStorageEngineName
-
getUserName
-
getStatistic
public org.apache.calcite.schema.Statistic getStatistic()- Specified by:
getStatistic
in 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:
toRel
in interfaceorg.apache.calcite.schema.TranslatableTable
-
getJdbcTableType
public org.apache.calcite.schema.Schema.TableType getJdbcTableType()- Specified by:
getJdbcTableType
in 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:
rolledUpColumnValidInsideAgg
in interfaceorg.apache.calcite.schema.Table
-
isRolledUp
- Specified by:
isRolledUp
in interfaceorg.apache.calcite.schema.Table
-
hashCode
public int hashCode() -
equals
-