Exemplo n.º 1
0
 public Set<String> getPartitionColumnsQueried() {
   Set<String> partsQueried = Sets.newHashSet();
   for (TimeRange range : getTimeRanges()) {
     partsQueried.add(range.getPartitionColumn());
   }
   return partsQueried;
 }
Exemplo n.º 2
0
 private void addRangeClauses(CandidateFact fact) throws LensException {
   if (fact != null) {
     // resolve timerange positions and replace it by corresponding where clause
     for (TimeRange range : getTimeRanges()) {
       for (Map.Entry<String, String> entry :
           fact.getRangeToStorageWhereMap().get(range).entrySet()) {
         String table = entry.getKey();
         String rangeWhere = entry.getValue();
         if (!StringUtils.isBlank(rangeWhere)) {
           ASTNode rangeAST = HQLParser.parseExpr(rangeWhere);
           range.getParent().setChild(range.getChildIndex(), rangeAST);
         }
         fact.getStorgeWhereClauseMap().put(table, getWhereTree());
       }
     }
   }
 }