public class ConstrainedTable extends Object implements PhysicalTable
DataSourceConstraint
to a Physical table's availability.
Since a constraint is already applied, methods that accept a constraint should be considered deprecated.Constructor and Description |
---|
ConstrainedTable(ConfigPhysicalTable sourceTable,
DataSourceConstraint constraint)
Constructor.
|
ConstrainedTable(ConfigPhysicalTable sourceTable,
QueryPlanningConstraint queryPlanningConstraint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<Column,SimplifiedIntervalList> |
getAllAvailableIntervals()
Getter for all the available intervals for the corresponding columns configured on the table.
|
SimplifiedIntervalList |
getAvailableIntervals()
Return a view of the available intervals.
|
SimplifiedIntervalList |
getAvailableIntervals(DataSourceConstraint constraint)
Return a view of the available intervals for the original source table given a constraint.
|
Set<DataSourceName> |
getDataSourceNames()
Get the names of the data sources that back this physical table.
|
Set<DataSourceName> |
getDataSourceNames(DataSourceConstraint constraint)
Return the
TableName of the dataSources which back the original source table given a constraint. |
String |
getName()
The name for this table.
|
String |
getPhysicalColumnName(String logicalName)
Translate a logical name into a physical column name.
|
PhysicalTableSchema |
getSchema()
The schema for this table.
|
PhysicalTable |
getSourceTable() |
org.joda.time.DateTime |
getTableAlignment()
Get a date time that the table will align to based on grain and available intervals.
|
TableName |
getTableName()
Get the name of the table.
|
ConstrainedTable |
withConstraint(DataSourceConstraint constraint)
Create a constrained copy of the source table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumns, getTimeGrain, mapToSchemaAvailability
getDimensions
public ConstrainedTable(ConfigPhysicalTable sourceTable, DataSourceConstraint constraint)
sourceTable
- The table being constrainedconstraint
- The constraint being appliedpublic ConstrainedTable(ConfigPhysicalTable sourceTable, QueryPlanningConstraint queryPlanningConstraint)
sourceTable
- The table being constrainedqueryPlanningConstraint
- The constraint being appliedpublic PhysicalTable getSourceTable()
public SimplifiedIntervalList getAvailableIntervals()
PhysicalTable
getAvailableIntervals
in interface PhysicalTable
public Map<Column,SimplifiedIntervalList> getAllAvailableIntervals()
PhysicalTable
getAllAvailableIntervals
in interface PhysicalTable
public Set<DataSourceName> getDataSourceNames()
PhysicalTable
getDataSourceNames
in interface PhysicalTable
public String getPhysicalColumnName(String logicalName)
PhysicalTable
NOTE: This defaulting behavior WILL BE REMOVED in future releases.
The defaulting behavior shouldn't be hit for Dimensions that are serialized via the default serializer and are not properly configured with a logical-to-physical name mapping. Dimensions that are not "normal" dimensions, such as dimensions used for DimensionSpecs in queries to do mapping from fact-level dimensions to something else, should likely use their own serialization strategy so as to not hit this defaulting behavior.
getPhysicalColumnName
in interface PhysicalTable
logicalName
- Logical name to lookup in physical tablepublic PhysicalTableSchema getSchema()
Table
getSchema
in interface PhysicalTable
getSchema
in interface Table
public TableName getTableName()
PhysicalTable
getTableName
in interface PhysicalTable
public org.joda.time.DateTime getTableAlignment()
PhysicalTable
getTableAlignment
in interface PhysicalTable
public SimplifiedIntervalList getAvailableIntervals(DataSourceConstraint constraint)
getAvailableIntervals
in interface PhysicalTable
constraint
- The constraint which limits available intervalspublic Set<DataSourceName> getDataSourceNames(DataSourceConstraint constraint)
TableName
of the dataSources which back the original source table given a constraint.getDataSourceNames
in interface PhysicalTable
constraint
- A constraint which may narrow the data sources participating.public ConstrainedTable withConstraint(DataSourceConstraint constraint)
withConstraint
in interface PhysicalTable
constraint
- The dataSourceConstraint which narrows the view of the underlying availabilityCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.