Repository: lens Updated Branches: refs/heads/master 66ff2fd50 -> e6f1ce0e2
LENS-1459: Time union candidate creation phase is creating a combination with redundant candidates Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/e6f1ce0e Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/e6f1ce0e Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/e6f1ce0e Branch: refs/heads/master Commit: e6f1ce0e2927d84a9cd2800f7630305114af1bb4 Parents: 66ff2fd Author: Rajat Khandelwal <[email protected]> Authored: Wed Aug 16 17:47:39 2017 +0530 Committer: Rajat Khandelwal <[email protected]> Committed: Wed Aug 16 17:47:39 2017 +0530 ---------------------------------------------------------------------- .../org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lens/blob/e6f1ce0e/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java ---------------------------------------------------------------------- diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java index de30703..1cff4a4 100644 --- a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java +++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java @@ -127,6 +127,7 @@ public class CandidateCoveringSetsResolver implements ContextRewriter { // Get all covering fact sets // List<UnionCandidate> unionCoveringSet = getCombinations(new ArrayList<>(allCandidatesPartiallyValid), cubeql); List<UnionCandidate> unionCoveringSet = getCombinationTailIterative(allCandidatesPartiallyValid, cubeql); + pruneRedundantUnionCoveringSets(unionCoveringSet); // Sort the Collection based on no of elements unionCoveringSet.sort(Comparator.comparing(Candidate::getChildrenCount)); // prune candidate set which doesn't contain any common measure i @@ -154,7 +155,7 @@ public class CandidateCoveringSetsResolver implements ContextRewriter { } } } - @Deprecated + private void pruneRedundantUnionCoveringSets(List<UnionCandidate> candidates) { for (int i = 0; i < candidates.size(); i++) { UnionCandidate current = candidates.get(i);
