phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject git commit: PHOENIX-1000 Support FIRST_VALUE, LAST_VALUE, and NTH_VALUE aggregate functions. (Addendum)
Date Fri, 04 Jul 2014 06:08:47 GMT
Repository: phoenix
Updated Branches:
  refs/heads/master d23ebef21 -> a61a1a48d


PHOENIX-1000 Support FIRST_VALUE, LAST_VALUE, and NTH_VALUE aggregate functions. (Addendum)


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

Branch: refs/heads/master
Commit: a61a1a48d4cc8eaf1175664ba328be0d4d64eb24
Parents: d23ebef
Author: anoopsjohn <anoopsamjohn@gmail.com>
Authored: Fri Jul 4 11:38:01 2014 +0530
Committer: anoopsjohn <anoopsamjohn@gmail.com>
Committed: Fri Jul 4 11:38:01 2014 +0530

----------------------------------------------------------------------
 .../org/apache/phoenix/expression/ExpressionType.java     |  8 +++++---
 .../aggregator/FirstLastValueBaseClientAggregator.java    | 10 ++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a61a1a48/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
b/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
index 0986e64..30b1dbb 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/ExpressionType.java
@@ -88,6 +88,8 @@ import com.google.common.collect.Maps;
  *
  * @since 0.1
  */
+// Important : When you want to add new Types make sure to add those towards the end, not
changing the existing type's
+// ordinal
 public enum ExpressionType {
     ReverseFunction(ReverseFunction.class),
     RowKey(RowKeyColumnExpression.class),
@@ -166,14 +168,14 @@ public enum ExpressionType {
     ArrayConstructorExpression(ArrayConstructorExpression.class),
     SQLViewTypeFunction(SQLViewTypeFunction.class),
     ExternalSqlTypeIdFunction(ExternalSqlTypeIdFunction.class),
-    NthValueFunction(NthValueFunction.class),
-    FirstValueFunction(FirstValueFunction.class),
-    LastValueFunction(LastValueFunction.class),
     ConvertTimezoneFunction(ConvertTimezoneFunction.class),
     DecodeFunction(DecodeFunction.class),
     TimezoneOffsetFunction(TimezoneOffsetFunction.class),
     EncodeFunction(EncodeFunction.class),
     LpadFunction(LpadFunction.class),
+    NthValueFunction(NthValueFunction.class),
+    FirstValueFunction(FirstValueFunction.class),
+    LastValueFunction(LastValueFunction.class),
     ArrayAnyComparisonExpression(ArrayAnyComparisonExpression.class),
     ArrayAllComparisonExpression(ArrayAllComparisonExpression.class),
     InlineArrayElemRefExpression(InlineArrayElemRefExpression.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a61a1a48/phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueBaseClientAggregator.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueBaseClientAggregator.java
b/phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueBaseClientAggregator.java
index cf6b0f9..fde79ba 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueBaseClientAggregator.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/FirstLastValueBaseClientAggregator.java
@@ -19,19 +19,18 @@ package org.apache.phoenix.expression.aggregator;
 
 import java.util.Map;
 import java.util.Map.Entry;
-import org.apache.phoenix.schema.PDataType;
-import org.apache.phoenix.schema.tuple.Tuple;
-import org.apache.phoenix.util.ByteUtil;
 import java.util.Set;
 import java.util.TreeMap;
+
 import org.apache.hadoop.hbase.filter.BinaryComparator;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes.ByteArrayComparator;
+import org.apache.phoenix.schema.PDataType;
 import org.apache.phoenix.schema.SortOrder;
 import org.apache.phoenix.schema.tuple.SingleKeyValueTuple;
+import org.apache.phoenix.schema.tuple.Tuple;
+import org.apache.phoenix.util.ByteUtil;
 import org.apache.phoenix.util.FirstLastNthValueDataContainer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Base client aggregator for (FIRST|LAST|NTH)_VALUE functions
@@ -39,7 +38,6 @@ import org.slf4j.LoggerFactory;
  */
 public class FirstLastValueBaseClientAggregator extends BaseAggregator {
 
-    private static final Logger logger = LoggerFactory.getLogger(FirstLastValueBaseClientAggregator.class);
     protected boolean useOffset = false;
     protected int offset = -1;
     protected BinaryComparator topOrder = new BinaryComparator(ByteUtil.EMPTY_BYTE_ARRAY);


Mime
View raw message