Skip to content

Commit

Permalink
Fixed expression resolver bug
Browse files Browse the repository at this point in the history
  • Loading branch information
prongs committed May 31, 2017
1 parent 889b1a0 commit 7ff1d59
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,13 @@ void pruneExpressions() {
}
// Remove expressions for which denormalized columns are no more reachable
esc.getDeNormCtx().pruneReferences(cubeql);
for (String table : esc.getDeNormCtx().getTableToRefCols().keySet()) {
Set<String> nonReachableFields = esc.getDeNormCtx().getNonReachableReferenceFields(table);
if (!nonReachableFields.isEmpty()) {
log.info("Removing expression {} as columns {} are not available", esc, nonReachableFields);
iterator.remove();
removedEsc.add(esc);
removed = true;
break;
}
if (esc.getDeNormCtx().getTableToRefCols().keySet().stream()
.map(esc.getDeNormCtx()::getNonReachableReferenceFields).noneMatch(Set::isEmpty)) {
log.info("Removing expression {} as all tables have non reachable fields", esc);
iterator.remove();
removedEsc.add(esc);
removed = true;
break;
}
if (removed) {
continue;
Expand Down

0 comments on commit 7ff1d59

Please sign in to comment.