public abstract class BasePhysicalTableResolver extends Object implements PhysicalTableResolver
Constructor and Description |
---|
BasePhysicalTableResolver() |
Modifier and Type | Method and Description |
---|---|
Set<PhysicalTable> |
filter(Collection<PhysicalTable> candidateTables,
List<PhysicalTableMatcher> matchers)
Filter a list of tables through each matcher using a list of matchers sequentially.
|
Set<PhysicalTable> |
filter(Collection<PhysicalTable> candidateTables,
QueryPlanningConstraint requestConstraint)
Filter to a set of tables matching the rules of this resolver.
|
abstract BinaryOperator<PhysicalTable> |
getBetterTableOperator(QueryPlanningConstraint requestConstraint)
Create a binary operator which returns the 'better' of two physical table.
|
abstract List<PhysicalTableMatcher> |
getMatchers(QueryPlanningConstraint requestConstraint)
Create a list of matchers based on a request and query.
|
PhysicalTable |
resolve(Collection<PhysicalTable> candidateTables,
QueryPlanningConstraint requestConstraint)
Choose the best fit Physical Table from a table group.
|
public abstract List<PhysicalTableMatcher> getMatchers(QueryPlanningConstraint requestConstraint)
requestConstraint
- contains the request constraints extracted from DataApiRequest and TemplateDruidQuerypublic abstract BinaryOperator<PhysicalTable> getBetterTableOperator(QueryPlanningConstraint requestConstraint)
requestConstraint
- contains the request constraints extracted from DataApiRequest and TemplateDruidQuerypublic Set<PhysicalTable> filter(Collection<PhysicalTable> candidateTables, QueryPlanningConstraint requestConstraint) throws NoMatchFoundException
candidateTables
- The physical tables being filteredrequestConstraint
- contains the request constraints extracted from DataApiRequest and TemplateDruidQueryNoMatchFoundException
- if any of the filters reduce the filter set to emptypublic Set<PhysicalTable> filter(Collection<PhysicalTable> candidateTables, List<PhysicalTableMatcher> matchers) throws NoMatchFoundException
candidateTables
- The collection of tables to be filteredmatchers
- The matchers to apply, in orderNoMatchFoundException
- if no tables match the filterpublic PhysicalTable resolve(Collection<PhysicalTable> candidateTables, QueryPlanningConstraint requestConstraint) throws NoMatchFoundException
PhysicalTableResolver
resolve
in interface PhysicalTableResolver
candidateTables
- The tables being considered for matchrequestConstraint
- Contains the request constraints extracted from DataApiRequest and TemplateDruidQueryNoMatchFoundException
- if there is no matching physical table in the table groupCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.