Add alias names date_diff, date_sub alias to date subtraction 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/5e357fd5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/5e357fd5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/5e357fd5

Branch: refs/heads/master
Commit: 5e357fd5177222b7582688bd0e7a04ed32bb782f
Parents: 1465e11
Author: Mehant Baid <[email protected]>
Authored: Tue Jun 17 01:31:18 2014 -0700
Committer: Jacques Nadeau <[email protected]>
Committed: Tue Jun 17 16:04:14 2014 -0700

----------------------------------------------------------------------
 .../DateDateArithmeticFunctions.java                             | 2 +-
 .../DateIntervalArithmeticFunctions.java                         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5e357fd5/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java
 
b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java
index 181acf0..676df67 100644
--- 
a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java
+++ 
b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java
@@ -40,7 +40,7 @@ import org.apache.drill.exec.record.RecordBatch;
 import io.netty.buffer.ByteBuf;
 
 @SuppressWarnings("unused")
-@FunctionTemplate(names = {"date_diff", "subtract"}, scope = 
FunctionTemplate.FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL)
+@FunctionTemplate(names = {"date_diff", "subtract", "date_sub"}, scope = 
FunctionTemplate.FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL)
 public class G${type}Difference implements DrillSimpleFunc {
 
     @Param  ${type}Holder left;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5e357fd5/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
 
b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
index 634e41a..6fc78eb 100644
--- 
a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
+++ 
b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
@@ -132,7 +132,7 @@ public class ${datetype}${intervaltype}Functions {
     }
 
     @SuppressWarnings("unused")
-    @FunctionTemplate(names = {"date_sub", "subtract"}, scope = 
FunctionTemplate.FunctionScope.SIMPLE, nulls=NullHandling.NULL_IF_NULL)
+    @FunctionTemplate(names = {"date_sub", "subtract", "date_diff"}, scope = 
FunctionTemplate.FunctionScope.SIMPLE, nulls=NullHandling.NULL_IF_NULL)
     public static class ${datetype}${intervaltype}SubtractFunction implements 
DrillSimpleFunc {
     @Param ${datetype}Holder left;
     @Param ${intervaltype}Holder right;
@@ -220,7 +220,7 @@ public class ${datetype}${intervaltype}Functions {
     }
 
     @SuppressWarnings("unused")
-    @FunctionTemplate(names = {"date_sub", "subtract"}, scope = 
FunctionTemplate.FunctionScope.SIMPLE, nulls=NullHandling.NULL_IF_NULL)
+    @FunctionTemplate(names = {"date_sub", "subtract", "date_diff"}, scope = 
FunctionTemplate.FunctionScope.SIMPLE, nulls=NullHandling.NULL_IF_NULL)
     public static class ${datetype}${intervaltype}SubtractFunction implements 
DrillSimpleFunc {
     @Param ${datetype}Holder left;
     @Param ${intervaltype}Holder right;

Reply via email to