| Constructor and Description |
|---|
JoinCandidate(Candidate childCandidate1,
Candidate childCandidate2,
CubeQueryContext cubeql) |
| 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
|
Set<Integer> |
decideMeasurePhrasesToAnswer(Set<Integer> measureIndices) |
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.
|
JoinCandidate |
explode()
Explode this candidate into another candidate.
|
Set<Integer> |
getAnswerableMeasurePhraseIndices()
Gets the index positions of answerable measure phrases in CubeQueryContext#selectPhrases
|
List<Candidate> |
getChildren()
Child candidates that will participate in the join
|
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 |
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, getChildrenCount, getConf, getCube, getCubeMetastoreClient, hasColumn, isColumnPresentAndValidForRange, isColumnValidForRange, isCompletelyValidForTimeRanges, isPartiallyValidForTimeRange, isPartiallyValidForTimeRanges, toQueryWriterContext, updateStorageCandidateQueriablePhraseIndicespublic JoinCandidate(Candidate childCandidate1, Candidate childCandidate2, CubeQueryContext cubeql)
public 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 - : TimeRange to check completeness for. TimeRange consists of start time, end time and the
partition columnparentTimeRange - : 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 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 void addAnswerableMeasurePhraseIndices(int index)
CandidateaddAnswerableMeasurePhraseIndices in interface Candidateindex - index to mark as answerablepublic Optional<Date> getColumnStartTime(String column)
CandidategetColumnStartTime in interface Candidatecolumn - column namepublic Optional<Date> getColumnEndTime(String column)
CandidategetColumnEndTime in interface Candidatecolumn - column namepublic 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 JoinCandidate explode() throws LensException
Candidateexplode in interface CandidateLensExceptionpublic Set<Integer> decideMeasurePhrasesToAnswer(Set<Integer> measureIndices) throws LensException
decideMeasurePhrasesToAnswer in interface CandidateLensException@Generated(value="lombok") public List<Candidate> getChildren()
getChildren in interface Candidate@Generated(value="lombok") public CubeQueryContext getCubeQueryContext()
CandidategetCubeQueryContext in interface CandidateCopyright © 2014–2018 Apache Software Foundation. All rights reserved.