You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2015/09/03 00:16:13 UTC

[25/50] incubator-calcite git commit: Add RelBuilder.avg

Add RelBuilder.avg


Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/e27311ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/e27311ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/e27311ea

Branch: refs/heads/branch-release
Commit: e27311ea784bd4c8f3af354a3deebf9def0371ac
Parents: da5d5c2
Author: Julian Hyde <jh...@apache.org>
Authored: Thu Jul 23 12:21:49 2015 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Jul 23 12:21:49 2015 -0700

----------------------------------------------------------------------
 core/src/main/java/org/apache/calcite/tools/RelBuilder.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e27311ea/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/tools/RelBuilder.java b/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
index 13cf96e..79fd482 100644
--- a/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
+++ b/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
@@ -444,6 +444,11 @@ public class RelBuilder {
     return aggregateCall(SqlStdOperatorTable.SUM, distinct, alias, operand);
   }
 
+  /** Creates a call to the AVG aggregate function. */
+  public AggCall avg(boolean distinct, String alias, RexNode operand) {
+    return aggregateCall(SqlStdOperatorTable.AVG, distinct, alias, operand);
+  }
+
   /** Creates a call to the MIN aggregate function. */
   public AggCall min(String alias, RexNode operand) {
     return aggregateCall(SqlStdOperatorTable.MIN, false, alias, operand);