Esempio n. 1
0
 /** True if this analytic function must be evaluated in its own WindowGroup. */
 private static boolean requiresIndependentEval(AnalyticExpr analyticExpr) {
   return analyticExpr
       .getFnCall()
       .getFnName()
       .getFunction()
       .equals(AnalyticExpr.FIRST_VALUE_REWRITE);
 }
Esempio n. 2
0
 /**
  * Adds the given analytic expr and its logical slots to this window group. Assumes the
  * corresponding analyticExpr is compatible with 'this'.
  */
 public void add(
     AnalyticExpr analyticExpr,
     SlotDescriptor logicalOutputSlot,
     SlotDescriptor logicalIntermediateSlot) {
   Preconditions.checkState(isCompatible(analyticExpr));
   analyticExprs.add(analyticExpr);
   analyticFnCalls.add(analyticExpr.getFnCall());
   logicalOutputSlots.add(logicalOutputSlot);
   logicalIntermediateSlots.add(logicalIntermediateSlot);
 }
Esempio n. 3
0
 public WindowGroup(
     AnalyticExpr analyticExpr,
     SlotDescriptor logicalOutputSlot,
     SlotDescriptor logicalIntermediateSlot) {
   partitionByExprs = analyticExpr.getPartitionExprs();
   orderByElements = analyticExpr.getOrderByElements();
   window = analyticExpr.getWindow();
   analyticExprs.add(analyticExpr);
   analyticFnCalls.add(analyticExpr.getFnCall());
   logicalOutputSlots.add(logicalOutputSlot);
   logicalIntermediateSlots.add(logicalIntermediateSlot);
 }