Package org.apache.hadoop.hive.ql.plan

Examples of org.apache.hadoop.hive.ql.plan.aggregationDesc


        genericUDAFEvaluator = genericUDAFEvaluators.get(entry.getKey());
        assert(genericUDAFEvaluator != null);
      }

      GenericUDAFInfo udaf = getGenericUDAFInfo(genericUDAFEvaluator, amode, aggParameters);
      aggregations.add(new aggregationDesc(aggName.toLowerCase(), udaf.genericUDAFEvaluator, udaf.convertedParameters,
          (mode != groupByDesc.Mode.FINAL && isDistinct), amode));
      String field = getColumnInternalName(groupByKeys.size() + aggregations.size() - 1);
      outputColumnNames.add(field);
      groupByOutputRowResolver.put("", value.toStringTree(),
                                    new ColumnInfo(field,
View Full Code Here


      Mode amode = groupByDescModeToUDAFMode(mode, isDistinct);

      GenericUDAFEvaluator genericUDAFEvaluator = getGenericUDAFEvaluator(aggName, aggParameters, value);
      assert(genericUDAFEvaluator != null);
      GenericUDAFInfo udaf = getGenericUDAFInfo(genericUDAFEvaluator, amode, aggParameters);
      aggregations.add(new aggregationDesc(aggName.toLowerCase(), udaf.genericUDAFEvaluator, udaf.convertedParameters,
          isDistinct, amode));
      String field = getColumnInternalName(groupByKeys.size() + aggregations.size() -1);
      outputColumnNames.add(field);
      groupByOutputRowResolver.put("",value.toStringTree(),
                                   new ColumnInfo(field,
View Full Code Here

      boolean isDistinct = value.getType() == HiveParser.TOK_FUNCTIONDI;
      Mode amode = groupByDescModeToUDAFMode(mode, isDistinct);
      GenericUDAFEvaluator genericUDAFEvaluator = genericUDAFEvaluators.get(entry.getKey());
      assert(genericUDAFEvaluator != null);
      GenericUDAFInfo udaf = getGenericUDAFInfo(genericUDAFEvaluator, amode, aggParameters);
      aggregations.add(new aggregationDesc(aggName.toLowerCase(), udaf.genericUDAFEvaluator, udaf.convertedParameters,
                                           (mode != groupByDesc.Mode.FINAL && value.getToken().getType() == HiveParser.TOK_FUNCTIONDI),
                                           amode));
      String field = getColumnInternalName(groupByKeys.size() + aggregations.size() - 1);
      outputColumnNames.add(field);
      groupByOutputRowResolver2.put("", value.toStringTree(),
View Full Code Here

      boolean isDistinct = value.getType() == HiveParser.TOK_FUNCTIONDI;
      Mode amode = groupByDescModeToUDAFMode(mode, isDistinct);
      GenericUDAFEvaluator genericUDAFEvaluator = getGenericUDAFEvaluator(aggName, aggParameters, value);
      assert(genericUDAFEvaluator != null);
      GenericUDAFInfo udaf = getGenericUDAFInfo(genericUDAFEvaluator, amode, aggParameters);
      aggregations.add(new aggregationDesc(aggName.toLowerCase(), udaf.genericUDAFEvaluator, udaf.convertedParameters,
          isDistinct, amode));
      String field = getColumnInternalName(groupByKeys.size() + aggregations.size() -1);
      outputColumnNames.add(field);
      groupByOutputRowResolver.put("",value.toStringTree(),
                                   new ColumnInfo(field,
View Full Code Here

        genericUDAFEvaluator = genericUDAFEvaluators.get(entry.getKey());
        assert(genericUDAFEvaluator != null);
      }
     
      GenericUDAFInfo udaf = getGenericUDAFInfo(genericUDAFEvaluator, amode, aggParameters);
      aggregations.add(new aggregationDesc(aggName.toLowerCase(), udaf.genericUDAFEvaluator, udaf.convertedParameters,
          (mode != groupByDesc.Mode.FINAL && isDistinct), amode));
      String field = getColumnInternalName(groupByKeys.size() + aggregations.size() - 1);
      outputColumnNames.add(field);
      groupByOutputRowResolver.put("", value.toStringTree(),
                                    new ColumnInfo(field,
View Full Code Here

      Mode amode = groupByDescModeToUDAFMode(mode, isDistinct);

      GenericUDAFEvaluator genericUDAFEvaluator = getGenericUDAFEvaluator(aggName, aggParameters, value);
      assert(genericUDAFEvaluator != null);
      GenericUDAFInfo udaf = getGenericUDAFInfo(genericUDAFEvaluator, amode, aggParameters);
      aggregations.add(new aggregationDesc(aggName.toLowerCase(), udaf.genericUDAFEvaluator, udaf.convertedParameters,
          isDistinct, amode));
      String field = getColumnInternalName(groupByKeys.size() + aggregations.size() -1);
      outputColumnNames.add(field);
      groupByOutputRowResolver.put("",value.toStringTree(),
                                   new ColumnInfo(field,
View Full Code Here

      boolean isDistinct = value.getType() == HiveParser.TOK_FUNCTIONDI;
      Mode amode = groupByDescModeToUDAFMode(mode, isDistinct);
      GenericUDAFEvaluator genericUDAFEvaluator = genericUDAFEvaluators.get(entry.getKey());
      assert(genericUDAFEvaluator != null);
      GenericUDAFInfo udaf = getGenericUDAFInfo(genericUDAFEvaluator, amode, aggParameters);
      aggregations.add(new aggregationDesc(aggName.toLowerCase(), udaf.genericUDAFEvaluator, udaf.convertedParameters,
                                           (mode != groupByDesc.Mode.FINAL && value.getToken().getType() == HiveParser.TOK_FUNCTIONDI),
                                           amode));
      String field = getColumnInternalName(groupByKeys.size() + aggregations.size() - 1);
      outputColumnNames.add(field);
      groupByOutputRowResolver2.put("", value.toStringTree(),
View Full Code Here

    }

    // init aggregationClasses 
    aggregationEvaluators = new GenericUDAFEvaluator[conf.getAggregators().size()];
    for (int i = 0; i < aggregationEvaluators.length; i++) {
      aggregationDesc agg = conf.getAggregators().get(i);
      aggregationEvaluators[i] = agg.createGenericUDAFEvaluator();
    }

    // init objectInspectors
    int totalFields = keyFields.length + aggregationEvaluators.length;
    objectInspectors = new ArrayList<ObjectInspector>(totalFields);
View Full Code Here

      }

      // init aggregationClasses 
      aggregationClasses = (Class<? extends UDAF>[]) new Class[conf.getAggregators().size()];
      for (int i = 0; i < conf.getAggregators().size(); i++) {
        aggregationDesc agg = conf.getAggregators().get(i);
        aggregationClasses[i] = agg.getAggregationClass();
      }

      // init aggregations, aggregationsAggregateMethods,
      // aggregationsEvaluateMethods
      aggregationsAggregateMethods = new Method[aggregationClasses.length];
View Full Code Here

    }

    // init aggregationClasses 
    aggregationEvaluators = new GenericUDAFEvaluator[conf.getAggregators().size()];
    for (int i = 0; i < aggregationEvaluators.length; i++) {
      aggregationDesc agg = conf.getAggregators().get(i);
      aggregationEvaluators[i] = agg.createGenericUDAFEvaluator();
    }

    // init objectInspectors
    int totalFields = keyFields.length + aggregationEvaluators.length;
    objectInspectors = new ArrayList<ObjectInspector>(totalFields);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.plan.aggregationDesc

Copyright © 2018 www.massapicom. 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.