| Constructor and Description |
|---|
SegmentationCandidate(SegmentationCandidate segmentationCandidate) |
| 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
|
Candidate |
copy()
Clones this candidate
|
boolean |
equals(Object obj) |
boolean |
evaluateCompleteness(TimeRange timeRange,
TimeRange queriedTimeRange,
boolean failOnPartialData)
Calculates if this candidate can answer the query for given time range based on actual data registered with
the underlying candidate storages.
|
SegmentationCandidate |
explode()
Explode this candidate into another candidate.
|
Set<Integer> |
getAnswerableMeasurePhraseIndices()
Gets the index positions of answerable measure phrases in CubeQueryContext#selectPhrases
|
Collection<Candidate> |
getChildren()
Returns child candidates of this candidate if any.
|
int |
getChildrenCount()
Count of children
|
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)
|
int |
hashCode() |
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() |
coveredPhrases, decideMeasurePhrasesToAnswer, getConf, getCube, getCubeMetastoreClient, hasColumn, isColumnPresentAndValidForRange, isColumnValidForRange, isCompletelyValidForTimeRanges, isPartiallyValidForTimeRange, isPartiallyValidForTimeRanges, toQueryWriterContext, updateStorageCandidateQueriablePhraseIndicespublic SegmentationCandidate(SegmentationCandidate segmentationCandidate) throws LensException
LensExceptionpublic SegmentationCandidate explode() throws LensException
Candidateexplode in interface CandidateLensExceptionpublic 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 Collection<Candidate> getChildren()
CandidategetChildren in interface Candidatepublic int getChildrenCount()
CandidategetChildrenCount in interface Candidatepublic 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 boolean evaluateCompleteness(TimeRange timeRange, TimeRange queriedTimeRange, boolean failOnPartialData) throws LensException
CandidateCandidate.getParticipatingPartitions().evaluateCompleteness in interface CandidatetimeRange - : TimeRange to check completeness for. TimeRange consists of start time, end time and the
partition columnqueriedTimeRange - : 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 Candidate copy() throws LensException
Candidatecopy in interface CandidateLensException - propagated exceptionpublic boolean isPhraseAnswerable(org.apache.lens.cube.parse.QueriedPhraseContext phrase)
CandidateisPhraseAnswerable in interface Candidatephrase - Phrase to checkpublic Optional<Date> getColumnStartTime(String column)
CandidategetColumnStartTime in interface Candidatecolumn - column namepublic Optional<Date> getColumnEndTime(String column)
CandidategetColumnEndTime in interface Candidatecolumn - column namepublic void addAnswerableMeasurePhraseIndices(int index)
CandidateaddAnswerableMeasurePhraseIndices in interface Candidateindex - index to mark as answerable@Generated(value="lombok") public CubeQueryContext getCubeQueryContext()
CandidategetCubeQueryContext in interface Candidate@Generated(value="lombok") public Set<Integer> getAnswerableMeasurePhraseIndices()
CandidategetAnswerableMeasurePhraseIndices in interface CandidateCopyright © 2014–2018 Apache Software Foundation. All rights reserved.