phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sama...@apache.org
Subject phoenix git commit: PHOENIX-3840 Functions extending FirstLastValueBaseFunction returning NAME as null instead of actual function name ( Loknath Priyatham Teja Singamsetty)
Date Wed, 17 May 2017 19:18:54 GMT
Repository: phoenix
Updated Branches:
  refs/heads/master 2cb617f35 -> 0e652b6ec


PHOENIX-3840 Functions extending FirstLastValueBaseFunction returning NAME as null instead
of actual function name ( Loknath Priyatham Teja Singamsetty)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/0e652b6e
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/0e652b6e
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/0e652b6e

Branch: refs/heads/master
Commit: 0e652b6ecd9081ddfddc32854a08fc68684e8958
Parents: 2cb617f
Author: Samarth Jain <samarth@apache.org>
Authored: Wed May 17 12:18:02 2017 -0700
Committer: Samarth Jain <samarth@apache.org>
Committed: Wed May 17 12:18:02 2017 -0700

----------------------------------------------------------------------
 .../expression/function/FirstLastValueBaseFunction.java   | 10 ++--------
 .../phoenix/expression/function/FirstValueFunction.java   |  6 ++++++
 .../phoenix/expression/function/LastValueFunction.java    |  6 ++++++
 .../phoenix/expression/function/NthValueFunction.java     |  8 +++++++-
 4 files changed, 21 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0e652b6e/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstLastValueBaseFunction.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstLastValueBaseFunction.java
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstLastValueBaseFunction.java
index 5b2c8a1..497122e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstLastValueBaseFunction.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstLastValueBaseFunction.java
@@ -18,10 +18,11 @@
 package org.apache.phoenix.expression.function;
 
 import java.util.List;
+
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.phoenix.expression.Expression;
-import org.apache.phoenix.schema.types.PDataType;
 import org.apache.phoenix.schema.tuple.Tuple;
+import org.apache.phoenix.schema.types.PDataType;
 
 /**
  * (FIRST|LAST|NTH)_VALUE build in function interface
@@ -29,8 +30,6 @@ import org.apache.phoenix.schema.tuple.Tuple;
  */
 abstract public class FirstLastValueBaseFunction extends DelegateConstantToCountAggregateFunction
{
 
-    public static String NAME = null;
-
     public FirstLastValueBaseFunction() {
     }
 
@@ -51,11 +50,6 @@ abstract public class FirstLastValueBaseFunction extends DelegateConstantToCount
     }
 
     @Override
-    public String getName() {
-        return NAME;
-    }
-
-    @Override
     public PDataType getDataType() {
         return children.get(2).getDataType();
     }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0e652b6e/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValueFunction.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValueFunction.java
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValueFunction.java
index c19d053..bed3e7a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValueFunction.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/FirstValueFunction.java
@@ -18,6 +18,7 @@
 package org.apache.phoenix.expression.function;
 
 import java.util.List;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.expression.Expression;
 import org.apache.phoenix.expression.LiteralExpression;
@@ -69,4 +70,9 @@ public class FirstValueFunction extends FirstLastValueBaseFunction {
 
         return aggregator;
     }
+
+    @Override
+    public String getName() {
+        return NAME;
+    }
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0e652b6e/phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValueFunction.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValueFunction.java
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValueFunction.java
index ab6ebe3..fdd6898 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValueFunction.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/LastValueFunction.java
@@ -18,6 +18,7 @@
 package org.apache.phoenix.expression.function;
 
 import java.util.List;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.expression.Expression;
 import org.apache.phoenix.expression.LiteralExpression;
@@ -72,4 +73,9 @@ public class LastValueFunction extends FirstLastValueBaseFunction {
         return aggregator;
     }
 
+    @Override
+    public String getName() {
+        return NAME;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0e652b6e/phoenix-core/src/main/java/org/apache/phoenix/expression/function/NthValueFunction.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/NthValueFunction.java
b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/NthValueFunction.java
index 39a09e7..90c7748 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/expression/function/NthValueFunction.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/function/NthValueFunction.java
@@ -18,14 +18,15 @@
 package org.apache.phoenix.expression.function;
 
 import java.util.List;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.expression.Expression;
 import org.apache.phoenix.expression.LiteralExpression;
 import org.apache.phoenix.expression.aggregator.Aggregator;
 import org.apache.phoenix.expression.aggregator.FirstLastValueBaseClientAggregator;
 import org.apache.phoenix.expression.aggregator.FirstLastValueServerAggregator;
-import org.apache.phoenix.parse.NthValueAggregateParseNode;
 import org.apache.phoenix.parse.FunctionParseNode;
+import org.apache.phoenix.parse.NthValueAggregateParseNode;
 import org.apache.phoenix.schema.types.PBoolean;
 import org.apache.phoenix.schema.types.PInteger;
 
@@ -80,4 +81,9 @@ public class NthValueFunction extends FirstLastValueBaseFunction {
         return aggregator;
     }
 
+    @Override
+    public String getName() {
+        return NAME;
+    }
+
 }


Mime
View raw message