From 5232660b209c5b5d1107d22eebfacedfde4bcd67 Mon Sep 17 00:00:00 2001 From: chenhao16 Date: Mon, 4 Sep 2017 19:09:42 +0800 Subject: [PATCH] remove distinct check with one param in second aggregate pharse --- fe/src/com/baidu/palo/analysis/AggregateInfo.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/fe/src/com/baidu/palo/analysis/AggregateInfo.java b/fe/src/com/baidu/palo/analysis/AggregateInfo.java index e04b24ccdae8f2..c0db99e9241210 100644 --- a/fe/src/com/baidu/palo/analysis/AggregateInfo.java +++ b/fe/src/com/baidu/palo/analysis/AggregateInfo.java @@ -528,8 +528,6 @@ private void createSecondPhaseAggInfo( // SUM(DISTINCT ) -> SUM(); // (MIN(DISTINCT ...) and MAX(DISTINCT ...) have their DISTINCT turned // off during analysis, and AVG() is changed to SUM()/COUNT()) - Preconditions.checkState( - inputExpr.getFnName().getFunction().equalsIgnoreCase("SUM")); Expr aggExprParam = new SlotRef(inputDesc.getSlots().get(origGroupingExprs.size())); aggExpr = new FunctionCallExpr(inputExpr.getFnName(), Lists.newArrayList(aggExprParam)); }