Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill, mail # dev - [4/4] git commit: DRILL-550: Fix NPE while using custom Drill functions


Copy link to this message
-
[4/4] git commit: DRILL-550: Fix NPE while using custom Drill functions
jacques@... 2014-04-21, 16:33
DRILL-550: Fix NPE while using custom Drill functions
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/84fa4f10
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/84fa4f10
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/84fa4f10

Branch: refs/heads/master
Commit: 84fa4f10112dc81539c9bf0dcc62c49b7810971d
Parents: 946bdb5
Author: mehant <[EMAIL PROTECTED]>
Authored: Sun Apr 20 17:39:22 2014 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Mon Apr 21 09:27:08 2014 -0700

 .../org/apache/drill/exec/planner/sql/DrillSqlAggOperator.java   | 2 +-
 .../java/org/apache/drill/exec/planner/sql/DrillSqlOperator.java | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/84fa4f10/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlAggOperator.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlAggOperator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlAggOperator.java
index f18559f..b074ba0 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlAggOperator.java
@@ -53,7 +53,7 @@ public class DrillSqlAggOperator extends SqlAggFunction {
 
  
   DrillSqlAggOperator(String name, int argCount) {
-    super(name, SqlKind.OTHER_FUNCTION, DynamicReturnType.INSTANCE, null, new Checker(argCount), SqlFunctionCategory.USER_DEFINED_FUNCTION);
+    super(name, new SqlIdentifier(name, SqlParserPos.ZERO), SqlKind.OTHER_FUNCTION, DynamicReturnType.INSTANCE, null, new Checker(argCount), SqlFunctionCategory.USER_DEFINED_FUNCTION);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/84fa4f10/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlOperator.java
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlOperator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlOperator.java
index 4531914..1f39c6e 100644
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlOperator.java
@@ -23,6 +23,8 @@ import org.eigenbase.sql.SqlCall;
 import org.eigenbase.sql.SqlFunction;
 import org.eigenbase.sql.SqlFunctionCategory;
 import org.eigenbase.sql.SqlKind;
+import org.eigenbase.sql.SqlIdentifier;
+import org.eigenbase.sql.parser.SqlParserPos;
 import org.eigenbase.sql.type.SqlTypeName;
 import org.eigenbase.sql.validate.SqlValidator;
 import org.eigenbase.sql.validate.SqlValidatorScope;
@@ -31,7 +33,7 @@ public class DrillSqlOperator extends SqlFunction {
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillSqlOperator.class);
 
   DrillSqlOperator(String name, int argCount) {
-    super(name, SqlKind.OTHER_FUNCTION, DynamicReturnType.INSTANCE, null, new Checker(argCount), SqlFunctionCategory.USER_DEFINED_FUNCTION);
+    super(new SqlIdentifier(name, SqlParserPos.ZERO), DynamicReturnType.INSTANCE, null, new Checker(argCount), null, SqlFunctionCategory.USER_DEFINED_FUNCTION);
   }
 
   @Override