asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Clean up exceptions in runtime functions.
Date Thu, 08 Jun 2017 23:21:18 GMT
Yingyi Bu has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1814

Change subject: Clean up exceptions in runtime functions.
......................................................................

Clean up exceptions in runtime functions.

Change-Id: Ie08d6de31d9e928e888137680d9c7af5d66b85ae
---
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
M asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
M asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AOrderedListBinaryTokenizer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AUnorderedListBinaryTokenizer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AUnorderedListSerializerDeserializer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AListPointable.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/NonTaggedFormatUtil.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractAsterixListIterator.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ListAccessor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/OrderedListIterator.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardPrefixEvaluator.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/UnorderedListIterator.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AnyCollectionMemberDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePolygonDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/GetItemDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SimilarityDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringConcatDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringJoinDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByIndexEvalFactory.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByNameEvalFactory.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessNestedEvalFactory.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldValueEvalFactory.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/FlushDatasetOperatorDescriptor.java
D asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/NoTupleSourceRuntimeFactory.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/ScanCollectionDescriptor.java
M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/SubsetCollectionDescriptor.java
30 files changed, 280 insertions(+), 432 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/14/1814/1

diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
index df647d5..912ac37 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
@@ -62,6 +62,7 @@
     public static final int TYPE_CONVERT_INTEGER_SOURCE = 19;
     public static final int TYPE_CONVERT_INTEGER_TARGET = 20;
     public static final int TYPE_CONVERT_OUT_OF_BOUND = 21;
+    public static final int FIELD_SHOULD_BE_TYPED = 22;
     public static final int INSTANTIATION_ERROR = 100;
 
     // Compilation errors
diff --git a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
index 7204e34..9efb6b8 100644
--- a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
+++ b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
@@ -55,6 +55,7 @@
 19 = Can't convert integer types. The source type should be one of %1$s.
 20 = Can't convert integer types. The target type should be one of %1$s.
 21 = Source value %1$s is out of range that %2$s can hold - %2$s.MAX_VALUE: %3$s, %2$s.MIN_VALUE: %4$s
+22 = The accessed field is untyped, but should be typed
 100 = Unable to instantiate class %1$s
 
 # Compile-time check errors
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AOrderedListBinaryTokenizer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AOrderedListBinaryTokenizer.java
index 90af41b..c644bbe 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AOrderedListBinaryTokenizer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AOrderedListBinaryTokenizer.java
@@ -18,11 +18,11 @@
  */
 package org.apache.asterix.dataflow.data.common;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.utils.NonTaggedFormatUtil;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.storage.am.lsm.invertedindex.tokenizers.IBinaryTokenizer;
 import org.apache.hyracks.storage.am.lsm.invertedindex.tokenizers.IToken;
 import org.apache.hyracks.storage.am.lsm.invertedindex.tokenizers.ITokenFactory;
@@ -64,7 +64,7 @@
             length = NonTaggedFormatUtil.getFieldValueLength(data, itemOffset, typeTag, false);
             // Last param is a hack to pass the type tag.
             token.reset(data, itemOffset, itemOffset + length, length, data[start + 1]);
-        } catch (AsterixException e) {
+        } catch (HyracksDataException e) {
             throw new IllegalStateException(e);
         }
         itemIndex++;
@@ -79,7 +79,7 @@
         this.itemIndex = 0;
     }
 
-    protected int getItemOffset(byte[] data, int start, int itemIndex) throws AsterixException {
+    protected int getItemOffset(byte[] data, int start, int itemIndex) throws HyracksDataException {
         return AOrderedListSerializerDeserializer.getItemOffset(data, start, itemIndex);
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AUnorderedListBinaryTokenizer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AUnorderedListBinaryTokenizer.java
index b90e87f..6926713 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AUnorderedListBinaryTokenizer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AUnorderedListBinaryTokenizer.java
@@ -18,8 +18,8 @@
  */
 package org.apache.asterix.dataflow.data.common;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AUnorderedListSerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.storage.am.lsm.invertedindex.tokenizers.ITokenFactory;
 
 public class AUnorderedListBinaryTokenizer extends AOrderedListBinaryTokenizer {
@@ -29,7 +29,7 @@
     }
 
     @Override
-    protected int getItemOffset(byte[] data, int start, int itemIndex) throws AsterixException {
+    protected int getItemOffset(byte[] data, int start, int itemIndex) throws HyracksDataException {
         return AUnorderedListSerializerDeserializer.getItemOffset(data, start, itemIndex);
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
index da95091..0a66d56 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
@@ -24,7 +24,6 @@
 import java.util.List;
 
 import org.apache.asterix.builders.OrderedListBuilder;
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.om.base.AOrderedList;
 import org.apache.asterix.om.base.IAObject;
@@ -42,7 +41,8 @@
 public class AOrderedListSerializerDeserializer implements ISerializerDeserializer<AOrderedList> {
 
     private static final long serialVersionUID = 1L;
-    public static final AOrderedListSerializerDeserializer SCHEMALESS_INSTANCE = new AOrderedListSerializerDeserializer();
+    public static final AOrderedListSerializerDeserializer SCHEMALESS_INSTANCE =
+            new AOrderedListSerializerDeserializer();
 
     private final IAType itemType;
     @SuppressWarnings("rawtypes")
@@ -74,18 +74,19 @@
             ISerializerDeserializer currentDeserializer = deserializer;
             if (itemType.getTypeTag() == ATypeTag.ANY && typeTag != ATypeTag.ANY) {
                 currentItemType = TypeTagUtil.getBuiltinTypeByTag(typeTag);
-                currentDeserializer = SerializerDeserializerProvider.INSTANCE
-                        .getNonTaggedSerializerDeserializer(currentItemType);
+                currentDeserializer =
+                        SerializerDeserializerProvider.INSTANCE.getNonTaggedSerializerDeserializer(currentItemType);
             }
 
-            List<IAObject> items = new ArrayList<IAObject>();
+            List<IAObject> items = new ArrayList<>();
             in.readInt(); // list size
             int numberOfitems;
             numberOfitems = in.readInt();
             if (numberOfitems > 0) {
                 if (!NonTaggedFormatUtil.isFixedSizedCollection(currentItemType)) {
-                    for (int i = 0; i < numberOfitems; i++)
+                    for (int i = 0; i < numberOfitems; i++) {
                         in.readInt();
+                    }
                 }
                 for (int i = 0; i < numberOfitems; i++) {
                     IAObject v = (IAObject) currentDeserializer.deserialize(in);
@@ -119,14 +120,15 @@
     }
 
     public static int getNumberOfItems(byte[] serOrderedList, int offset) {
-        if (serOrderedList[offset] == ATypeTag.ARRAY.serialize())
+        if (serOrderedList[offset] == ATypeTag.ARRAY.serialize()) {
             // 6 = tag (1) + itemTag (1) + list size (4)
             return AInt32SerializerDeserializer.getInt(serOrderedList, offset + 6);
-        else
+        } else {
             return -1;
+        }
     }
 
-    public static int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws AsterixException {
+    public static int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws HyracksDataException {
         if (serOrderedList[offset] == ATypeTag.ARRAY.serialize()) {
             ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serOrderedList[offset + 1]);
             if (NonTaggedFormatUtil.isFixedSizedCollection(typeTag)) {
@@ -136,8 +138,9 @@
                 return offset + AInt32SerializerDeserializer.getInt(serOrderedList, offset + 10 + (4 * itemIndex));
             }
             // 10 = tag (1) + itemTag (1) + list size (4) + number of items (4)
-        } else
+        } else {
             return -1;
+        }
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AUnorderedListSerializerDeserializer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AUnorderedListSerializerDeserializer.java
index dd95586..a6090af 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AUnorderedListSerializerDeserializer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AUnorderedListSerializerDeserializer.java
@@ -23,7 +23,6 @@
 import java.util.ArrayList;
 
 import org.apache.asterix.builders.UnorderedListBuilder;
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.om.base.AUnorderedList;
 import org.apache.asterix.om.base.IACursor;
@@ -43,7 +42,8 @@
 
     private static final long serialVersionUID = 1L;
 
-    public static final AUnorderedListSerializerDeserializer SCHEMALESS_INSTANCE = new AUnorderedListSerializerDeserializer();
+    public static final AUnorderedListSerializerDeserializer SCHEMALESS_INSTANCE =
+            new AUnorderedListSerializerDeserializer();
 
     private final IAType itemType;
     private final AUnorderedListType unorderedlistType;
@@ -76,18 +76,19 @@
             ISerializerDeserializer currentDeserializer = deserializer;
             if (itemType.getTypeTag() == ATypeTag.ANY && typeTag != ATypeTag.ANY) {
                 currentItemType = TypeTagUtil.getBuiltinTypeByTag(typeTag);
-                currentDeserializer = SerializerDeserializerProvider.INSTANCE
-                        .getNonTaggedSerializerDeserializer(currentItemType);
+                currentDeserializer =
+                        SerializerDeserializerProvider.INSTANCE.getNonTaggedSerializerDeserializer(currentItemType);
             }
 
             in.readInt(); // list size
             int numberOfitems;
             numberOfitems = in.readInt();
-            ArrayList<IAObject> items = new ArrayList<IAObject>();
+            ArrayList<IAObject> items = new ArrayList<>();
             if (numberOfitems > 0) {
                 if (!NonTaggedFormatUtil.isFixedSizedCollection(currentItemType)) {
-                    for (int i = 0; i < numberOfitems; i++)
+                    for (int i = 0; i < numberOfitems; i++) {
                         in.readInt();
+                    }
                 }
                 for (int i = 0; i < numberOfitems; i++) {
                     items.add((IAObject) currentDeserializer.deserialize(in));
@@ -121,14 +122,15 @@
     }
 
     public static int getNumberOfItems(byte[] serOrderedList, int offset) {
-        if (serOrderedList[offset] == ATypeTag.MULTISET.serialize())
+        if (serOrderedList[offset] == ATypeTag.MULTISET.serialize()) {
             // 6 = tag (1) + itemTag (1) + list size (4)
             return AInt32SerializerDeserializer.getInt(serOrderedList, offset + 6);
-        else
+        } else {
             return -1;
+        }
     }
 
-    public static int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws AsterixException {
+    public static int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws HyracksDataException {
         if (serOrderedList[offset] == ATypeTag.MULTISET.serialize()) {
             ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serOrderedList[offset + 1]);
             if (NonTaggedFormatUtil.isFixedSizedCollection(typeTag)) {
@@ -138,8 +140,9 @@
                 return offset + AInt32SerializerDeserializer.getInt(serOrderedList, offset + 10 + (4 * itemIndex));
             }
             // 10 = tag (1) + itemTag (1) + list size (4) + number of items (4)
-        } else
+        } else {
             return -1;
+        }
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AListPointable.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AListPointable.java
index f2e7299..7a2efe0 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AListPointable.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AListPointable.java
@@ -29,6 +29,7 @@
 import org.apache.asterix.om.util.container.IObjectFactory;
 import org.apache.asterix.om.utils.NonTaggedFormatUtil;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.AbstractPointable;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.api.IPointableFactory;
@@ -123,7 +124,7 @@
         return NonTaggedFormatUtil.isFixedSizedCollection(inputType.getItemType());
     }
 
-    public int getFixedLength(AbstractCollectionType inputType) throws AsterixException {
+    public int getFixedLength(AbstractCollectionType inputType) throws HyracksDataException {
         return NonTaggedFormatUtil.getFieldValueLength(bytes, 0, inputType.getItemType().getTypeTag(), false);
     }
 
@@ -163,7 +164,7 @@
     // Item accessors
     // ----------------------
 
-    public int getItemOffset(AbstractCollectionType inputType, int index) throws AsterixException {
+    public int getItemOffset(AbstractCollectionType inputType, int index) throws HyracksDataException {
         if (isFixedType(inputType)) {
             return getItemCountOffset() + getItemCountSize() + index * getFixedLength(inputType);
         } else {
@@ -172,14 +173,14 @@
         }
     }
 
-    public byte getItemTag(AbstractCollectionType inputType, int index) throws AsterixException {
+    public byte getItemTag(AbstractCollectionType inputType, int index) throws HyracksDataException {
         if (getType() != ATypeTag.ANY.serialize()) {
             return getType();
         }
         return bytes[getItemOffset(inputType, index)];
     }
 
-    public int getItemSize(AbstractCollectionType inputType, int index) throws AsterixException {
+    public int getItemSize(AbstractCollectionType inputType, int index) throws HyracksDataException {
         if (isFixedType(inputType)) {
             return getFixedLength(inputType);
         } else {
@@ -188,8 +189,8 @@
         }
     }
 
-    public void getItemValue(AbstractCollectionType inputType, int index, DataOutput dOut) throws IOException,
-            AsterixException {
+    public void getItemValue(AbstractCollectionType inputType, int index, DataOutput dOut)
+            throws IOException, AsterixException {
         if (getType() != ATypeTag.ANY.serialize()) {
             dOut.writeByte(getType());
         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java
index 190a3b2..0aa256f 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java
@@ -32,6 +32,7 @@
 import org.apache.asterix.om.utils.NonTaggedFormatUtil;
 import org.apache.asterix.om.utils.RecordUtil;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.AbstractPointable;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.api.IPointableFactory;
@@ -252,7 +253,7 @@
         return aType;
     }
 
-    public int getClosedFieldSize(ARecordType recordType, int fieldId) throws AsterixException {
+    public int getClosedFieldSize(ARecordType recordType, int fieldId) throws HyracksDataException {
         if (isClosedFieldNull(recordType, fieldId)) {
             return 0;
         }
@@ -294,7 +295,7 @@
         return getOpenFieldNameOffset(recordType, fieldId) + getOpenFieldNameSize(recordType, fieldId);
     }
 
-    public int getOpenFieldValueSize(ARecordType recordType, int fieldId) throws AsterixException {
+    public int getOpenFieldValueSize(ARecordType recordType, int fieldId) throws HyracksDataException {
         int offset = getOpenFieldValueOffset(recordType, fieldId);
         ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(getOpenFieldTag(recordType, fieldId));
         return NonTaggedFormatUtil.getFieldValueLength(bytes, offset, tag, true);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/NonTaggedFormatUtil.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/NonTaggedFormatUtil.java
index 37e8c05..8558538 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/NonTaggedFormatUtil.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/utils/NonTaggedFormatUtil.java
@@ -19,7 +19,7 @@
 package org.apache.asterix.om.utils;
 
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.ErrorCode;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AIntervalSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
@@ -39,6 +39,7 @@
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.apache.hyracks.storage.am.lsm.invertedindex.tokenizers.IBinaryTokenizerFactory;
 import org.apache.hyracks.util.string.UTF8StringUtil;
@@ -106,12 +107,12 @@
     }
 
     public static int getFieldValueLength(byte[] serNonTaggedAObject, int offset, ATypeTag typeTag, boolean tagged)
-            throws AsterixException {
+            throws HyracksDataException {
         switch (typeTag) {
             case ANY:
                 ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serNonTaggedAObject[offset]);
                 if (tag == ATypeTag.ANY) {
-                    throw new AsterixException("Field value has type tag ANY, but it should have a concrete type.");
+                    throw HyracksDataException.create(ErrorCode.FIELD_SHOULD_BE_TYPED);
                 }
                 return getFieldValueLength(serNonTaggedAObject, offset, tag, true) + 1;
             case MISSING:
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractAsterixListIterator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractAsterixListIterator.java
index 379c362..c07aae2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractAsterixListIterator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractAsterixListIterator.java
@@ -18,7 +18,6 @@
  */
 package org.apache.asterix.runtime.evaluators.common;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.formats.nontagged.BinaryComparatorFactoryProvider;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -72,32 +71,24 @@
 
     @Override
     public void next() throws HyracksDataException {
-        try {
-            pos = nextPos;
-            ++count;
-            nextPos = startOff + listLength;
-            if (count + 1 < numberOfItems) {
-                nextPos = getItemOffset(data, startOff, count + 1);
-            }
-            itemLen = nextPos - pos;
-        } catch (AsterixException e) {
-            throw new HyracksDataException(e);
+        pos = nextPos;
+        ++count;
+        nextPos = startOff + listLength;
+        if (count + 1 < numberOfItems) {
+            nextPos = getItemOffset(data, startOff, count + 1);
         }
+        itemLen = nextPos - pos;
     }
 
     @Override
     public void reset() throws HyracksDataException {
         count = 0;
-        try {
-            pos = getItemOffset(data, startOff, count);
-            nextPos = startOff + listLength;
-            if (count + 1 < numberOfItems) {
-                nextPos = getItemOffset(data, startOff, count + 1);
-            }
-            itemLen = nextPos - pos;
-        } catch (AsterixException e) {
-            throw new HyracksDataException(e);
+        pos = getItemOffset(data, startOff, count);
+        nextPos = startOff + listLength;
+        if (count + 1 < numberOfItems) {
+            nextPos = getItemOffset(data, startOff, count + 1);
         }
+        itemLen = nextPos - pos;
     }
 
     @Override
@@ -153,7 +144,7 @@
         reset();
     }
 
-    protected abstract int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws AsterixException;
+    protected abstract int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws HyracksDataException;
 
     protected abstract int getNumberOfItems(byte[] serOrderedList, int offset);
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ListAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ListAccessor.java
index c03cfa6..3c97fc9 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ListAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ListAccessor.java
@@ -22,7 +22,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AUnorderedListSerializerDeserializer;
 import org.apache.asterix.om.types.ATypeTag;
@@ -76,7 +75,7 @@
         return size;
     }
 
-    public int getItemOffset(int itemIndex) throws AsterixException {
+    public int getItemOffset(int itemIndex) throws HyracksDataException {
         if (listType == ATypeTag.MULTISET) {
             return AUnorderedListSerializerDeserializer.getItemOffset(listBytes, start, itemIndex);
         } else {
@@ -84,12 +83,12 @@
         }
     }
 
-    public int getItemLength(int itemOffset) throws AsterixException {
+    public int getItemLength(int itemOffset) throws HyracksDataException {
         ATypeTag itemType = getItemType(itemOffset);
         return NonTaggedFormatUtil.getFieldValueLength(listBytes, itemOffset, itemType, itemsAreSelfDescribing());
     }
 
-    public ATypeTag getItemType(int itemOffset) throws AsterixException {
+    public ATypeTag getItemType(int itemOffset) {
         if (itemType == ATypeTag.ANY) {
             return EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(listBytes[itemOffset]);
         } else {
@@ -97,7 +96,7 @@
         }
     }
 
-    public void writeItem(int itemIndex, DataOutput dos) throws AsterixException, IOException {
+    public void writeItem(int itemIndex, DataOutput dos) throws IOException {
         int itemOffset = getItemOffset(itemIndex);
         int itemLength = getItemLength(itemOffset);
         if (itemsAreSelfDescribing()) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/OrderedListIterator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/OrderedListIterator.java
index f0c2f5a..c5add44 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/OrderedListIterator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/OrderedListIterator.java
@@ -18,13 +18,13 @@
  */
 package org.apache.asterix.runtime.evaluators.common;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public final class OrderedListIterator extends AbstractAsterixListIterator {
 
     @Override
-    protected int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws AsterixException {
+    protected int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws HyracksDataException {
         return AOrderedListSerializerDeserializer.getItemOffset(serOrderedList, offset, itemIndex);
     }
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardPrefixEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardPrefixEvaluator.java
index f519065..b70c6ad 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardPrefixEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardPrefixEvaluator.java
@@ -21,7 +21,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AUnorderedListSerializerDeserializer;
@@ -72,8 +71,8 @@
     // result
     protected final AMutableFloat res = new AMutableFloat(0);
     @SuppressWarnings("unchecked")
-    protected final ISerializerDeserializer<AFloat> reusSerde = SerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.AFLOAT);
+    protected final ISerializerDeserializer<AFloat> reusSerde =
+            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AFLOAT);
 
     public SimilarityJaccardPrefixEvaluator(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
             throws HyracksDataException {
@@ -91,8 +90,8 @@
         // similarity threshold
         sim = 0;
         evalThreshold.evaluate(tuple, inputVal);
-        float similarityThreshold = AFloatSerializerDeserializer.getFloat(inputVal.getByteArray(),
-                inputVal.getStartOffset() + 1);
+        float similarityThreshold =
+                AFloatSerializerDeserializer.getFloat(inputVal.getByteArray(), inputVal.getStartOffset() + 1);
 
         if (similarityThreshold != similarityThresholdCache || similarityFilters == null) {
             similarityFilters = new SimilarityFiltersJaccard(similarityThreshold);
@@ -126,39 +125,23 @@
 
             int lengthTokens1;
             if (serList[startOffset] == ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG) {
-                lengthTokens1 = AOrderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(),
-                        startOffset);
+                lengthTokens1 =
+                        AOrderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(), startOffset);
                 // read tokens
                 for (i = 0; i < lengthTokens1; i++) {
-                    int itemOffset;
-                    int token;
-                    try {
-                        itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
-                    } catch (AsterixException e) {
-                        throw new HyracksDataException(e);
-                    }
-                    token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
-                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 1, serList, itemOffset,
-                                startOffset + 1);
+                    int itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
+                    int token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
+                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 1, serList, itemOffset, startOffset + 1);
                     tokens1.add(token);
                 }
             } else {
-                lengthTokens1 = AUnorderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(),
-                        startOffset);
+                lengthTokens1 =
+                        AUnorderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(), startOffset);
                 // read tokens
                 for (i = 0; i < lengthTokens1; i++) {
-                    int itemOffset;
-                    int token;
-
-                    try {
-                        itemOffset = AUnorderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
-                    } catch (AsterixException e) {
-                        throw new HyracksDataException(e);
-                    }
-
-                    token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
-                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 1, serList, itemOffset,
-                                startOffset + 1);
+                    int itemOffset = AUnorderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
+                    int token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
+                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 1, serList, itemOffset, startOffset + 1);
                     tokens1.add(token);
                 }
             }
@@ -181,39 +164,23 @@
 
             int lengthTokens2;
             if (serList[startOffset] == ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG) {
-                lengthTokens2 = AOrderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(),
-                        startOffset);
+                lengthTokens2 =
+                        AOrderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(), startOffset);
                 // read tokens
                 for (i = 0; i < lengthTokens2; i++) {
-                    int itemOffset;
-                    int token;
-
-                    try {
-                        itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
-                    } catch (AsterixException e) {
-                        throw new HyracksDataException(e);
-                    }
-                    token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
-                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 3, serList, itemOffset,
-                                startOffset + 1);
+                    int itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
+                    int token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
+                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 3, serList, itemOffset, startOffset + 1);
                     tokens2.add(token);
                 }
             } else {
-                lengthTokens2 = AUnorderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(),
-                        startOffset);
+                lengthTokens2 =
+                        AUnorderedListSerializerDeserializer.getNumberOfItems(inputVal.getByteArray(), startOffset);
                 // read tokens
                 for (i = 0; i < lengthTokens2; i++) {
-                    int itemOffset;
-                    int token;
-
-                    try {
-                        itemOffset = AUnorderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
-                    } catch (AsterixException e) {
-                        throw new HyracksDataException(e);
-                    }
-                    token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
-                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 3, serList, itemOffset,
-                                startOffset + 1);
+                    int itemOffset = AUnorderedListSerializerDeserializer.getItemOffset(serList, startOffset, i);
+                    int token = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
+                            BuiltinFunctions.SIMILARITY_JACCARD.getName(), 3, serList, itemOffset, startOffset + 1);
                     tokens2.add(token);
                 }
             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/UnorderedListIterator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/UnorderedListIterator.java
index ee58011..b755da2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/UnorderedListIterator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/UnorderedListIterator.java
@@ -18,13 +18,13 @@
  */
 package org.apache.asterix.runtime.evaluators.common;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AUnorderedListSerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public final class UnorderedListIterator extends AbstractAsterixListIterator {
 
     @Override
-    protected int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws AsterixException {
+    protected int getItemOffset(byte[] serOrderedList, int offset, int itemIndex) throws HyracksDataException {
         return AUnorderedListSerializerDeserializer.getItemOffset(serOrderedList, offset, itemIndex);
     }
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AnyCollectionMemberDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AnyCollectionMemberDescriptor.java
index 714fabe..b78bc5c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AnyCollectionMemberDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AnyCollectionMemberDescriptor.java
@@ -21,7 +21,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AUnorderedListSerializerDeserializer;
 import org.apache.asterix.om.functions.BuiltinFunctions;
@@ -96,9 +95,8 @@
 
                     if (serList[offset] != ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG
                             && serList[offset] != ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG) {
-                        throw new TypeMismatchException(BuiltinFunctions.ANY_COLLECTION_MEMBER, 0,
-                                serList[offset], ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG,
-                                ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG);
+                        throw new TypeMismatchException(BuiltinFunctions.ANY_COLLECTION_MEMBER, 0, serList[offset],
+                                ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG, ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG);
                     }
 
                     try {
@@ -127,8 +125,8 @@
 
                         if (selfDescList) {
                             itemTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serList[itemOffset]);
-                            itemLength = NonTaggedFormatUtil.getFieldValueLength(serList, itemOffset, itemTag, true)
-                                    + 1;
+                            itemLength =
+                                    NonTaggedFormatUtil.getFieldValueLength(serList, itemOffset, itemTag, true) + 1;
                             result.set(serList, itemOffset, itemLength);
                         } else {
                             itemLength = NonTaggedFormatUtil.getFieldValueLength(serList, itemOffset, itemTag, false);
@@ -137,9 +135,7 @@
                             result.set(resultStorage);
                         }
                     } catch (IOException e) {
-                        throw new HyracksDataException(e);
-                    } catch (AsterixException e) {
-                        throw new HyracksDataException(e);
+                        throw HyracksDataException.create(e);
                     }
                 }
             };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
index 09e15b5..a59d03d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
@@ -21,7 +21,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -99,39 +98,32 @@
                                         throw new UnsupportedTypeException(getIdentifier(), serOrderedList[offset]);
                                 }
                             }
-
-                            try {
-                                // calculate length first
-                                int utf_8_len = 0;
-                                for (int i = 0; i < size; i++) {
-                                    int itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serOrderedList,
-                                            offset, i);
-                                    int codePoint = 0;
-                                    codePoint = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
-                                            getIdentifier().getName(), 0,
-                                            serOrderedList, itemOffset, offset + 1);
-                                    utf_8_len += UTF8StringUtil.codePointToUTF8(codePoint, currentUTF8);
-                                }
-                                out.writeByte(stringTypeTag);
-                                UTF8StringUtil.writeUTF8Length(utf_8_len, tempStoreForLength, out);
-                                for (int i = 0; i < size; i++) {
-                                    int itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serOrderedList,
-                                            offset, i);
-                                    int codePoint = 0;
-                                    codePoint = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
-                                            getIdentifier().getName(), 0,
-                                            serOrderedList, itemOffset, offset + 1);
-                                    utf_8_len = UTF8StringUtil.codePointToUTF8(codePoint, currentUTF8);
-                                    for (int j = 0; j < utf_8_len; j++) {
-                                        out.writeByte(currentUTF8[j]);
-                                    }
-                                }
-                                result.set(resultStorage);
-                            } catch (AsterixException ex) {
-                                throw new HyracksDataException(ex);
+                            // calculate length first
+                            int utf_8_len = 0;
+                            for (int i = 0; i < size; i++) {
+                                int itemOffset =
+                                        AOrderedListSerializerDeserializer.getItemOffset(serOrderedList, offset, i);
+                                int codePoint = 0;
+                                codePoint = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
+                                        getIdentifier().getName(), 0, serOrderedList, itemOffset, offset + 1);
+                                utf_8_len += UTF8StringUtil.codePointToUTF8(codePoint, currentUTF8);
                             }
-                        } catch (IOException e1) {
-                            throw new HyracksDataException(e1);
+                            out.writeByte(stringTypeTag);
+                            UTF8StringUtil.writeUTF8Length(utf_8_len, tempStoreForLength, out);
+                            for (int i = 0; i < size; i++) {
+                                int itemOffset =
+                                        AOrderedListSerializerDeserializer.getItemOffset(serOrderedList, offset, i);
+                                int codePoint = 0;
+                                codePoint = ATypeHierarchy.getIntegerValueWithDifferentTypeTagPosition(
+                                        getIdentifier().getName(), 0, serOrderedList, itemOffset, offset + 1);
+                                utf_8_len = UTF8StringUtil.codePointToUTF8(codePoint, currentUTF8);
+                                for (int j = 0; j < utf_8_len; j++) {
+                                    out.writeByte(currentUTF8[j]);
+                                }
+                            }
+                            result.set(resultStorage);
+                        } catch (IOException e) {
+                            throw HyracksDataException.create(e);
                         }
                     }
                 };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePolygonDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePolygonDescriptor.java
index 76d9cf3..74f8757 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePolygonDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePolygonDescriptor.java
@@ -21,7 +21,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.APointSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
@@ -75,10 +74,10 @@
                     private final IPointable inputArgList = new VoidPointable();
                     private final IScalarEvaluator evalList = listEvalFactory.createScalarEvaluator(ctx);
                     @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    private final ISerializerDeserializer<AMissing> missingSerde = SerializerDeserializerProvider.
-                            INSTANCE.getSerializerDeserializer(BuiltinType.AMISSING);
+                    private final ISerializerDeserializer<ANull> nullSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.ANULL);
+                    private final ISerializerDeserializer<AMissing> missingSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AMISSING);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException {
@@ -95,51 +94,46 @@
                                         ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG);
                             }
                             listAccessor.reset(listBytes, offset);
-                            try {
-                                // First check the list consists of a valid items
-                                for (int i = 0; i < listAccessor.size(); i++) {
-                                    int itemOffset = listAccessor.getItemOffset(i);
-                                    ATypeTag itemType = listAccessor.getItemType(itemOffset);
-                                    if (itemType != ATypeTag.DOUBLE) {
-                                        if (itemType == ATypeTag.NULL) {
-                                            nullSerde.serialize(ANull.NULL, out);
-                                            return;
-                                        }
-                                        if (itemType == ATypeTag.MISSING) {
-                                            missingSerde.serialize(AMissing.MISSING, out);
-                                            return;
-                                        }
-                                        throw new UnsupportedItemTypeException(BuiltinFunctions.CREATE_POLYGON,
-                                                itemType.serialize());
+                            // First check the list consists of a valid items
+                            for (int i = 0; i < listAccessor.size(); i++) {
+                                int itemOffset = listAccessor.getItemOffset(i);
+                                ATypeTag itemType = listAccessor.getItemType(itemOffset);
+                                if (itemType != ATypeTag.DOUBLE) {
+                                    if (itemType == ATypeTag.NULL) {
+                                        nullSerde.serialize(ANull.NULL, out);
+                                        return;
                                     }
-
+                                    if (itemType == ATypeTag.MISSING) {
+                                        missingSerde.serialize(AMissing.MISSING, out);
+                                        return;
+                                    }
+                                    throw new UnsupportedItemTypeException(BuiltinFunctions.CREATE_POLYGON,
+                                            itemType.serialize());
                                 }
-                                if (listAccessor.size() < 6) {
-                                    throw new InvalidDataFormatException(getIdentifier(),
-                                            ATypeTag.SERIALIZED_POLYGON_TYPE_TAG);
-                                } else if (listAccessor.size() % 2 != 0) {
-                                    throw new InvalidDataFormatException(getIdentifier(),
-                                            ATypeTag.SERIALIZED_POLYGON_TYPE_TAG);
-                                }
-                                out.writeByte(ATypeTag.SERIALIZED_POLYGON_TYPE_TAG);
-                                out.writeShort(listAccessor.size() / 2);
 
-                                final int skipTypeTag = listAccessor.itemsAreSelfDescribing() ? 1 : 0;
-                                for (int i = 0; i < listAccessor.size() / 2; i++) {
-                                    int firstDoubleOffset = listAccessor.getItemOffset(i * 2) + skipTypeTag;
-                                    int secondDobuleOffset = listAccessor.getItemOffset((i * 2) + 1) + skipTypeTag;
-
-                                    APointSerializerDeserializer.serialize(
-                                            ADoubleSerializerDeserializer.getDouble(listBytes, firstDoubleOffset),
-                                            ADoubleSerializerDeserializer.getDouble(listBytes, secondDobuleOffset),
-                                            out);
-                                }
-                                result.set(resultStorage);
-                            } catch (AsterixException ex) {
-                                throw new HyracksDataException(ex);
                             }
-                        } catch (IOException e1) {
-                            throw new HyracksDataException(e1);
+                            if (listAccessor.size() < 6) {
+                                throw new InvalidDataFormatException(getIdentifier(),
+                                        ATypeTag.SERIALIZED_POLYGON_TYPE_TAG);
+                            } else if (listAccessor.size() % 2 != 0) {
+                                throw new InvalidDataFormatException(getIdentifier(),
+                                        ATypeTag.SERIALIZED_POLYGON_TYPE_TAG);
+                            }
+                            out.writeByte(ATypeTag.SERIALIZED_POLYGON_TYPE_TAG);
+                            out.writeShort(listAccessor.size() / 2);
+
+                            final int skipTypeTag = listAccessor.itemsAreSelfDescribing() ? 1 : 0;
+                            for (int i = 0; i < listAccessor.size() / 2; i++) {
+                                int firstDoubleOffset = listAccessor.getItemOffset(i * 2) + skipTypeTag;
+                                int secondDobuleOffset = listAccessor.getItemOffset((i * 2) + 1) + skipTypeTag;
+
+                                APointSerializerDeserializer.serialize(
+                                        ADoubleSerializerDeserializer.getDouble(listBytes, firstDoubleOffset),
+                                        ADoubleSerializerDeserializer.getDouble(listBytes, secondDobuleOffset), out);
+                            }
+                            result.set(resultStorage);
+                        } catch (IOException e) {
+                            throw HyracksDataException.create(e);
                         }
                     }
                 };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/GetItemDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/GetItemDescriptor.java
index 276c9ae..0c55ef1 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/GetItemDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/GetItemDescriptor.java
@@ -21,7 +21,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -106,8 +105,8 @@
                             itemIndex = ATypeHierarchy.getIntegerValue(BuiltinFunctions.GET_ITEM.getName(), 0,
                                     indexBytes, indexOffset);
                         } else {
-                            throw new TypeMismatchException(BuiltinFunctions.GET_ITEM,
-                                    0, serOrderedList[offset], ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG);
+                            throw new TypeMismatchException(BuiltinFunctions.GET_ITEM, 0, serOrderedList[offset],
+                                    ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG);
                         }
 
                         if (itemIndex < 0 || itemIndex >= AOrderedListSerializerDeserializer
@@ -124,26 +123,25 @@
                             serItemTypeTag = serOrderedList[offset + 1];
                         }
 
-                        itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serOrderedList, offset,
-                                itemIndex);
+                        itemOffset =
+                                AOrderedListSerializerDeserializer.getItemOffset(serOrderedList, offset, itemIndex);
 
                         if (selfDescList) {
                             itemTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serOrderedList[itemOffset]);
-                            itemLength = NonTaggedFormatUtil.getFieldValueLength(serOrderedList, itemOffset, itemTag,
-                                    true) + 1;
+                            itemLength =
+                                    NonTaggedFormatUtil.getFieldValueLength(serOrderedList, itemOffset, itemTag, true)
+                                            + 1;
                             result.set(serOrderedList, itemOffset, itemLength);
                         } else {
-                            itemLength = NonTaggedFormatUtil.getFieldValueLength(serOrderedList, itemOffset, itemTag,
-                                    false);
+                            itemLength =
+                                    NonTaggedFormatUtil.getFieldValueLength(serOrderedList, itemOffset, itemTag, false);
                             resultStorage.reset();
                             output.writeByte(serItemTypeTag);
                             output.write(serOrderedList, itemOffset, itemLength);
                             result.set(resultStorage);
                         }
                     } catch (IOException e) {
-                        throw new HyracksDataException(e);
-                    } catch (AsterixException e) {
-                        throw new HyracksDataException(e);
+                        throw HyracksDataException.create(e);
                     }
                 }
             };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SimilarityDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SimilarityDescriptor.java
index 385b2c1..8584d06 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SimilarityDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SimilarityDescriptor.java
@@ -21,7 +21,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
@@ -33,13 +32,13 @@
 import org.apache.asterix.fuzzyjoin.similarity.SimilarityMetric;
 import org.apache.asterix.om.base.ADouble;
 import org.apache.asterix.om.base.AMutableDouble;
-import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.asterix.runtime.evaluators.common.SimilarityFiltersCache;
+import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
@@ -55,8 +54,8 @@
 public class SimilarityDescriptor extends AbstractScalarFunctionDynamicDescriptor {
 
     private static final long serialVersionUID = 1L;
-    private final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "similarity@7",
-            7);
+    private final static FunctionIdentifier FID =
+            new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "similarity@7", 7);
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -94,8 +93,8 @@
                     // result
                     private final AMutableDouble res = new AMutableDouble(0);
                     @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ADouble> doubleSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ADOUBLE);
+                    private final ISerializerDeserializer<ADouble> doubleSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.ADOUBLE);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException {
@@ -120,8 +119,8 @@
                             throw new TypeMismatchException(getIdentifier(), 1, data[offset],
                                     ATypeTag.SERIALIZED_DOUBLE_TYPE_TAG);
                         }
-                        SimilarityFilters similarityFilters = similarityFiltersCache.get(similarityThreshold, data,
-                                offset, len);
+                        SimilarityFilters similarityFilters =
+                                similarityFiltersCache.get(similarityThreshold, data, offset, len);
 
                         evalLen1.evaluate(tuple, inputVal);
                         data = inputVal.getByteArray();
@@ -167,26 +166,16 @@
                                 lengthTokens1 = AOrderedListSerializerDeserializer.getNumberOfItems(serList, offset);
                                 // read tokens
                                 for (i = 0; i < lengthTokens1; i++) {
-                                    int itemOffset;
-                                    try {
-                                        itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, offset,
-                                                i);
-                                    } catch (AsterixException e) {
-                                        throw new HyracksDataException(e);
-                                    }
+                                    int itemOffset =
+                                            AOrderedListSerializerDeserializer.getItemOffset(serList, offset, i);
                                     tokens1.add(IntegerPointable.getInteger(serList, itemOffset));
                                 }
                             } else {
                                 lengthTokens1 = AUnorderedListSerializerDeserializer.getNumberOfItems(serList, offset);
                                 // read tokens
                                 for (i = 0; i < lengthTokens1; i++) {
-                                    int itemOffset;
-                                    try {
-                                        itemOffset = AUnorderedListSerializerDeserializer.getItemOffset(serList, offset,
-                                                i);
-                                    } catch (AsterixException e) {
-                                        throw new HyracksDataException(e);
-                                    }
+                                    int itemOffset =
+                                            AUnorderedListSerializerDeserializer.getItemOffset(serList, offset, i);
                                     tokens1.add(IntegerPointable.getInteger(serList, itemOffset));
                                 }
                             }
@@ -213,26 +202,16 @@
                                 lengthTokens2 = AOrderedListSerializerDeserializer.getNumberOfItems(serList, offset);
                                 // read tokens
                                 for (i = 0; i < lengthTokens2; i++) {
-                                    int itemOffset;
-                                    try {
-                                        itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, offset,
-                                                i);
-                                    } catch (AsterixException e) {
-                                        throw new HyracksDataException(e);
-                                    }
+                                    int itemOffset =
+                                            AOrderedListSerializerDeserializer.getItemOffset(serList, offset, i);
                                     tokens2.add(IntegerPointable.getInteger(serList, itemOffset));
                                 }
                             } else {
                                 lengthTokens2 = AUnorderedListSerializerDeserializer.getNumberOfItems(serList, offset);
                                 // read tokens
                                 for (i = 0; i < lengthTokens2; i++) {
-                                    int itemOffset;
-                                    try {
-                                        itemOffset = AUnorderedListSerializerDeserializer.getItemOffset(serList, offset,
-                                                i);
-                                    } catch (AsterixException e) {
-                                        throw new HyracksDataException(e);
-                                    }
+                                    int itemOffset =
+                                            AUnorderedListSerializerDeserializer.getItemOffset(serList, offset, i);
                                     tokens2.add(IntegerPointable.getInteger(serList, itemOffset));
                                 }
                             }
@@ -243,8 +222,8 @@
 
                             // -- - token prefix - --
                             evalTokenPrefix.evaluate(tuple, inputVal);
-                            int tokenPrefix = IntegerPointable.getInteger(inputVal.getByteArray(),
-                                    inputVal.getStartOffset() + 1);
+                            int tokenPrefix =
+                                    IntegerPointable.getInteger(inputVal.getByteArray(), inputVal.getStartOffset() + 1);
 
                             //
                             // -- - position filter - --
@@ -272,7 +251,7 @@
                         try {
                             doubleSerde.serialize(res, out);
                         } catch (IOException e) {
-                            throw new HyracksDataException(e);
+                            throw HyracksDataException.create(e);
                         }
                         result.set(resultStorage);
                     }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringConcatDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringConcatDescriptor.java
index 8ad3255..851e1a4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringConcatDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringConcatDescriptor.java
@@ -21,11 +21,9 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
-import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -33,6 +31,7 @@
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.asterix.runtime.evaluators.common.ListAccessor;
+import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.runtime.exceptions.UnsupportedItemTypeException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -72,10 +71,10 @@
                     private final IPointable inputArgList = new VoidPointable();
                     private final IScalarEvaluator evalList = listEvalFactory.createScalarEvaluator(ctx);
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    private ISerializerDeserializer<AMissing> missingSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.AMISSING);
+                    private ISerializerDeserializer<ANull> nullSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.ANULL);
+                    private ISerializerDeserializer<AMissing> missingSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AMISSING);
                     private final byte[] tempLengthArray = new byte[5];
 
                     @Override
@@ -93,49 +92,45 @@
                                         ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG);
                             }
                             listAccessor.reset(listBytes, listOffset);
-                            try {
-                                // calculate length first
-                                int utf8Len = 0;
-                                for (int i = 0; i < listAccessor.size(); i++) {
-                                    int itemOffset = listAccessor.getItemOffset(i);
-                                    ATypeTag itemType = listAccessor.getItemType(itemOffset);
-                                    // Increase the offset by 1 if the give list has heterogeneous elements,
-                                    // since the item itself has a typetag.
-                                    if (listAccessor.itemsAreSelfDescribing()) {
-                                        itemOffset += 1;
-                                    }
-                                    if (itemType != ATypeTag.STRING) {
-                                        if (itemType == ATypeTag.NULL) {
-                                            nullSerde.serialize(ANull.NULL, out);
-                                            result.set(resultStorage);
-                                            return;
-                                        }
-                                        if (itemType == ATypeTag.MISSING) {
-                                            missingSerde.serialize(AMissing.MISSING, out);
-                                            result.set(resultStorage);
-                                            return;
-                                        }
-                                        throw new UnsupportedItemTypeException(getIdentifier(), itemType.serialize());
-                                    }
-                                    utf8Len += UTF8StringUtil.getUTFLength(listBytes, itemOffset);
+                            // calculate length first
+                            int utf8Len = 0;
+                            for (int i = 0; i < listAccessor.size(); i++) {
+                                int itemOffset = listAccessor.getItemOffset(i);
+                                ATypeTag itemType = listAccessor.getItemType(itemOffset);
+                                // Increase the offset by 1 if the give list has heterogeneous elements,
+                                // since the item itself has a typetag.
+                                if (listAccessor.itemsAreSelfDescribing()) {
+                                    itemOffset += 1;
                                 }
-                                out.writeByte(ATypeTag.SERIALIZED_STRING_TYPE_TAG);
-                                int cbytes = UTF8StringUtil.encodeUTF8Length(utf8Len, tempLengthArray, 0);
-                                out.write(tempLengthArray, 0, cbytes);
-                                for (int i = 0; i < listAccessor.size(); i++) {
-                                    int itemOffset = listAccessor.getItemOffset(i);
-                                    if (listAccessor.itemsAreSelfDescribing()) {
-                                        itemOffset += 1;
+                                if (itemType != ATypeTag.STRING) {
+                                    if (itemType == ATypeTag.NULL) {
+                                        nullSerde.serialize(ANull.NULL, out);
+                                        result.set(resultStorage);
+                                        return;
                                     }
-                                    utf8Len = UTF8StringUtil.getUTFLength(listBytes, itemOffset);
-                                    out.write(listBytes, UTF8StringUtil.getNumBytesToStoreLength(utf8Len) + itemOffset,
-                                            utf8Len);
+                                    if (itemType == ATypeTag.MISSING) {
+                                        missingSerde.serialize(AMissing.MISSING, out);
+                                        result.set(resultStorage);
+                                        return;
+                                    }
+                                    throw new UnsupportedItemTypeException(getIdentifier(), itemType.serialize());
                                 }
-                            } catch (AsterixException ex) {
-                                throw new HyracksDataException(ex);
+                                utf8Len += UTF8StringUtil.getUTFLength(listBytes, itemOffset);
                             }
-                        } catch (IOException e1) {
-                            throw new HyracksDataException(e1);
+                            out.writeByte(ATypeTag.SERIALIZED_STRING_TYPE_TAG);
+                            int cbytes = UTF8StringUtil.encodeUTF8Length(utf8Len, tempLengthArray, 0);
+                            out.write(tempLengthArray, 0, cbytes);
+                            for (int i = 0; i < listAccessor.size(); i++) {
+                                int itemOffset = listAccessor.getItemOffset(i);
+                                if (listAccessor.itemsAreSelfDescribing()) {
+                                    itemOffset += 1;
+                                }
+                                utf8Len = UTF8StringUtil.getUTFLength(listBytes, itemOffset);
+                                out.write(listBytes, UTF8StringUtil.getNumBytesToStoreLength(utf8Len) + itemOffset,
+                                        utf8Len);
+                            }
+                        } catch (IOException e) {
+                            throw HyracksDataException.create(e);
                         }
                         result.set(resultStorage);
                     }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringJoinDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringJoinDescriptor.java
index 6cfdffc..70b3687 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringJoinDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringJoinDescriptor.java
@@ -21,7 +21,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
@@ -74,10 +73,10 @@
                     private final IScalarEvaluator evalList = listEvalFactory.createScalarEvaluator(ctx);
                     private final IScalarEvaluator evalSep = sepEvalFactory.createScalarEvaluator(ctx);
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    private ISerializerDeserializer<AMissing> missingSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.AMISSING);
+                    private ISerializerDeserializer<ANull> nullSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.ANULL);
+                    private ISerializerDeserializer<AMissing> missingSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AMISSING);
                     private final byte[] tempLengthArray = new byte[5];
 
                     @Override
@@ -151,8 +150,8 @@
                                     out.writeByte(sepBytes[sepOffset + 1 + sepMetaLen + j]);
                                 }
                             }
-                        } catch (IOException | AsterixException ex) {
-                            throw new HyracksDataException(ex);
+                        } catch (IOException ex) {
+                            throw HyracksDataException.create(ex);
                         }
                         result.set(resultStorage);
                     }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
index b394062..907dfd3 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
@@ -21,7 +21,6 @@
 
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
@@ -72,11 +71,11 @@
                     private final ListAccessor listAccessor = new ListAccessor();
                     private final byte[] metaBuffer = new byte[5];
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
+                    private ISerializerDeserializer<ANull> nullSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<AMissing> missingSerde = SerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.AMISSING);
+                    private ISerializerDeserializer<AMissing> missingSerde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AMISSING);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws HyracksDataException {
@@ -118,9 +117,7 @@
                                         itemOffset + ByteArrayPointable.getNumberBytesToStoreMeta(length), length);
                             }
                         } catch (IOException e) {
-                            throw new HyracksDataException(e);
-                        } catch (AsterixException e) {
-                            throw new HyracksDataException(e);
+                            throw HyracksDataException.create(e);
                         }
                         result.set(resultStorage);
                     }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByIndexEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByIndexEvalFactory.java
index 3321efc..d5918cb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByIndexEvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByIndexEvalFactory.java
@@ -21,9 +21,7 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
-import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
@@ -31,6 +29,7 @@
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.utils.NonTaggedFormatUtil;
 import org.apache.asterix.om.utils.RecordUtil;
+import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
@@ -90,15 +89,15 @@
                     int offset = inputArg0.getStartOffset();
 
                     if (serRecord[offset] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
-                        throw new TypeMismatchException(BuiltinFunctions.FIELD_ACCESS_BY_INDEX, 0,
-                                serRecord[offset], ATypeTag.SERIALIZED_RECORD_TYPE_TAG);
+                        throw new TypeMismatchException(BuiltinFunctions.FIELD_ACCESS_BY_INDEX, 0, serRecord[offset],
+                                ATypeTag.SERIALIZED_RECORD_TYPE_TAG);
                     }
                     eval1.evaluate(tuple, inputArg1);
                     byte[] indexBytes = inputArg1.getByteArray();
                     int indexOffset = inputArg1.getStartOffset();
                     if (indexBytes[indexOffset] != ATypeTag.SERIALIZED_INT32_TYPE_TAG) {
-                        throw new TypeMismatchException(BuiltinFunctions.FIELD_ACCESS_BY_INDEX, 1,
-                                indexBytes[offset], ATypeTag.SERIALIZED_INT32_TYPE_TAG);
+                        throw new TypeMismatchException(BuiltinFunctions.FIELD_ACCESS_BY_INDEX, 1, indexBytes[offset],
+                                ATypeTag.SERIALIZED_INT32_TYPE_TAG);
                     }
                     fieldIndex = IntegerPointable.getInteger(indexBytes, indexOffset + 1);
                     fieldValueType = recordType.getFieldTypes()[fieldIndex];
@@ -137,9 +136,7 @@
                     out.write(serRecord, fieldValueOffset, fieldValueLength);
                     result.set(resultStorage);
                 } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                } catch (AsterixException e) {
-                    throw new HyracksDataException(e);
+                    throw HyracksDataException.create(e);
                 }
             }
         };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByNameEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByNameEvalFactory.java
index 87fa292..2078921 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByNameEvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessByNameEvalFactory.java
@@ -21,13 +21,12 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
-import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.utils.NonTaggedFormatUtil;
+import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
@@ -94,9 +93,7 @@
                             fieldValueTypeTag, true) + 1;
                     result.set(serRecord, fieldValueOffset, fieldValueLength);
                 } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                } catch (AsterixException e) {
-                    throw new HyracksDataException(e);
+                    throw HyracksDataException.create(e);
                 }
             }
         };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessNestedEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessNestedEvalFactory.java
index 2da8e90..067a458 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessNestedEvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/FieldAccessNestedEvalFactory.java
@@ -22,7 +22,6 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMissing;
@@ -80,11 +79,11 @@
             private final IPointable[] fieldPointables = new VoidPointable[fieldPath.size()];
             private final RuntimeRecordTypeInfo[] recTypeInfos = new RuntimeRecordTypeInfo[fieldPath.size()];
             @SuppressWarnings("unchecked")
-            private final ISerializerDeserializer<ANull> nullSerde = SerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.ANULL);
+            private final ISerializerDeserializer<ANull> nullSerde =
+                    SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.ANULL);
             @SuppressWarnings("unchecked")
-            private final ISerializerDeserializer<AMissing> missingSerde = SerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.AMISSING);
+            private final ISerializerDeserializer<AMissing> missingSerde =
+                    SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AMISSING);
 
             {
                 generateFieldsPointables();
@@ -100,8 +99,7 @@
                     ArrayBackedValueStorage storage = new ArrayBackedValueStorage();
                     DataOutput out = storage.getDataOutput();
                     AString as = new AString(fieldPath.get(i));
-                    SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(as.getType()).serialize(as,
-                                out);
+                    SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(as.getType()).serialize(as, out);
                     fieldPointables[i] = new VoidPointable();
                     fieldPointables[i].set(storage);
                 }
@@ -118,8 +116,8 @@
                     int len = inputArg0.getLength();
 
                     if (serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
-                        throw new TypeMismatchException(BuiltinFunctions.FIELD_ACCESS_NESTED, 0,
-                                serRecord[start], ATypeTag.SERIALIZED_RECORD_TYPE_TAG);
+                        throw new TypeMismatchException(BuiltinFunctions.FIELD_ACCESS_NESTED, 0, serRecord[start],
+                                ATypeTag.SERIALIZED_RECORD_TYPE_TAG);
                     }
 
                     int subFieldIndex = -1;
@@ -141,8 +139,7 @@
                             subType = ((AUnionType) subType).getActualType();
                             byte serializedTypeTag = subType.getTypeTag().serialize();
                             if (serializedTypeTag != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
-                                throw new UnsupportedTypeException(
-                                        BuiltinFunctions.FIELD_ACCESS_NESTED.getName(),
+                                throw new UnsupportedTypeException(BuiltinFunctions.FIELD_ACCESS_NESTED.getName(),
                                         serializedTypeTag);
                             }
                             if (subType.getTypeTag() == ATypeTag.OBJECT) {
@@ -198,8 +195,7 @@
                         // type check
                         if (pathIndex < fieldPointables.length - 1
                                 && serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
-                            throw new UnsupportedTypeException(BuiltinFunctions.FIELD_ACCESS_NESTED,
-                                    serRecord[start]);
+                            throw new UnsupportedTypeException(BuiltinFunctions.FIELD_ACCESS_NESTED, serRecord[start]);
                         }
                     }
 
@@ -215,8 +211,9 @@
                         }
 
                         subTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[subFieldOffset]);
-                        subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset, subTypeTag,
-                                true) + 1;
+                        subFieldLength =
+                                NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset, subTypeTag, true)
+                                        + 1;
 
                         if (pathIndex >= fieldPointables.length - 1) {
                             continue;
@@ -232,8 +229,8 @@
                             return;
                         }
                         if (serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
-                                throw new UnsupportedTypeException(
-                                    BuiltinFunctions.FIELD_ACCESS_NESTED.getName(), serRecord[start]);
+                            throw new UnsupportedTypeException(BuiltinFunctions.FIELD_ACCESS_NESTED.getName(),
+                                    serRecord[start]);
                         }
                     }
                     // emit the final result.
@@ -244,8 +241,8 @@
                         out.write(serRecord, subFieldOffset, subFieldLength);
                         result.set(resultStorage);
                     }
-                } catch (IOException | AsterixException e) {
-                    throw new HyracksDataException(e);
+                } catch (IOException e) {
+                    throw HyracksDataException.create(e);
                 }
             }
         };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldValueEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldValueEvalFactory.java
index c162e3d..95fb91a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldValueEvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldValueEvalFactory.java
@@ -21,9 +21,7 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
-import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
@@ -31,6 +29,7 @@
 import org.apache.asterix.om.types.runtime.RuntimeRecordTypeInfo;
 import org.apache.asterix.om.utils.NonTaggedFormatUtil;
 import org.apache.asterix.om.utils.RecordUtil;
+import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
@@ -107,8 +106,8 @@
                             return;
                         }
                         ATypeTag fieldTypeTag = recordType.getFieldTypes()[subFieldIndex].getTypeTag();
-                        subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset,
-                                fieldTypeTag, false);
+                        subFieldLength =
+                                NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset, fieldTypeTag, false);
                         // write result.
                         out.writeByte(fieldTypeTag.serialize());
                         out.write(serRecord, subFieldOffset, subFieldLength);
@@ -125,16 +124,15 @@
                         return;
                     }
                     // Get the field length.
-                    ATypeTag fieldValueTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                            .deserialize(serRecord[subFieldOffset]);
-                    subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset,
-                            fieldValueTypeTag, true) + 1;
+                    ATypeTag fieldValueTypeTag =
+                            EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[subFieldOffset]);
+                    subFieldLength =
+                            NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset, fieldValueTypeTag, true)
+                                    + 1;
                     // write result.
                     result.set(serRecord, subFieldOffset, subFieldLength);
                 } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                } catch (AsterixException e) {
-                    throw new HyracksDataException(e);
+                    throw HyracksDataException.create(e);
                 }
             }
         };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/FlushDatasetOperatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/FlushDatasetOperatorDescriptor.java
index 85e92c3..3957c06 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/FlushDatasetOperatorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/FlushDatasetOperatorDescriptor.java
@@ -20,8 +20,8 @@
 
 import java.nio.ByteBuffer;
 
-import org.apache.asterix.common.api.INcApplicationContext;
 import org.apache.asterix.common.api.IDatasetLifecycleManager;
+import org.apache.asterix.common.api.INcApplicationContext;
 import org.apache.asterix.common.exceptions.ACIDException;
 import org.apache.asterix.common.transactions.DatasetId;
 import org.apache.asterix.common.transactions.ILockManager;
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/NoTupleSourceRuntimeFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/NoTupleSourceRuntimeFactory.java
deleted file mode 100644
index 377ad60..0000000
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/std/NoTupleSourceRuntimeFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.runtime.operators.std;
-
-import org.apache.hyracks.algebricks.runtime.base.IPushRuntime;
-import org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory;
-import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputSourcePushRuntime;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-public class NoTupleSourceRuntimeFactory implements IPushRuntimeFactory {
-
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public String toString() {
-        return "nts";
-    }
-
-    @Override
-    public IPushRuntime createPushRuntime(IHyracksTaskContext ctx) {
-        return new AbstractOneInputSourcePushRuntime() {
-
-            @Override
-            public void open() throws HyracksDataException {
-                try {
-                    writer.open();
-                } finally {
-                    writer.close();
-                }
-            }
-
-        };
-    }
-
-}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/ScanCollectionDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/ScanCollectionDescriptor.java
index 8ee10dc..3409e61 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/ScanCollectionDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/ScanCollectionDescriptor.java
@@ -21,13 +21,12 @@
 
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.runtime.evaluators.common.ListAccessor;
+import org.apache.asterix.runtime.exceptions.TypeMismatchException;
 import org.apache.asterix.runtime.unnestingfunctions.base.AbstractUnnestingFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -112,9 +111,7 @@
                             }
                         }
                     } catch (IOException e) {
-                        throw new HyracksDataException(e);
-                    } catch (AsterixException e) {
-                        throw new HyracksDataException(e);
+                        throw HyracksDataException.create(e);
                     }
                     return false;
                 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/SubsetCollectionDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/SubsetCollectionDescriptor.java
index 84a59ac..47fbc4f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/SubsetCollectionDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/unnestingfunctions/std/SubsetCollectionDescriptor.java
@@ -20,7 +20,6 @@
 
 import java.io.IOException;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.exceptions.ErrorCode;
 import org.apache.asterix.common.exceptions.RuntimeDataException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
@@ -80,8 +79,7 @@
                         try {
                             evalStart.evaluate(tuple, inputVal);
                             posStart = ATypeHierarchy.getIntegerValue(getIdentifier().getName(), 0,
-                                    inputVal.getByteArray(),
-                                    inputVal.getStartOffset());
+                                    inputVal.getByteArray(), inputVal.getStartOffset());
 
                             evalLen.evaluate(tuple, inputVal);
                             numItems = ATypeHierarchy.getIntegerValue(getIdentifier().getName(), 1,
@@ -128,8 +126,8 @@
                             int offset = inputVal.getStartOffset();
                             int itemLength = 0;
                             try {
-                                int itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, offset,
-                                        posCrt);
+                                int itemOffset =
+                                        AOrderedListSerializerDeserializer.getItemOffset(serList, offset, posCrt);
                                 if (selfDescList) {
                                     itemTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serList[itemOffset]);
                                 }
@@ -141,9 +139,7 @@
                                 resultStorage.getDataOutput().write(serList, itemOffset,
                                         itemLength + (!selfDescList ? 0 : 1));
                             } catch (IOException e) {
-                                throw new HyracksDataException(e);
-                            } catch (AsterixException e) {
-                                throw new HyracksDataException(e);
+                                throw HyracksDataException.create(e);
                             }
                             result.set(resultStorage);
                             ++posCrt;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1814
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie08d6de31d9e928e888137680d9c7af5d66b85ae
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu <buyingyi@gmail.com>

Mime
View raw message