calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject [2/2] calcite git commit: [CALCITE-1780] Add requiredOrder and requiresOver parameters to the constructor of SqlUserDefinedAggregateFunction (sunjincheng)
Date Mon, 15 May 2017 07:17:43 GMT
[CALCITE-1780] Add requiredOrder and requiresOver parameters to the constructor of SqlUserDefinedAggregateFunction
(sunjincheng)

Close apache/calcite#446


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

Branch: refs/heads/master
Commit: 7c7e932eb1dbb0d2d759303d37d0e21c8fb24c69
Parents: 32cca80
Author: sunjincheng121 <sunjincheng121@gmail.com>
Authored: Thu May 11 16:28:15 2017 +0800
Committer: Julian Hyde <jhyde@apache.org>
Committed: Sun May 14 09:54:36 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/calcite/prepare/CalciteCatalogReader.java  | 2 +-
 .../apache/calcite/sql/validate/SqlUserDefinedAggFunction.java | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/7c7e932e/core/src/main/java/org/apache/calcite/prepare/CalciteCatalogReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/prepare/CalciteCatalogReader.java b/core/src/main/java/org/apache/calcite/prepare/CalciteCatalogReader.java
index ca68904..6f834c7 100644
--- a/core/src/main/java/org/apache/calcite/prepare/CalciteCatalogReader.java
+++ b/core/src/main/java/org/apache/calcite/prepare/CalciteCatalogReader.java
@@ -330,7 +330,7 @@ public class CalciteCatalogReader implements Prepare.CatalogReader {
     } else if (function instanceof AggregateFunction) {
       return new SqlUserDefinedAggFunction(name,
           infer((AggregateFunction) function), InferTypes.explicit(argTypes),
-          typeChecker, (AggregateFunction) function);
+          typeChecker, (AggregateFunction) function, false, false);
     } else if (function instanceof TableMacro) {
       return new SqlUserDefinedTableMacro(name, ReturnTypes.CURSOR,
           InferTypes.explicit(argTypes), typeChecker, paramTypes,

http://git-wip-us.apache.org/repos/asf/calcite/blob/7c7e932e/core/src/main/java/org/apache/calcite/sql/validate/SqlUserDefinedAggFunction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/SqlUserDefinedAggFunction.java
b/core/src/main/java/org/apache/calcite/sql/validate/SqlUserDefinedAggFunction.java
index f7b19f0..da1f833 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlUserDefinedAggFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlUserDefinedAggFunction.java
@@ -43,13 +43,15 @@ import java.util.List;
 public class SqlUserDefinedAggFunction extends SqlAggFunction {
   public final AggregateFunction function;
 
+  /** Creates a SqlUserDefinedAggFunction. */
   public SqlUserDefinedAggFunction(SqlIdentifier opName,
       SqlReturnTypeInference returnTypeInference,
       SqlOperandTypeInference operandTypeInference,
-      SqlOperandTypeChecker operandTypeChecker, AggregateFunction function) {
+      SqlOperandTypeChecker operandTypeChecker, AggregateFunction function,
+      boolean requiresOrder, boolean requiresOver) {
     super(Util.last(opName.names), opName, SqlKind.OTHER_FUNCTION,
         returnTypeInference, operandTypeInference, operandTypeChecker,
-        SqlFunctionCategory.USER_DEFINED_FUNCTION, false, false);
+        SqlFunctionCategory.USER_DEFINED_FUNCTION, requiresOrder, requiresOver);
     this.function = function;
   }
 


Mime
View raw message