Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Lens 1381 #20

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Lens 1381 #20

wants to merge 14 commits into from

Conversation

prongs
Copy link
Contributor

@prongs prongs commented Feb 8, 2017

No description provided.

Puneet Gupta,Sushil Mohanty and Lavkesh Lahngir added 2 commits December 21, 2016 17:05
@@ -39,6 +40,8 @@
private final Set<String> storageTables = new LinkedHashSet<String>();
@Getter
private final UpdatePeriod period;

//TODO union : this is never set . Do we need this ?s
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in lookahead.

Date getStartTime();

/**
* End Time for this candidate (calculated based on schema)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this is exclusive? in line with our usage of half-open ranges everywhere.

candidateSet.add(CandidateUtil.cloneStorageCandidate(sc));
continue;
} else if (CandidateUtil.isPartiallyValidForTimeRanges(sc, cubeql.getTimeRanges())) {
allCandidatesPartiallyValid.add(CandidateUtil.cloneStorageCandidate(sc));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a util method, I think a copy constructor would be better.

return candidateSet ;
}

private boolean isMeasureAnswerablebyUnionCandidate(QueriedPhraseContext msr, Candidate uc,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name is misleading because it's not always operating on union candidate. It's operating on any candidate. Secondly, the if instanceof idioms can be avoided by using polymorphism.

* @return
* @throws LensException
*/
public Set<String> getTimePartitionCols(StorageCandidate candidate, CubeMetastoreClient metastoreClient)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not static like other methods?

* @param targetAst
* @throws LensException
*/
public static void copyASTs(QueryAST sourceAst, QueryAST targetAst) throws LensException {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought: Should this method be in QueryAST class seeing as it's doing all operations on the targetAst.

Iterator<Candidate> itr = candidates.iterator();
while (itr.hasNext()) {
if (itr.next().contains(filterCandidate)) {
prunedCandidates.add(itr.next());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a bug. Calling itr.next multiple times in one iteration.

private QueryAST queryAST;
private CubeQueryContext cubeql;

public JoinCandidate(Candidate childCandidate1, Candidate childCandidate2, CubeQueryContext cubeql) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason why we are limiting joins to 2 candidates and not allowing an arbitrary number of candidates to be joined.

@hubot hubot deleted the lens-1381 branch April 28, 2017 16:49
@hubot hubot restored the lens-1381 branch April 28, 2017 21:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants