This is an automated email from the ASF dual-hosted git repository.
xxyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new 046eb3e KYLIN-4275 Fix avg function not working
046eb3e is described below
commit 046eb3ed35d03afafa39feed4842f6a64a8eb615
Author: Zhong, Yanghong <[email protected]>
AuthorDate: Thu Jul 2 14:51:17 2020 +0800
KYLIN-4275 Fix avg function not working
---
.../src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java
b/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java
index 5bca63b..8ec648c 100755
--- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java
+++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java
@@ -385,6 +385,9 @@ public class OLAPAggregateRel extends Aggregate implements
OLAPRel {
}
}
if (!ifGood) {
+ String expression = getAggrFuncName(aggCall);
+ FunctionDesc aggFunc =
FunctionDesc.newInstance(expression, parameter, null);
+ this.aggregations.add(aggFunc);
continue;
}
tupleExpr = getCountSumExpression(tupleExpr);