Skip to content

Commit

Permalink
fix merge problems
Browse files Browse the repository at this point in the history
  • Loading branch information
awildturtok committed Sep 20, 2021
1 parent 2671394 commit fae01dc
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,14 @@ private boolean hasCompleteDateContexts(List<DateContext> contexts) {
if (featurePlan.getAggregatorSize() <= 0 || outcomePlan.getAggregatorSize() <= 0) {
// Otherwise, if only features or outcomes are given check the first date context. The empty feature/outcome query
// will still return an empty result which will be merged with to a complete result.
return DateContext.Resolution.COMPLETE.equals(contexts.get(0).getSubdivisionMode());
return Resolution.COMPLETE.equals(contexts.get(0).getSubdivisionMode());
}

// We have features and outcomes check if both have complete date ranges (they should be at the beginning of the list)
return contexts.size() >= 2
&& contexts.get(0).getSubdivisionMode().equals(Resolution.COMPLETE)
&& contexts.get(1).getSubdivisionMode().equals(Resolution.COMPLETE)
&& Resolution.COMPLETE.equals(contexts.get(0).getSubdivisionMode())
&& Resolution.COMPLETE.equals(contexts.get(1).getSubdivisionMode())
&& !contexts.get(0).getFeatureGroup().equals(contexts.get(1).getFeatureGroup());
}
// Otherwise, if only features or outcomes are given check the first date context. The empty feature/outcome query
// will still return an empty result which will be merged with to a complete result.
return contexts.get(0).getSubdivisionMode().equals(Resolution.COMPLETE);
}

private static FormQueryPlan createSubQuery(ArrayConceptQueryPlan subPlan, List<DateContext> contexts, FeatureGroup featureGroup) {
Expand Down

0 comments on commit fae01dc

Please sign in to comment.