Examples of AggregateOperator


Examples of plan_runner.operators.AggregateOperator

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);

          // clearing
          agg.clearStorage();

          _semAgg.release();
        }
      }
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);

          // clearing
          agg.clearStorage();

          _semAgg.release();
        }
      }
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

          try {
            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }
          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

          try {
            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }
          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, _conf), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }

          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          if (tuples != null) {
            final String columnDelimiter = MyUtilities.getColumnDelimiter(getConf());
            for (String tuple : tuples) {
              tuple = tuple.replaceAll(" = ", columnDelimiter);
              tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
            }
          }

          // clearing
          agg.clearStorage();

          _semAgg.release();
        }
      }
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

        .getStorage()));
  }

  private static AggregateOperator createOverallAgg(AggregateOperator lastAgg, Map map) {
    final TypeConversion wrapper = lastAgg.getType();
    AggregateOperator overallAgg;

    ColumnReference cr;
    if (lastAgg.hasGroupBy())
      cr = new ColumnReference(wrapper, 1);
    else
      cr = new ColumnReference(wrapper, 0);

    if (lastAgg instanceof AggregateAvgOperator)
      overallAgg = new AggregateAvgOperator(cr, map);
    else
      overallAgg = new AggregateSumOperator(cr, map);

    if (lastAgg.hasGroupBy())
      overallAgg.setGroupByColumns(Arrays.asList(0));

    return overallAgg;
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

          try {
            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }
          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

        }
        List<AggregateOperator> aggOps = selectVisitor.getAggOps();
        List<ValueExpression> groupByVEs = selectVisitor.getGroupByVEs();
       
        //expected
        AggregateOperator agg = new AggregateSumOperator(
                new ColumnReference(_dblConv, 3, "LINEITEM.EXTENDEDPRICE * (1.0 - LINEITEM.DISCOUNT)"),
                _map);
        List<AggregateOperator> expAggOps = Arrays.asList(agg);
        List<ColumnReference> expGroupByVEs = Arrays.asList(new ColumnReference(_sc, 0, "N1.NAME"),
                                                        new ColumnReference(_sc, 1, "N2.NAME"),
View Full Code Here

Examples of plan_runner.operators.AggregateOperator

        _doubleConv, 1.0), new ColumnReference(_doubleConv, 2));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        1), substract);

    final AggregateOperator aggOp = new AggregateAvgOperator(product, conf)
        .setGroupByColumns(Arrays.asList(0));
    new OperatorComponent(R_N_S_L_C_Ojoin, "FINAL_RESULT", _queryPlan).addOperator(aggOp);

    // -------------------------------------------------------------------------------------
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.