/** * Checks if this grouping is like distinct, which means that all non-distinct grouping * columns behave like they were distinct - for example min and max operators. */ public boolean isDistinctLike() { ArrayList<AggregationDesc> aggregators = getAggregators(); for (AggregationDesc ad : aggregators) { if (!ad.getDistinct()) { GenericUDAFEvaluator udafEval = ad.getGenericUDAFEvaluator(); UDFType annot = AnnotationUtils.getAnnotation(udafEval.getClass(), UDFType.class); if (annot == null || !annot.distinctLike()) { return false; } } } return true; }
private boolean validateAggregationDesc(AggregationDesc aggDesc, GroupByDesc.Mode groupByMode, boolean hasKeys) { String udfName = aggDesc.getGenericUDAFName().toLowerCase(); if (!supportedAggregationUdfs.contains(udfName)) { setExpressionIssue("Aggregation Function", "UDF " + udfName + " not supported"); return false; } // The planner seems to pull this one out. if (aggDesc.getDistinct()) { setExpressionIssue("Aggregation Function", "DISTINCT not supported"); return false; } ArrayList<ExprNodeDesc> parameters = aggDesc.getParameters(); if (parameters != null && !validateExprNodeDesc(parameters, "Aggregation Function UDF " + udfName + " parameter")) { return false; } return true; }
/** * Checks if this grouping is like distinct, which means that all non-distinct grouping * columns behave like they were distinct - for example min and max operators. */ public boolean isDistinctLike() { ArrayList<AggregationDesc> aggregators = getAggregators(); for (AggregationDesc ad : aggregators) { if (!ad.getDistinct()) { GenericUDAFEvaluator udafEval = ad.getGenericUDAFEvaluator(); UDFType annot = AnnotationUtils.getAnnotation(udafEval.getClass(), UDFType.class); if (annot == null || !annot.distinctLike()) { return false; } } } return true; }
String name = names[names.length - 2]; int tag = Integer.parseInt(name.split("\\:")[1]); if (aggr.getDistinct()) { if (aggr.getDistinct()) { aggregationIsDistinct[i] = true;
String name = names[names.length - 2]; int tag = Integer.parseInt(name.split("\\:")[1]); if (aggr.getDistinct()) { if (aggr.getDistinct()) { aggregationIsDistinct[i] = true;
if (aggr.getDistinct()) { if (indexOfDist != -1 || !aggr.getGenericUDAFName().equalsIgnoreCase("count")) {
sb.append(udafName); sb.append("("); if (agg.getDistinct()) { sb.append("DISTINCT ");
sb.append(udafName); sb.append("("); if (agg.getDistinct()) { sb.append("DISTINCT ");
if (aggr.getDistinct()) { ArrayList<ExprNodeDesc> parameters = new ArrayList<ExprNodeDesc>(); ExprNodeDesc param = aggr.getParameters().get(0);
if (aggr.getDistinct()) { ArrayList<ExprNodeDesc> parameters = new ArrayList<ExprNodeDesc>(); ExprNodeDesc param = aggr.getParameters().get(0);
if (aggr.getDistinct()) {
if (aggr.getDistinct()) {
/** * Checks if this grouping is like distinct, which means that all non-distinct grouping * columns behave like they were distinct - for example min and max operators. */ public boolean isDistinctLike() { ArrayList<AggregationDesc> aggregators = getAggregators(); for (AggregationDesc ad : aggregators) { if (!ad.getDistinct()) { GenericUDAFEvaluator udafEval = ad.getGenericUDAFEvaluator(); UDFType annot = AnnotationUtils.getAnnotation(udafEval.getClass(), UDFType.class); if (annot == null || !annot.distinctLike()) { return false; } } } return true; }
String name = names[names.length - 2]; int tag = Integer.parseInt(name.split("\\:")[1]); if (aggr.getDistinct()) { if (aggr.getDistinct()) { aggregationIsDistinct[i] = true;
String name = names[names.length - 2]; int tag = Integer.parseInt(name.split("\\:")[1]); if (aggr.getDistinct()) { if (aggr.getDistinct()) { aggregationIsDistinct[i] = true;
if (aggr.getDistinct()) { ArrayList<ExprNodeDesc> parameters = new ArrayList<ExprNodeDesc>(); ExprNodeDesc param = aggr.getParameters().get(0);
if (aggr.getDistinct()) {