if (countThisRow && isWindowingDistinct()) { if (((CountAgg) agg).uniqueObjects == null) { ((CountAgg) agg).uniqueObjects = new HashSet<ObjectInspectorObject>();
if (countThisRow && isWindowingDistinct()) { HashSet<ObjectInspectorObject> uniqueObjs = ((CountAgg) agg).uniqueObjects; ObjectInspectorObject obj = new ObjectInspectorObject(
@Override public void merge(AggregationBuffer agg, Object partial) throws HiveException { if (partial != null) { CountAgg countAgg = (CountAgg) agg; if (isWindowingDistinct()) { throw new HiveException("Distinct windowing UDAF doesn't support merge and terminatePartial"); } else { long p = partialCountAggOI.get(partial); countAgg.value += p; } } }
@Override public Object terminatePartial(AggregationBuffer agg) throws HiveException { if (isWindowingDistinct()) { throw new HiveException("Distinct windowing UDAF doesn't support merge and terminatePartial"); } else { return terminate(agg); } } }
@Override public void merge(AggregationBuffer agg, Object partial) throws HiveException { if (partial != null) { CountAgg countAgg = (CountAgg) agg; if (isWindowingDistinct()) { throw new HiveException("Distinct windowing UDAF doesn't support merge and terminatePartial"); } else { long p = partialCountAggOI.get(partial); countAgg.value += p; } } }
@Override public Object terminatePartial(AggregationBuffer agg) throws HiveException { if (isWindowingDistinct()) { throw new HiveException("Distinct windowing UDAF doesn't support merge and terminatePartial"); } else { return terminate(agg); } } }