asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [20/22] asterixdb git commit: Unify runtime type exceptions by using error code and message template.
Date Tue, 01 Nov 2016 03:08:29 GMT
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java
index af2f663..3d56133 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java
@@ -23,7 +23,7 @@ import java.io.DataOutput;
 
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
@@ -31,22 +31,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class SerializableIntermediateAvgAggregateFunction extends AbstractSerializableAvgAggregateFunction {
 
     public SerializableIntermediateAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
         processPartialResults(tuple, state, start, len);
     }
 
     @Override
-    public void finish(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finishPartialResults(state, start, len, result);
     }
 
     @Override
-    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finishPartialResults(state, start, len, result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateDescriptor.java
index aa4d699..6bfbdaa 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateDescriptor.java
@@ -23,12 +23,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableIntermediateSqlAvgAggregateDescriptor
         extends AbstractSerializableAggregateFunctionDynamicDescriptor {
@@ -48,13 +48,13 @@ public class SerializableIntermediateSqlAvgAggregateDescriptor
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableIntermediateSqlAvgAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateFunction.java
index bd58214..f8449a5 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateSqlAvgAggregateFunction.java
@@ -21,7 +21,7 @@ package org.apache.asterix.runtime.aggregates.serializable.std;
 
 import java.io.DataOutput;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
@@ -29,22 +29,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class SerializableIntermediateSqlAvgAggregateFunction extends AbstractSerializableAvgAggregateFunction {
 
     public SerializableIntermediateSqlAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
         processPartialResults(tuple, state, start, len);
     }
 
     @Override
-    public void finish(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finishPartialResults(state, start, len, result);
     }
 
     @Override
-    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finishPartialResults(state, start, len, result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java
index 8fd080a..2184ea3 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java
@@ -23,12 +23,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableLocalAvgAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
 
@@ -47,13 +47,13 @@ public class SerializableLocalAvgAggregateDescriptor extends AbstractSerializabl
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableLocalAvgAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java
index aa9b385..0e7ba07 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java
@@ -23,7 +23,7 @@ import java.io.DataOutput;
 
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
@@ -31,22 +31,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class SerializableLocalAvgAggregateFunction extends AbstractSerializableAvgAggregateFunction {
 
     public SerializableLocalAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
         processDataValues(tuple, state, start, len);
     }
 
     @Override
-    public void finish(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finishPartialResults(state, start, len, result);
     }
 
     @Override
-    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finish(state, start, len, result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateDescriptor.java
index f96a053..2c213cf 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateDescriptor.java
@@ -23,12 +23,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableLocalSqlAvgAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
 
@@ -47,13 +47,13 @@ public class SerializableLocalSqlAvgAggregateDescriptor extends AbstractSerializ
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableLocalSqlAvgAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateFunction.java
index 3609050..8925c31 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlAvgAggregateFunction.java
@@ -21,7 +21,7 @@ package org.apache.asterix.runtime.aggregates.serializable.std;
 
 import java.io.DataOutput;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
@@ -29,22 +29,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class SerializableLocalSqlAvgAggregateFunction extends AbstractSerializableAvgAggregateFunction {
 
     public SerializableLocalSqlAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
         processDataValues(tuple, state, start, len);
     }
 
     @Override
-    public void finish(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finishPartialResults(state, start, len, result);
     }
 
     @Override
-    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finish(state, start, len, result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSumAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSumAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSumAggregateDescriptor.java
index 4392e6e..8ff8b53 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSumAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSqlSumAggregateDescriptor.java
@@ -22,12 +22,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableLocalSqlSumAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
 
@@ -46,13 +46,13 @@ public class SerializableLocalSqlSumAggregateDescriptor extends AbstractSerializ
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableSqlSumAggregateFunction(args, true, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
index e610077..b99c8c4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
@@ -22,7 +22,7 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
@@ -46,13 +46,13 @@ public class SerializableLocalSumAggregateDescriptor extends AbstractSerializabl
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableSumAggregateFunction(args, true, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateDescriptor.java
index ef1914a..f324141 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateDescriptor.java
@@ -22,7 +22,7 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
@@ -46,13 +46,13 @@ public class SerializableSqlAvgAggregateDescriptor extends AbstractSerializableA
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableSqlAvgAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateFunction.java
index 8b62efb..3ef7aeb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlAvgAggregateFunction.java
@@ -20,7 +20,7 @@ package org.apache.asterix.runtime.aggregates.serializable.std;
 
 import java.io.DataOutput;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
@@ -28,22 +28,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class SerializableSqlAvgAggregateFunction extends AbstractSerializableAvgAggregateFunction {
 
     public SerializableSqlAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple, byte[] state, int start, int len) throws HyracksDataException {
         processDataValues(tuple, state, start, len);
     }
 
     @Override
-    public void finish(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finish(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finishFinalResults(state, start, len, result);
     }
 
     @Override
-    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws AlgebricksException {
+    public void finishPartial(byte[] state, int start, int len, DataOutput result) throws HyracksDataException {
         finish(state, start, len, result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateDescriptor.java
index 2a5bc53..43738d3 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateDescriptor.java
@@ -22,7 +22,7 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
@@ -49,13 +49,13 @@ public class SerializableSqlCountAggregateDescriptor extends AbstractSerializabl
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableSqlCountAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateFunction.java
index ce39c5a..257735f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlCountAggregateFunction.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.runtime.aggregates.serializable.std;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 
@@ -27,7 +27,7 @@ import org.apache.hyracks.api.context.IHyracksTaskContext;
  */
 public class SerializableSqlCountAggregateFunction extends AbstractSerializableCountAggregateFunction {
     public SerializableSqlCountAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateDescriptor.java
index dec2688..9f62b28 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateDescriptor.java
@@ -22,12 +22,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableSqlSumAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
 
@@ -46,13 +46,13 @@ public class SerializableSqlSumAggregateDescriptor extends AbstractSerializableA
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableSqlSumAggregateFunction(args, false, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateFunction.java
index f34d1be..2bd1f93 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSqlSumAggregateFunction.java
@@ -23,17 +23,19 @@ import java.io.IOException;
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.asterix.runtime.exceptions.UnsupportedItemTypeException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableSqlSumAggregateFunction extends AbstractSerializableSumAggregateFunction {
     private final boolean isLocalAgg;
 
     public SerializableSqlSumAggregateFunction(IScalarEvaluatorFactory[] args, boolean isLocalAgg,
-            IHyracksTaskContext context) throws AlgebricksException {
+            IHyracksTaskContext context) throws HyracksDataException {
         super(args, context);
         this.isLocalAgg = isLocalAgg;
     }
@@ -43,12 +45,13 @@ public class SerializableSqlSumAggregateFunction extends AbstractSerializableSum
     }
 
     @Override
-    protected void processSystemNull() throws AlgebricksException {
+    protected void processSystemNull() throws HyracksDataException {
         // For global aggregates simply ignore system null here,
         // but if all input value are system null, then we should return
         // null in finish().
         if (isLocalAgg) {
-            throw new AlgebricksException("Type SYSTEM_NULL encountered in local aggregate.");
+            throw new UnsupportedItemTypeException(AsterixBuiltinFunctions.SQL_SUM,
+                    ATypeTag.SERIALIZED_SYSTEM_NULL_TYPE_TAG);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java
index 8a7cdef..d37d066 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java
@@ -22,12 +22,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableSumAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
 
@@ -46,13 +46,13 @@ public class SerializableSumAggregateDescriptor extends AbstractSerializableAggr
 
     @Override
     public ISerializedAggregateEvaluatorFactory createSerializableAggregateEvaluatorFactory(
-            final IScalarEvaluatorFactory[] args) throws AlgebricksException {
+            final IScalarEvaluatorFactory[] args) {
         return new ISerializedAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public ISerializedAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new SerializableSumAggregateFunction(args, false, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java
index db3de24..e076183 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java
@@ -23,18 +23,20 @@ import java.io.IOException;
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.asterix.runtime.exceptions.UnsupportedItemTypeException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SerializableSumAggregateFunction extends AbstractSerializableSumAggregateFunction {
     private final boolean isLocalAgg;
 
     public SerializableSumAggregateFunction(IScalarEvaluatorFactory[] args, boolean isLocalAgg,
-            IHyracksTaskContext context) throws AlgebricksException {
+            IHyracksTaskContext context) throws HyracksDataException {
         super(args, context);
         this.isLocalAgg = isLocalAgg;
     }
@@ -51,12 +53,13 @@ public class SerializableSumAggregateFunction extends AbstractSerializableSumAgg
     }
 
     @Override
-    protected void processSystemNull() throws AlgebricksException {
+    protected void processSystemNull() throws HyracksDataException {
         // For global aggregates simply ignore system null here,
         // but if all input value are system null, then we should return
         // null in finish().
         if (isLocalAgg) {
-            throw new AlgebricksException("Type SYSTEM_NULL encountered in local aggregate.");
+            throw new UnsupportedItemTypeException(AsterixBuiltinFunctions.SUM,
+                    ATypeTag.SERIALIZED_SYSTEM_NULL_TYPE_TAG);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java
index 66e1af7..a59d461 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java
@@ -36,6 +36,7 @@ import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableDouble;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
@@ -44,13 +45,14 @@ import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.runtime.evaluators.common.AccessibleByteArrayEval;
 import org.apache.asterix.runtime.evaluators.common.ClosedRecordConstructorEvalFactory.ClosedRecordConstructorEval;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+import org.apache.asterix.runtime.exceptions.IncompatibleTypeException;
+import org.apache.asterix.runtime.exceptions.UnsupportedItemTypeException;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -92,33 +94,32 @@ public abstract class AbstractAvgAggregateFunction implements IAggregateEvaluato
             .getSerializerDeserializer(BuiltinType.ANULL);
 
     public AbstractAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         eval = args[0].createScalarEvaluator(context);
-
         recType = new ARecordType(null, new String[] { "sum", "count" },
                 new IAType[] { BuiltinType.ADOUBLE, BuiltinType.AINT64 }, false);
         recordEval = new ClosedRecordConstructorEval(recType, new IScalarEvaluator[] { evalSum, evalCount });
     }
 
     @Override
-    public void init() {
+    public void init() throws HyracksDataException {
         aggType = ATypeTag.SYSTEM_NULL;
         sum = 0.0;
         count = 0;
     }
 
     @Override
-    public abstract void step(IFrameTupleReference tuple) throws AlgebricksException;
+    public abstract void step(IFrameTupleReference tuple) throws HyracksDataException;
 
     @Override
-    public abstract void finish(IPointable result) throws AlgebricksException;
+    public abstract void finish(IPointable result) throws HyracksDataException;
 
     @Override
-    public abstract void finishPartial(IPointable result) throws AlgebricksException;
+    public abstract void finishPartial(IPointable result) throws HyracksDataException;
 
     protected abstract void processNull();
 
-    protected void processDataValues(IFrameTupleReference tuple) throws AlgebricksException {
+    protected void processDataValues(IFrameTupleReference tuple) throws HyracksDataException {
         if (skipStep()) {
             return;
         }
@@ -133,8 +134,7 @@ public abstract class AbstractAvgAggregateFunction implements IAggregateEvaluato
         } else if (aggType == ATypeTag.SYSTEM_NULL) {
             aggType = typeTag;
         } else if (typeTag != ATypeTag.SYSTEM_NULL && !ATypeHierarchy.isCompatible(typeTag, aggType)) {
-            throw new AlgebricksException(
-                    "Unexpected type " + typeTag + " in aggregation input stream. Expected type " + aggType + ".");
+            throw new IncompatibleTypeException(AsterixBuiltinFunctions.AVG, data[offset], aggType.serialize());
         } else if (ATypeHierarchy.canPromote(aggType, typeTag)) {
             aggType = typeTag;
         }
@@ -171,12 +171,12 @@ public abstract class AbstractAvgAggregateFunction implements IAggregateEvaluato
                 break;
             }
             default: {
-                throw new NotImplementedException("Cannot compute AVG for values of type " + typeTag);
+                throw new UnsupportedItemTypeException(AsterixBuiltinFunctions.AVG, data[offset]);
             }
         }
     }
 
-    protected void finishPartialResults(IPointable result) throws AlgebricksException {
+    protected void finishPartialResults(IPointable result) throws HyracksDataException {
         resultStorage.reset();
         try {
             // Double check that count 0 is accounted
@@ -200,11 +200,11 @@ public abstract class AbstractAvgAggregateFunction implements IAggregateEvaluato
                 result.set(avgBytes);
             }
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
     }
 
-    protected void processPartialResults(IFrameTupleReference tuple) throws AlgebricksException {
+    protected void processPartialResults(IFrameTupleReference tuple) throws HyracksDataException {
         if (skipStep()) {
             return;
         }
@@ -234,13 +234,12 @@ public abstract class AbstractAvgAggregateFunction implements IAggregateEvaluato
                 break;
             }
             default: {
-                throw new AlgebricksException("Intermediate/global-Avg is not defined for values of type "
-                        + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serBytes[offset]));
+                throw new UnsupportedItemTypeException("intermediate/global-Avg", serBytes[offset]);
             }
         }
     }
 
-    protected void finishFinalResults(IPointable result) throws AlgebricksException {
+    protected void finishFinalResults(IPointable result) throws HyracksDataException {
         resultStorage.reset();
         try {
             if (count == 0 || aggType == ATypeTag.NULL) {
@@ -250,7 +249,7 @@ public abstract class AbstractAvgAggregateFunction implements IAggregateEvaluato
                 doubleSerde.serialize(aDouble, resultStorage.getDataOutput());
             }
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
         result.set(resultStorage);
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java
index ca44fa3..5814c73 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java
@@ -26,7 +26,7 @@ import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
@@ -52,17 +52,17 @@ public abstract class AbstractCountAggregateFunction implements IAggregateEvalua
     private ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
 
     public AbstractCountAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         eval = args[0].createScalarEvaluator(context);
     }
 
     @Override
-    public void init() {
+    public void init() throws HyracksDataException {
         cnt = 0;
     }
 
     @Override
-    public void step(IFrameTupleReference tuple) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple) throws HyracksDataException {
         eval.evaluate(tuple, inputVal);
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
                 .deserialize(inputVal.getByteArray()[inputVal.getStartOffset()]);
@@ -75,19 +75,19 @@ public abstract class AbstractCountAggregateFunction implements IAggregateEvalua
     }
 
     @Override
-    public void finish(IPointable resultPointable) throws AlgebricksException {
+    public void finish(IPointable resultPointable) throws HyracksDataException {
         resultStorage.reset();
         try {
             result.setValue(cnt);
             int64Serde.serialize(result, resultStorage.getDataOutput());
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
         resultPointable.set(resultStorage);
     }
 
     @Override
-    public void finishPartial(IPointable resultPointable) throws AlgebricksException {
+    public void finishPartial(IPointable resultPointable) throws HyracksDataException {
         finish(resultPointable);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java
index 5372cfb..1bc8efc 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java
@@ -21,11 +21,11 @@ package org.apache.asterix.runtime.aggregates.std;
 import java.io.IOException;
 
 import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
+import org.apache.asterix.runtime.exceptions.IncompatibleTypeException;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.om.types.hierachy.ITypeConvertComputer;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
@@ -51,19 +51,19 @@ public abstract class AbstractMinMaxAggregateFunction implements IAggregateEvalu
     private final boolean isMin;
 
     public AbstractMinMaxAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context, boolean isMin)
-            throws AlgebricksException {
+            throws HyracksDataException {
         eval = args[0].createScalarEvaluator(context);
         this.isMin = isMin;
     }
 
     @Override
-    public void init() {
+    public void init() throws HyracksDataException {
         aggType = ATypeTag.SYSTEM_NULL;
         tempValForCasting.reset();
     }
 
     @Override
-    public void step(IFrameTupleReference tuple) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple) throws HyracksDataException {
         if (skipStep()) {
             return;
         }
@@ -87,8 +87,7 @@ public abstract class AbstractMinMaxAggregateFunction implements IAggregateEvalu
             // Initialize min value.
             outputVal.assign(inputVal);
         } else if (typeTag != ATypeTag.SYSTEM_NULL && !ATypeHierarchy.isCompatible(typeTag, aggType)) {
-            throw new AlgebricksException(
-                    "Unexpected type " + typeTag + " in aggregation input stream. Expected type " + aggType + ".");
+            throw new IncompatibleTypeException("min/max", typeTag.serialize(), aggType.serialize());
         } else {
 
             // If a system_null is encountered locally, it would be an error; otherwise if it is seen
@@ -109,17 +108,13 @@ public abstract class AbstractMinMaxAggregateFunction implements IAggregateEvalu
                         tpc.convertType(outputVal.getByteArray(), outputVal.getStartOffset() + 1,
                                 outputVal.getLength() - 1, tempValForCasting.getDataOutput());
                     } catch (IOException e) {
-                        throw new AlgebricksException(e);
+                        throw new HyracksDataException(e);
                     }
                     outputVal.assign(tempValForCasting);
                 }
-                try {
-                    if (cmp.compare(inputVal.getByteArray(), inputVal.getStartOffset(), inputVal.getLength(),
-                            outputVal.getByteArray(), outputVal.getStartOffset(), outputVal.getLength()) < 0) {
-                        outputVal.assign(inputVal);
-                    }
-                } catch (HyracksDataException e) {
-                    throw new AlgebricksException(e);
+                if (cmp.compare(inputVal.getByteArray(), inputVal.getStartOffset(), inputVal.getLength(),
+                        outputVal.getByteArray(), outputVal.getStartOffset(), outputVal.getLength()) < 0) {
+                    outputVal.assign(inputVal);
                 }
 
             } else {
@@ -130,25 +125,17 @@ public abstract class AbstractMinMaxAggregateFunction implements IAggregateEvalu
                         tpc.convertType(inputVal.getByteArray(), inputVal.getStartOffset() + 1,
                                 inputVal.getLength() - 1, tempValForCasting.getDataOutput());
                     } catch (IOException e) {
-                        throw new AlgebricksException(e);
+                        throw new HyracksDataException(e);
                     }
-                    try {
-                        if (cmp.compare(tempValForCasting.getByteArray(), tempValForCasting.getStartOffset(),
-                                tempValForCasting.getLength(), outputVal.getByteArray(), outputVal.getStartOffset(),
-                                outputVal.getLength()) < 0) {
-                            outputVal.assign(tempValForCasting);
-                        }
-                    } catch (HyracksDataException e) {
-                        throw new AlgebricksException(e);
+                    if (cmp.compare(tempValForCasting.getByteArray(), tempValForCasting.getStartOffset(),
+                            tempValForCasting.getLength(), outputVal.getByteArray(), outputVal.getStartOffset(),
+                            outputVal.getLength()) < 0) {
+                        outputVal.assign(tempValForCasting);
                     }
                 } else {
-                    try {
-                        if (cmp.compare(inputVal.getByteArray(), inputVal.getStartOffset(), inputVal.getLength(),
-                                outputVal.getByteArray(), outputVal.getStartOffset(), outputVal.getLength()) < 0) {
-                            outputVal.assign(inputVal);
-                        }
-                    } catch (HyracksDataException e) {
-                        throw new AlgebricksException(e);
+                    if (cmp.compare(inputVal.getByteArray(), inputVal.getStartOffset(), inputVal.getLength(),
+                            outputVal.getByteArray(), outputVal.getStartOffset(), outputVal.getLength()) < 0) {
+                        outputVal.assign(inputVal);
                     }
                 }
 
@@ -157,7 +144,7 @@ public abstract class AbstractMinMaxAggregateFunction implements IAggregateEvalu
     }
 
     @Override
-    public void finish(IPointable result) throws AlgebricksException {
+    public void finish(IPointable result) throws HyracksDataException {
         resultStorage.reset();
         try {
             switch (aggType) {
@@ -177,12 +164,12 @@ public abstract class AbstractMinMaxAggregateFunction implements IAggregateEvalu
                 }
             }
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
     }
 
     @Override
-    public void finishPartial(IPointable result) throws AlgebricksException {
+    public void finishPartial(IPointable result) throws HyracksDataException {
         finish(result);
     }
 
@@ -192,7 +179,7 @@ public abstract class AbstractMinMaxAggregateFunction implements IAggregateEvalu
 
     protected abstract void processNull();
 
-    protected abstract void processSystemNull() throws AlgebricksException;
+    protected abstract void processSystemNull() throws HyracksDataException;
 
     protected abstract void finishSystemNull() throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java
index 6938255..87a11a9 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java
@@ -34,17 +34,19 @@ import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
 import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+import org.apache.asterix.runtime.exceptions.IncompatibleTypeException;
+import org.apache.asterix.runtime.exceptions.UnsupportedItemTypeException;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -66,18 +68,18 @@ public abstract class AbstractSumAggregateFunction implements IAggregateEvaluato
     protected ISerializerDeserializer serde;
 
     public AbstractSumAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         eval = args[0].createScalarEvaluator(context);
     }
 
     @Override
-    public void init() {
+    public void init() throws HyracksDataException {
         aggType = ATypeTag.SYSTEM_NULL;
         sum = 0.0;
     }
 
     @Override
-    public void step(IFrameTupleReference tuple) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple) throws HyracksDataException {
         if (skipStep()) {
             return;
         }
@@ -92,8 +94,7 @@ public abstract class AbstractSumAggregateFunction implements IAggregateEvaluato
         } else if (aggType == ATypeTag.SYSTEM_NULL) {
             aggType = typeTag;
         } else if (typeTag != ATypeTag.SYSTEM_NULL && !ATypeHierarchy.isCompatible(typeTag, aggType)) {
-            throw new AlgebricksException("Unexpected type " + typeTag
-                    + " in aggregation input stream. Expected type (or a promotable type to)" + aggType + ".");
+            throw new IncompatibleTypeException(AsterixBuiltinFunctions.SUM, typeTag.serialize(), aggType.serialize());
         }
 
         if (ATypeHierarchy.canPromote(aggType, typeTag)) {
@@ -136,14 +137,14 @@ public abstract class AbstractSumAggregateFunction implements IAggregateEvaluato
                 break;
             }
             default: {
-                throw new NotImplementedException("Cannot compute SUM for values of type " + typeTag + ".");
+                throw new UnsupportedItemTypeException(AsterixBuiltinFunctions.SUM, aggType.serialize());
             }
         }
     }
 
     @SuppressWarnings("unchecked")
     @Override
-    public void finish(IPointable result) throws AlgebricksException {
+    public void finish(IPointable result) throws HyracksDataException {
         resultStorage.reset();
         try {
             switch (aggType) {
@@ -193,17 +194,16 @@ public abstract class AbstractSumAggregateFunction implements IAggregateEvaluato
                     break;
                 }
                 default:
-                    throw new AlgebricksException(
-                            "SumAggregationFunction: incompatible type for the result (" + aggType + "). ");
+                    throw new UnsupportedItemTypeException(AsterixBuiltinFunctions.SUM, aggType.serialize());
             }
         } catch (IOException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
         result.set(resultStorage);
     }
 
     @Override
-    public void finishPartial(IPointable result) throws AlgebricksException {
+    public void finishPartial(IPointable result) throws HyracksDataException {
         finish(result);
     }
 
@@ -213,7 +213,7 @@ public abstract class AbstractSumAggregateFunction implements IAggregateEvaluato
 
     protected abstract void processNull();
 
-    protected abstract void processSystemNull() throws AlgebricksException;
+    protected abstract void processSystemNull() throws HyracksDataException;
 
     protected abstract void finishSystemNull() throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateDescriptor.java
index 2b5c9bb..e4204f1 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateDescriptor.java
@@ -23,12 +23,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class AvgAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
 
@@ -46,14 +46,13 @@ public class AvgAggregateDescriptor extends AbstractAggregateFunctionDynamicDesc
     }
 
     @Override
-    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
         return new IAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new AvgAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java
index b5fd5ed..6408e56 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java
@@ -20,7 +20,7 @@
 package org.apache.asterix.runtime.aggregates.std;
 
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -29,22 +29,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class AvgAggregateFunction extends AbstractAvgAggregateFunction {
 
     public AvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple) throws HyracksDataException {
         processDataValues(tuple);
     }
 
     @Override
-    public void finish(IPointable result) throws AlgebricksException {
+    public void finish(IPointable result) throws HyracksDataException {
         finishFinalResults(result);
     }
 
     @Override
-    public void finishPartial(IPointable result) throws AlgebricksException {
+    public void finishPartial(IPointable result) throws HyracksDataException {
         finish(result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateDescriptor.java
index f61da19..db9d1cb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateDescriptor.java
@@ -22,12 +22,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 /**
  * NULLs are also counted.
@@ -48,14 +48,12 @@ public class CountAggregateDescriptor extends AbstractAggregateFunctionDynamicDe
     }
 
     @Override
-    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
         return new IAggregateEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
-            public IAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
+            public IAggregateEvaluator createAggregateEvaluator(IHyracksTaskContext ctx) throws HyracksDataException {
                 return new CountAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateFunction.java
index 95fbca3..94b653d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/CountAggregateFunction.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.runtime.aggregates.std;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 
@@ -28,7 +28,7 @@ import org.apache.hyracks.api.context.IHyracksTaskContext;
 public class CountAggregateFunction extends AbstractCountAggregateFunction {
 
     public CountAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateDescriptor.java
index edb55dc..0131eab 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateDescriptor.java
@@ -23,12 +23,12 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class GlobalAvgAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
 
@@ -47,14 +47,13 @@ public class GlobalAvgAggregateDescriptor extends AbstractAggregateFunctionDynam
     }
 
     @Override
-    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
         return new IAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new GlobalAvgAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java
index 3555863..30a2746 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java
@@ -20,7 +20,7 @@
 package org.apache.asterix.runtime.aggregates.std;
 
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -29,22 +29,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class GlobalAvgAggregateFunction extends AbstractAvgAggregateFunction {
 
     public GlobalAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple) throws HyracksDataException {
         processPartialResults(tuple);
     }
 
     @Override
-    public void finish(IPointable result) throws AlgebricksException {
+    public void finish(IPointable result) throws HyracksDataException {
         finishFinalResults(result);
     }
 
     @Override
-    public void finishPartial(IPointable result) throws AlgebricksException {
+    public void finishPartial(IPointable result) throws HyracksDataException {
         finishPartialResults(result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateDescriptor.java
index 4fdec36..a72c300 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateDescriptor.java
@@ -23,7 +23,7 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
@@ -47,14 +47,13 @@ public class GlobalSqlAvgAggregateDescriptor extends AbstractAggregateFunctionDy
     }
 
     @Override
-    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
         return new IAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new GlobalSqlAvgAggregateFunction(args, ctx);
             }
         };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateFunction.java
index aa3d23d..893613b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalSqlAvgAggregateFunction.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.runtime.aggregates.std;
 
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -28,22 +28,22 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class GlobalSqlAvgAggregateFunction extends AbstractAvgAggregateFunction {
 
     public GlobalSqlAvgAggregateFunction(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-            throws AlgebricksException {
+            throws HyracksDataException {
         super(args, context);
     }
 
     @Override
-    public void step(IFrameTupleReference tuple) throws AlgebricksException {
+    public void step(IFrameTupleReference tuple) throws HyracksDataException {
         processPartialResults(tuple);
     }
 
     @Override
-    public void finish(IPointable result) throws AlgebricksException {
+    public void finish(IPointable result) throws HyracksDataException {
         finishFinalResults(result);
     }
 
     @Override
-    public void finishPartial(IPointable result) throws AlgebricksException {
+    public void finishPartial(IPointable result) throws HyracksDataException {
         finishPartialResults(result);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/52671a2c/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateDescriptor.java
index 31fc059..3730405 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateDescriptor.java
@@ -23,7 +23,7 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
@@ -47,14 +47,13 @@ public class IntermediateAvgAggregateDescriptor extends AbstractAggregateFunctio
     }
 
     @Override
-    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public IAggregateEvaluatorFactory createAggregateEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
         return new IAggregateEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
             @Override
             public IAggregateEvaluator createAggregateEvaluator(final IHyracksTaskContext ctx)
-                    throws AlgebricksException {
+                    throws HyracksDataException {
                 return new IntermediateAvgAggregateFunction(args, ctx);
             }
         };


Mime
View raw message