| Modifier and Type | Method and Description |
|---|---|
void |
addAnswerableMeasurePhraseIndices(int index)
Add `index` as answerable index in a pre-decided list of queried phrases.
|
boolean |
contains(Candidate candidate)
Returns true if this candidate contains the given candidate
|
boolean |
evaluateCompleteness(TimeRange timeRange,
TimeRange parentTimeRange,
boolean failOnPartialData)
Calculates if this candidate can answer the query for given time range based on actual data registered with
the underlying candidate storages.
|
UnionCandidate |
explode()
Explode this candidate into another candidate.
|
Set<Integer> |
getAnswerableMeasurePhraseIndices()
Gets the index positions of answerable measure phrases in CubeQueryContext#selectPhrases
|
List<Candidate> |
getChildren()
List of child candidates that will be union-ed
|
Optional<Date> |
getColumnEndTime(String column)
This method should give end time of a column, if there's any.
|
Collection<String> |
getColumns()
Returns all the fact columns
|
Optional<Date> |
getColumnStartTime(String column)
This method should give start time of a column, if there's any.
|
OptionalDouble |
getCost() |
CubeQueryContext |
getCubeQueryContext()
A candidate always works along with its cube query context.
|
Date |
getEndTime()
End Time for this candidate (calculated based on schema)
|
Set<FactPartition> |
getParticipatingPartitions()
Returns the set of fact partitions that will participate in this candidate.
|
Date |
getStartTime()
Start Time for this candidate (calculated based on schema)
|
boolean |
isColumnValidForRange(String column)
Utility method for checking column time range validity.
|
boolean |
isDimAttributeEvaluable(String dim)
Checks whether a dim attribute is evaluable by this candidate
|
boolean |
isExpressionEvaluable(org.apache.lens.cube.parse.ExpressionResolver.ExpressionContext expr)
Checks whether an expression is evaluable by this candidate
1.
|
boolean |
isExpressionEvaluable(String expr)
Checks whether an expression is evaluable by this candidate
1.
|
boolean |
isPhraseAnswerable(org.apache.lens.cube.parse.QueriedPhraseContext phrase)
Checks whether the given queries phrase is evaluable by this candidate
|
boolean |
isTimeRangeCoverable(TimeRange timeRange)
Is time range coverable based on start and end times configured in schema for the composing storage candidates
and valid update periods.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitcopy, coveredPhrases, decideMeasurePhrasesToAnswer, getChildrenCount, getConf, getCube, getCubeMetastoreClient, hasColumn, isColumnPresentAndValidForRange, isCompletelyValidForTimeRanges, isPartiallyValidForTimeRange, isPartiallyValidForTimeRanges, toQueryWriterContext, updateStorageCandidateQueriablePhraseIndicespublic Set<Integer> getAnswerableMeasurePhraseIndices()
CandidategetAnswerableMeasurePhraseIndices in interface Candidatepublic boolean isPhraseAnswerable(org.apache.lens.cube.parse.QueriedPhraseContext phrase)
throws LensException
CandidateisPhraseAnswerable in interface Candidatephrase - Phrase to checkLensException - propagated exceptionpublic boolean isTimeRangeCoverable(TimeRange timeRange) throws LensException
CandidateCandidate.evaluateCompleteness(TimeRange, TimeRange, boolean) .
isTimeRangeCoverable checks the the possibility of covering time range from schema perspective by using valid
storages/update periods while evaluateCompleteness checks if a time range can be covered based on
registered partitions. So isTimeRangeCoverable = false implies evaluateCompleteness = false but vice versa is
not true.isTimeRangeCoverable in interface CandidatetimeRange - The time range to checkLensException - propagated exceptionspublic void addAnswerableMeasurePhraseIndices(int index)
CandidateaddAnswerableMeasurePhraseIndices in interface Candidateindex - index to mark as answerablepublic boolean isColumnValidForRange(String column)
CandidateisColumnValidForRange in interface Candidatecolumn - column to checkpublic Optional<Date> getColumnStartTime(String column)
CandidategetColumnStartTime in interface Candidatecolumn - column namepublic Optional<Date> getColumnEndTime(String column)
CandidategetColumnEndTime in interface Candidatecolumn - column namepublic Collection<String> getColumns()
CandidategetColumns in interface Candidatepublic Date getStartTime()
CandidategetStartTime in interface Candidatepublic Date getEndTime()
CandidategetEndTime in interface Candidatepublic OptionalDouble getCost()
public boolean contains(Candidate candidate)
Candidatepublic boolean evaluateCompleteness(TimeRange timeRange, TimeRange parentTimeRange, boolean failOnPartialData) throws LensException
CandidateCandidate.getParticipatingPartitions().evaluateCompleteness in interface CandidatetimeRange - parentTimeRange - : User quried timerangefailOnPartialData - : fail fast if the candidate can answer the query only partiallyLensExceptionpublic Set<FactPartition> getParticipatingPartitions()
CandidateCandidate.evaluateCompleteness(TimeRange, TimeRange, boolean)getParticipatingPartitions in interface Candidatepublic boolean isExpressionEvaluable(org.apache.lens.cube.parse.ExpressionResolver.ExpressionContext expr)
CandidateisExpressionEvaluable in interface Candidateexpr - Expression to be evaluated for Candidatepublic boolean isExpressionEvaluable(String expr)
CandidateisExpressionEvaluable in interface Candidateexpr - Expression to be evaluated for Candidatepublic boolean isDimAttributeEvaluable(String dim) throws LensException
CandidateisDimAttributeEvaluable in interface Candidatedim - dim attributeLensException - propageted exceptionpublic UnionCandidate explode() throws LensException
Candidateexplode in interface CandidateLensException@Generated(value="lombok") public CubeQueryContext getCubeQueryContext()
CandidategetCubeQueryContext in interface Candidate@Generated(value="lombok") public List<Candidate> getChildren()
getChildren in interface CandidateCopyright © 2014–2018 Apache Software Foundation. All rights reserved.