public class DataSourceConstraint extends Object
Modifier | Constructor and Description |
---|---|
|
DataSourceConstraint(DataApiRequest dataApiRequest,
DruidAggregationQuery<?> templateDruidQuery)
Constructor.
|
protected |
DataSourceConstraint(DataSourceConstraint dataSourceConstraint)
Copy Constructor.
|
protected |
DataSourceConstraint(Set<Dimension> requestDimensions,
Set<Dimension> filterDimensions,
Set<Dimension> metricDimensions,
Set<String> metricNames,
ApiFilters apiFilters)
Constructor.
|
protected |
DataSourceConstraint(Set<Dimension> requestDimensions,
Set<Dimension> filterDimensions,
Set<Dimension> metricDimensions,
Set<String> metricNames,
Set<Dimension> allDimensions,
Set<String> allDimensionNames,
Set<String> allColumnNames,
ApiFilters apiFilters)
Deprecated.
"allDimensions", "allDimensionNames", and "allColumnNames" can be generated by other arguments. Use
DataSourceConstraint(Set, Set, Set, Set, ApiFilters) instead, which saves caller argument-passing
efforts. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Set<String> |
getAllColumnNames() |
Set<String> |
getAllDimensionNames() |
Set<Dimension> |
getAllDimensions() |
ApiFilters |
getApiFilters() |
Set<Dimension> |
getFilterDimensions() |
Set<Dimension> |
getMetricDimensions() |
Set<String> |
getMetricNames() |
Set<Dimension> |
getRequestDimensions() |
int |
hashCode() |
static DataSourceConstraint |
unconstrained(PhysicalTable table)
Build a constraint which should not filter away any part of a given table.
|
DataSourceConstraint |
withMetricIntersection(Set<String> metricNames)
Create a new DataSourceConstraint instance with a new subset of metric names.
|
public DataSourceConstraint(DataApiRequest dataApiRequest, DruidAggregationQuery<?> templateDruidQuery)
dataApiRequest
- Api request containing the constraints information.templateDruidQuery
- Query containing metric constraint information.protected DataSourceConstraint(@NotNull Set<Dimension> requestDimensions, @NotNull Set<Dimension> filterDimensions, @NotNull Set<Dimension> metricDimensions, @NotNull Set<String> metricNames, @NotNull ApiFilters apiFilters)
requestDimensions
- Dimensions contained in requestfilterDimensions
- Filtered dimensionsmetricDimensions
- Metric related dimensionsmetricNames
- Names of metricsapiFilters
- Map of dimension to its set of API filters@Deprecated protected DataSourceConstraint(@NotNull Set<Dimension> requestDimensions, @NotNull Set<Dimension> filterDimensions, @NotNull Set<Dimension> metricDimensions, @NotNull Set<String> metricNames, @NotNull Set<Dimension> allDimensions, @NotNull Set<String> allDimensionNames, @NotNull Set<String> allColumnNames, @NotNull ApiFilters apiFilters)
DataSourceConstraint(Set, Set, Set, Set, ApiFilters)
instead, which saves caller argument-passing
efforts.requestDimensions
- Dimensions contained in requestfilterDimensions
- Filtered dimensionsmetricDimensions
- Metric related dimensionsmetricNames
- Names of metricsallDimensions
- Set of all dimension objectsallDimensionNames
- Set of all dimension namesallColumnNames
- Set of all column namesapiFilters
- Map of dimension to its set of API filtersprotected DataSourceConstraint(DataSourceConstraint dataSourceConstraint)
dataSourceConstraint
- The data source constraint to copy frompublic ApiFilters getApiFilters()
public DataSourceConstraint withMetricIntersection(Set<String> metricNames)
The new set of metric names will be an intersection between old metric names and a user provided set of metric names
metricNames
- The set of metric names that are to be intersected with metric names in
this DataSourceConstraintpublic static DataSourceConstraint unconstrained(PhysicalTable table)
table
- The table whose dimensions and metrics are to be queriedCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.