Beispiel #1
0
 /**
  * Materializes the slots in sortTupleDesc_ referenced in the ordering exprs. Materializes the
  * slots referenced by the corresponding sortTupleSlotExpr after applying the 'smap'.
  */
 public void materializeRequiredSlots(Analyzer analyzer, ExprSubstitutionMap smap)
     throws InternalException {
   Preconditions.checkNotNull(sortTupleDesc_);
   Preconditions.checkNotNull(sortTupleSlotExprs_);
   Preconditions.checkState(sortTupleDesc_.getIsMaterialized());
   analyzer.materializeSlots(orderingExprs_);
   List<SlotDescriptor> sortTupleSlotDescs = sortTupleDesc_.getSlots();
   List<Expr> materializedExprs = Lists.newArrayList();
   for (int i = 0; i < sortTupleSlotDescs.size(); ++i) {
     if (sortTupleSlotDescs.get(i).isMaterialized()) {
       materializedExprs.add(sortTupleSlotExprs_.get(i));
     }
   }
   List<Expr> substMaterializedExprs = Expr.substituteList(materializedExprs, smap, analyzer);
   analyzer.materializeSlots(substMaterializedExprs);
 }