asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject [2/2] asterixdb git commit: Sonar fixes and other clean up items.
Date Sun, 17 Jul 2016 05:18:40 GMT
Sonar fixes and other clean up items.

Change-Id: Ieb72a0fef3c181282cc4c71b881a7cb52da86818
Reviewed-on: https://asterix-gerrit.ics.uci.edu/999
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


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

Branch: refs/heads/master
Commit: bce1888eebdda3e306203d68c0c769a71dae739e
Parents: 196db5d
Author: Preston Carman <prestonc@apache.org>
Authored: Sat Jul 16 09:22:09 2016 -0700
Committer: Preston Carman <prestonc@apache.org>
Committed: Sat Jul 16 22:17:02 2016 -0700

----------------------------------------------------------------------
 ...econdaryIndexSearchExpressionAnnotation.java |  19 +--
 .../nonvisitor/AIntervalPointable.java          |  24 ++--
 .../impl/AIntervalTypeComputer.java             |   2 +-
 .../AbstractComparisonEvaluator.java            |   2 +-
 .../comparisons/ComparisonHelper.java           |  45 +++---
 .../AIntervalConstructorDescriptor.java         |   2 -
 .../AbstractIntervalLogicFuncDescriptor.java    |   4 +-
 .../GetOverlappingIntervalDescriptor.java       |   2 +-
 .../temporal/IntervalAfterDescriptor.java       |   8 +-
 .../temporal/IntervalBeforeDescriptor.java      |   4 +-
 .../temporal/IntervalCoveredByDescriptor.java   |   8 +-
 .../temporal/IntervalCoversDescriptor.java      |   8 +-
 .../temporal/IntervalEndedByDescriptor.java     |   8 +-
 .../temporal/IntervalEndsDescriptor.java        |   4 +-
 .../functions/temporal/IntervalLogic.java       |  56 ++++----
 .../temporal/IntervalMeetsDescriptor.java       |   8 +-
 .../temporal/IntervalMetByDescriptor.java       |   8 +-
 .../IntervalOverlappedByDescriptor.java         |   8 +-
 .../temporal/IntervalOverlapsDescriptor.java    |   8 +-
 .../temporal/IntervalStartedByDescriptor.java   |   8 +-
 .../temporal/IntervalStartsDescriptor.java      |   8 +-
 .../functions/temporal/OverlapDescriptor.java   |  11 +-
 .../AbstractExpressionAnnotation.java           |  35 +++++
 .../ExpressionAnnotationNoCopyImpl.java         |  14 +-
 .../IndexedNLJoinExpressionAnnotation.java      |  18 +--
 .../logical/AbstractLogicalOperator.java        |  37 +++--
 .../operators/logical/ReplicateOperator.java    |  12 +-
 .../physical/AbstractExchangePOperator.java     |   1 +
 .../physical/BroadcastExchangePOperator.java    |   6 +-
 .../physical/OneToOneExchangePOperator.java     |   5 +-
 .../physical/RandomMergeExchangePOperator.java  |   4 +-
 .../operators/physical/ReplicatePOperator.java  |   2 +-
 .../operators/physical/UnionAllPOperator.java   |   3 -
 .../properties/IPartitioningProperty.java       |  21 ++-
 .../typing/PropagatingTypeEnvironment.java      |   4 +-
 .../algebricks/core/jobgen/impl/JobBuilder.java |  49 +++----
 .../PointableBinaryComparatorFactory.java       |   2 +-
 .../hadoop/HadoopMapperOperatorDescriptor.java  |   4 +
 .../hadoop/HadoopReadOperatorDescriptor.java    |   2 +-
 .../mapreduce/MapperOperatorDescriptor.java     |   8 +-
 .../dataflow/std/base/AbstractStateObject.java  |  12 ++
 .../AbstractTuplePointerAccessor.java           |   2 +-
 .../IPartitionedTupleBufferManager.java         |   2 +-
 .../std/buffermanager/ITupleBufferManager.java  |   2 +-
 .../VPartitionTupleBufferManager.java           |   6 +-
 .../VariableDeletableTupleMemoryManager.java    |   8 +-
 .../MToNBroadcastConnectorDescriptor.java       | 136 +++++++++++++++++++
 .../MToNReplicatingConnectorDescriptor.java     | 136 -------------------
 .../std/group/HashSpillableTableFactory.java    |   8 +-
 .../dataflow/std/join/InMemoryHashJoin.java     |  19 ++-
 .../std/misc/SplitOperatorDescriptor.java       |   7 -
 .../dataflow/std/sort/FrameSorterMergeSort.java |   8 +-
 .../dataflow/std/sort/TupleSorterHeapSort.java  |   4 +-
 .../std/structures/SerializableHashTable.java   |  34 ++---
 .../dataflow/std/structures/TuplePointer.java   |  35 +++--
 .../AbstractTupleMemoryManagerTest.java         |   4 +-
 .../VPartitionTupleBufferManagerTest.java       |   4 +-
 .../VariableTupleMemoryManagerTest.java         |   6 +-
 .../structures/SerializableHashTableTest.java   |   2 +-
 .../tests/integration/CountOfCountsTest.java    |   8 +-
 .../TPCHCustomerOrderHashJoinTest.java          |  12 +-
 .../TPCHCustomerOrderNestedLoopJoinTest.java    |  16 +--
 .../common/util/TreeIndexBufferCacheWarmup.java |   3 +-
 .../linearize/HilbertDoubleComparator.java      |   1 -
 .../rtree/linearize/ZCurveDoubleComparator.java |   1 -
 .../common/arraylist/DoubleArrayList.java       |   3 +-
 .../storage/common/arraylist/IntArrayList.java  |   3 +-
 .../storage/common/arraylist/LongArrayList.java |   4 +-
 68 files changed, 494 insertions(+), 474 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/SkipSecondaryIndexSearchExpressionAnnotation.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/SkipSecondaryIndexSearchExpressionAnnotation.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/SkipSecondaryIndexSearchExpressionAnnotation.java
index 0daa551..de1e1fa 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/SkipSecondaryIndexSearchExpressionAnnotation.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/annotations/SkipSecondaryIndexSearchExpressionAnnotation.java
@@ -18,25 +18,14 @@
  */
 package org.apache.asterix.common.annotations;
 
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractExpressionAnnotation;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionAnnotation;
 
-public class SkipSecondaryIndexSearchExpressionAnnotation implements IExpressionAnnotation {
+public class SkipSecondaryIndexSearchExpressionAnnotation extends AbstractExpressionAnnotation {
 
-    public static final String SKIP_SECONDARY_INDEX_SEARCH_ANNOTATION_KEY = "skip-index";
+    public static final String HINT_STRING = "skip-index";
     public static final SkipSecondaryIndexSearchExpressionAnnotation INSTANCE = new SkipSecondaryIndexSearchExpressionAnnotation();
 
-    private Object object;
-
-    @Override
-    public Object getObject() {
-        return object;
-    }
-
-    @Override
-    public void setObject(Object object) {
-        this.object = object;
-    }
-
     @Override
     public IExpressionAnnotation copy() {
         SkipSecondaryIndexSearchExpressionAnnotation clone = new SkipSecondaryIndexSearchExpressionAnnotation();
@@ -46,6 +35,6 @@ public class SkipSecondaryIndexSearchExpressionAnnotation implements IExpression
 
     @Override
     public String toString() {
-        return SKIP_SECONDARY_INDEX_SEARCH_ANNOTATION_KEY;
+        return HINT_STRING;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AIntervalPointable.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AIntervalPointable.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AIntervalPointable.java
index e9b1578..ce04f6d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AIntervalPointable.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AIntervalPointable.java
@@ -19,11 +19,11 @@
 
 package org.apache.asterix.om.pointables.nonvisitor;
 
-import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.util.container.IObjectFactory;
 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;
@@ -95,7 +95,7 @@ public class AIntervalPointable extends AbstractPointable {
         return TAG_SIZE;
     }
 
-    public void getStart(IPointable start) throws AsterixException {
+    public void getStart(IPointable start) throws HyracksDataException {
         start.set(bytes, getStartOffset(), getStartSize());
     }
 
@@ -103,7 +103,7 @@ public class AIntervalPointable extends AbstractPointable {
         return getTypeOffset() + getTypeSize();
     }
 
-    public int getStartSize() throws AsterixException {
+    public int getStartSize() throws HyracksDataException {
         switch (getTypeTag()) {
             case DATE:
             case TIME:
@@ -111,11 +111,11 @@ public class AIntervalPointable extends AbstractPointable {
             case DATETIME:
                 return Long.BYTES;
             default:
-                throw new AsterixException("Unsupported interval type: " + getTypeTag() + ".");
+                throw new HyracksDataException("Unsupported interval type: " + getTypeTag() + ".");
         }
     }
 
-    public long getStartValue() throws AsterixException {
+    public long getStartValue() throws HyracksDataException {
         switch (getTypeTag()) {
             case DATE:
             case TIME:
@@ -123,19 +123,19 @@ public class AIntervalPointable extends AbstractPointable {
             case DATETIME:
                 return LongPointable.getLong(bytes, getStartOffset());
             default:
-                throw new AsterixException("Unsupported interval type: " + getTypeTag() + ".");
+                throw new HyracksDataException("Unsupported interval type: " + getTypeTag() + ".");
         }
     }
 
-    public void getEnd(IPointable start) throws AsterixException {
+    public void getEnd(IPointable start) throws HyracksDataException {
         start.set(bytes, getEndOffset(), getEndSize());
     }
 
-    public int getEndOffset() throws AsterixException {
+    public int getEndOffset() throws HyracksDataException {
         return getStartOffset() + getStartSize();
     }
 
-    public int getEndSize() throws AsterixException {
+    public int getEndSize() throws HyracksDataException {
         switch (getTypeTag()) {
             case DATE:
             case TIME:
@@ -143,11 +143,11 @@ public class AIntervalPointable extends AbstractPointable {
             case DATETIME:
                 return Long.BYTES;
             default:
-                throw new AsterixException("Unsupported interval type: " + getTypeTag() + ".");
+                throw new HyracksDataException("Unsupported interval type: " + getTypeTag() + ".");
         }
     }
 
-    public long getEndValue() throws AsterixException {
+    public long getEndValue() throws HyracksDataException {
         switch (getTypeTag()) {
             case DATE:
             case TIME:
@@ -155,7 +155,7 @@ public class AIntervalPointable extends AbstractPointable {
             case DATETIME:
                 return LongPointable.getLong(bytes, getEndOffset());
             default:
-                throw new AsterixException("Unsupported interval type: " + getTypeTag() + ".");
+                throw new HyracksDataException("Unsupported interval type: " + getTypeTag() + ".");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AIntervalTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AIntervalTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AIntervalTypeComputer.java
index 5b333e5..5430393 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AIntervalTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AIntervalTypeComputer.java
@@ -25,7 +25,7 @@ import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 
 public class AIntervalTypeComputer extends AbstractResultTypeComputer {
-
+    private static final long serialVersionUID = 1L;
     public static final AIntervalTypeComputer INSTANCE = new AIntervalTypeComputer();
 
     private AIntervalTypeComputer() {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/AbstractComparisonEvaluator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/AbstractComparisonEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/AbstractComparisonEvaluator.java
index 04944dc..0ed89dd 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/AbstractComparisonEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/AbstractComparisonEvaluator.java
@@ -133,7 +133,7 @@ public abstract class AbstractComparisonEvaluator implements IScalarEvaluator {
         return ATypeHierarchy.isCompatible(typeTag1, typeTag2);
     }
 
-    protected int compareResults() throws AlgebricksException {
+    protected int compareResults() throws HyracksDataException {
         int result = ch.compare(EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argLeft.getTag()),
                 EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argRight.getTag()), outLeft, outRight);
         return result;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonHelper.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonHelper.java
index f2be58f..8044c83 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonHelper.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonHelper.java
@@ -37,7 +37,6 @@ import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserial
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.accessors.PointableBinaryComparatorFactory;
@@ -73,7 +72,7 @@ public class ComparisonHelper implements Serializable {
             ByteArrayPointable.FACTORY).createBinaryComparator();
 
     public int compare(ATypeTag typeTag1, ATypeTag typeTag2, IPointable arg1, IPointable arg2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         switch (typeTag1) {
             case INT8:
                 return compareInt8WithArg(typeTag2, arg1, arg2);
@@ -97,9 +96,9 @@ public class ComparisonHelper implements Serializable {
     }
 
     private int compareStrongTypedWithArg(ATypeTag expectedTypeTag, ATypeTag actualTypeTag, IPointable arg1,
-            IPointable arg2) throws AlgebricksException {
+            IPointable arg2) throws HyracksDataException {
         if (expectedTypeTag != actualTypeTag) {
-            throw new AlgebricksException(
+            throw new HyracksDataException(
                     "Comparison is undefined between " + expectedTypeTag + " and " + actualTypeTag + ".");
         }
         int result = 0;
@@ -164,38 +163,38 @@ public class ComparisonHelper implements Serializable {
                             rightLen);
                     break;
                 default:
-                    throw new AlgebricksException("Comparison for " + actualTypeTag + " is not supported.");
+                    throw new HyracksDataException("Comparison for " + actualTypeTag + " is not supported.");
             }
         } catch (HyracksDataException e) {
-            throw new AlgebricksException(e);
+            throw new HyracksDataException(e);
         }
         return result;
     }
 
-    private int compareBooleanWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareBooleanWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         if (typeTag2 == ATypeTag.BOOLEAN) {
             byte b0 = arg1.getByteArray()[arg1.getStartOffset()];
             byte b1 = arg2.getByteArray()[arg2.getStartOffset()];
             return compareByte(b0, b1);
         }
-        throw new AlgebricksException("Comparison is undefined between types ABoolean and " + typeTag2 + " .");
+        throw new HyracksDataException("Comparison is undefined between types ABoolean and " + typeTag2 + " .");
     }
 
-    private int compareStringWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareStringWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         if (typeTag2 == ATypeTag.STRING) {
             int result;
             try {
                 result = strBinaryComp.compare(arg1.getByteArray(), arg1.getStartOffset(), arg1.getLength() - 1,
                         arg2.getByteArray(), arg2.getStartOffset(), arg2.getLength() - 1);
             } catch (HyracksDataException e) {
-                throw new AlgebricksException(e);
+                throw new HyracksDataException(e);
             }
             return result;
         }
-        throw new AlgebricksException("Comparison is undefined between types AString and " + typeTag2 + " .");
+        throw new HyracksDataException("Comparison is undefined between types AString and " + typeTag2 + " .");
     }
 
-    private int compareDoubleWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareDoubleWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         byte[] leftBytes = arg1.getByteArray();
         int leftOffset = arg1.getStartOffset();
         byte[] rightBytes = arg2.getByteArray();
@@ -228,12 +227,12 @@ public class ComparisonHelper implements Serializable {
                 return compareDouble(s, v2);
             }
             default: {
-                throw new AlgebricksException("Comparison is undefined between types ADouble and " + typeTag2 + " .");
+                throw new HyracksDataException("Comparison is undefined between types ADouble and " + typeTag2 + " .");
             }
         }
     }
 
-    private int compareFloatWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareFloatWithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         byte[] leftBytes = arg1.getByteArray();
         int leftOffset = arg1.getStartOffset();
         byte[] rightBytes = arg2.getByteArray();
@@ -266,12 +265,12 @@ public class ComparisonHelper implements Serializable {
                 return compareDouble(s, v2);
             }
             default: {
-                throw new AlgebricksException("Comparison is undefined between types AFloat and " + typeTag2 + " .");
+                throw new HyracksDataException("Comparison is undefined between types AFloat and " + typeTag2 + " .");
             }
         }
     }
 
-    private int compareInt64WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareInt64WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         byte[] leftBytes = arg1.getByteArray();
         int leftOffset = arg1.getStartOffset();
         byte[] rightBytes = arg2.getByteArray();
@@ -304,12 +303,12 @@ public class ComparisonHelper implements Serializable {
                 return compareDouble(s, v2);
             }
             default: {
-                throw new AlgebricksException("Comparison is undefined between types AInt64 and " + typeTag2 + " .");
+                throw new HyracksDataException("Comparison is undefined between types AInt64 and " + typeTag2 + " .");
             }
         }
     }
 
-    private int compareInt32WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareInt32WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         byte[] leftBytes = arg1.getByteArray();
         int leftOffset = arg1.getStartOffset();
         byte[] rightBytes = arg2.getByteArray();
@@ -342,12 +341,12 @@ public class ComparisonHelper implements Serializable {
                 return compareDouble(s, v2);
             }
             default: {
-                throw new AlgebricksException("Comparison is undefined between types AInt32 and " + typeTag2 + " .");
+                throw new HyracksDataException("Comparison is undefined between types AInt32 and " + typeTag2 + " .");
             }
         }
     }
 
-    private int compareInt16WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareInt16WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         byte[] leftBytes = arg1.getByteArray();
         int leftOffset = arg1.getStartOffset();
         byte[] rightBytes = arg2.getByteArray();
@@ -380,12 +379,12 @@ public class ComparisonHelper implements Serializable {
                 return compareDouble(s, v2);
             }
             default: {
-                throw new AlgebricksException("Comparison is undefined between types AInt16 and " + typeTag2 + " .");
+                throw new HyracksDataException("Comparison is undefined between types AInt16 and " + typeTag2 + " .");
             }
         }
     }
 
-    private int compareInt8WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws AlgebricksException {
+    private int compareInt8WithArg(ATypeTag typeTag2, IPointable arg1, IPointable arg2) throws HyracksDataException {
         byte[] leftBytes = arg1.getByteArray();
         int leftStart = arg1.getStartOffset();
         byte[] rightBytes = arg2.getByteArray();
@@ -418,7 +417,7 @@ public class ComparisonHelper implements Serializable {
                 return compareDouble(s, v2);
             }
             default: {
-                throw new AlgebricksException("Comparison is undefined between types AInt16 and " + typeTag2 + " .");
+                throw new HyracksDataException("Comparison is undefined between types AInt16 and " + typeTag2 + " .");
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalConstructorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalConstructorDescriptor.java
index ccfdb43..58a65e4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalConstructorDescriptor.java
@@ -125,8 +125,6 @@ public class AIntervalConstructorDescriptor extends AbstractScalarFunctionDynami
                             intervalSerde.serialize(aInterval, out);
                         } catch (IOException e1) {
                             throw new AlgebricksException(errorMessage);
-                        } catch (Exception e2) {
-                            throw new AlgebricksException(e2);
                         }
                         result.set(resultStorage);
                     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AbstractIntervalLogicFuncDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AbstractIntervalLogicFuncDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AbstractIntervalLogicFuncDescriptor.java
index 413459b..b016fac 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AbstractIntervalLogicFuncDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AbstractIntervalLogicFuncDescriptor.java
@@ -39,7 +39,7 @@ import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 public abstract class AbstractIntervalLogicFuncDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
     @Override
     public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
@@ -109,6 +109,6 @@ public abstract class AbstractIntervalLogicFuncDescriptor extends AbstractScalar
     }
 
     protected abstract boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException;
+            throws HyracksDataException;
 
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetOverlappingIntervalDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetOverlappingIntervalDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetOverlappingIntervalDescriptor.java
index 1de1e48..d4e3b5f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetOverlappingIntervalDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetOverlappingIntervalDescriptor.java
@@ -108,7 +108,7 @@ public class GetOverlappingIntervalDescriptor extends AbstractScalarFunctionDyna
                                             + interval0.getTypeTag() + " and interval of " + interval1.getTypeTag());
                                 }
 
-                                if (il.overlap(interval0, interval1) || il.overlappedBy(interval0, interval1)
+                                if (il.overlaps(interval0, interval1) || il.overlappedBy(interval0, interval1)
                                         || il.covers(interval0, interval1) || il.coveredBy(interval0, interval1)) {
                                     long start = Math.max(interval0.getStartValue(), interval1.getStartValue());
                                     long end = Math.min(interval0.getEndValue(), interval1.getEndValue());

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalAfterDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalAfterDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalAfterDescriptor.java
index 748c74f..90250fb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalAfterDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalAfterDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalAfterDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalAfterDescriptor extends AbstractIntervalLogicFuncDescriptor
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.after(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBeforeDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBeforeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBeforeDescriptor.java
index 31189c6..7cb91d9 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBeforeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBeforeDescriptor.java
@@ -22,8 +22,8 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalBeforeDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
@@ -44,7 +44,7 @@ public class IntervalBeforeDescriptor extends AbstractIntervalLogicFuncDescripto
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.before(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoveredByDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoveredByDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoveredByDescriptor.java
index 3cb0b73..d3bae2e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoveredByDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoveredByDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalCoveredByDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalCoveredByDescriptor extends AbstractIntervalLogicFuncDescri
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.coveredBy(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoversDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoversDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoversDescriptor.java
index d586885..455403f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoversDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalCoversDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalCoversDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalCoversDescriptor extends AbstractIntervalLogicFuncDescripto
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.covers(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndedByDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndedByDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndedByDescriptor.java
index 1a224f7..a930980 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndedByDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndedByDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalEndedByDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalEndedByDescriptor extends AbstractIntervalLogicFuncDescript
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.endedBy(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java
index 9571787..d171138 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java
@@ -22,8 +22,8 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalEndsDescriptor extends AbstractIntervalLogicFuncDescriptor {
     private static final long serialVersionUID = 1L;
@@ -43,7 +43,7 @@ public class IntervalEndsDescriptor extends AbstractIntervalLogicFuncDescriptor
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.ends(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
index c8c3486..23f0da3 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
@@ -22,11 +22,11 @@ import java.io.Serializable;
 
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
 import org.apache.asterix.runtime.evaluators.comparisons.ComparisonHelper;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 
-public class IntervalLogic implements Serializable{
+public class IntervalLogic implements Serializable {
 
     private static final long serialVersionUID = 1L;
     private final ComparisonHelper ch = new ComparisonHelper();
@@ -35,7 +35,7 @@ public class IntervalLogic implements Serializable{
     private final IPointable s2 = VoidPointable.FACTORY.createPointable();
     private final IPointable e2 = VoidPointable.FACTORY.createPointable();
 
-    public boolean validateInterval(AIntervalPointable ip1) throws AlgebricksException {
+    public boolean validateInterval(AIntervalPointable ip1) throws HyracksDataException {
         ip1.getStart(s1);
         ip1.getEnd(e1);
         return ch.compare(ip1.getTypeTag(), ip1.getTypeTag(), s1, e1) <= 0;
@@ -47,16 +47,16 @@ public class IntervalLogic implements Serializable{
      * @param ip1
      * @param ip2
      * @return boolean
-     * @throws AlgebricksException
+     * @throws HyracksDataException
      * @see #after(AIntervalPointable, AIntervalPointable)
      */
-    public boolean before(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean before(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getEnd(e1);
         ip2.getStart(s2);
         return ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, s2) < 0;
     }
 
-    public boolean after(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean after(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         return before(ip2, ip1);
     }
 
@@ -66,16 +66,16 @@ public class IntervalLogic implements Serializable{
      * @param ip1
      * @param ip2
      * @return boolean
-     * @throws AlgebricksException
+     * @throws HyracksDataException
      * @see #metBy(AIntervalPointable, AIntervalPointable)
      */
-    public boolean meets(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean meets(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getEnd(e1);
         ip2.getStart(s2);
         return ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, s2) == 0;
     }
 
-    public boolean metBy(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean metBy(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         return meets(ip2, ip1);
     }
 
@@ -85,10 +85,10 @@ public class IntervalLogic implements Serializable{
      * @param ip1
      * @param ip2
      * @return boolean
-     * @throws AlgebricksException
+     * @throws HyracksDataException
      * @see #overlappedBy(AIntervalPointable, AIntervalPointable)
      */
-    public boolean overlaps(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean overlaps(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getStart(s1);
         ip1.getEnd(e1);
         ip2.getStart(s2);
@@ -98,7 +98,7 @@ public class IntervalLogic implements Serializable{
                 && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, e2) < 0;
     }
 
-    public boolean overlappedBy(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean overlappedBy(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         return overlaps(ip2, ip1);
     }
 
@@ -107,10 +107,10 @@ public class IntervalLogic implements Serializable{
      *
      * @param ip1
      * @param ip2
-     * @throws AlgebricksException
+     * @throws HyracksDataException
      * @return boolean
      */
-    public boolean overlap(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean overlapping(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getStart(s1);
         ip1.getEnd(e1);
         ip2.getStart(s2);
@@ -127,10 +127,10 @@ public class IntervalLogic implements Serializable{
      * @param ip1
      * @param ip2
      * @return boolean
-     * @throws AlgebricksException
+     * @throws HyracksDataException
      * @see #startedBy(AIntervalPointable, AIntervalPointable)
      */
-    public boolean starts(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean starts(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getStart(s1);
         ip1.getEnd(e1);
         ip2.getStart(s2);
@@ -139,7 +139,7 @@ public class IntervalLogic implements Serializable{
                 && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, e2) <= 0;
     }
 
-    public boolean startedBy(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean startedBy(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         return starts(ip2, ip1);
     }
 
@@ -149,10 +149,10 @@ public class IntervalLogic implements Serializable{
      * @param ip1
      * @param ip2
      * @return boolean
-     * @throws AlgebricksException
+     * @throws HyracksDataException
      * @see #coveredBy(AIntervalPointable, AIntervalPointable)
      */
-    public boolean covers(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean covers(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getStart(s1);
         ip1.getEnd(e1);
         ip2.getStart(s2);
@@ -161,7 +161,7 @@ public class IntervalLogic implements Serializable{
                 && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, e2) >= 0;
     }
 
-    public boolean coveredBy(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean coveredBy(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         return covers(ip2, ip1);
     }
 
@@ -171,10 +171,10 @@ public class IntervalLogic implements Serializable{
      * @param ip1
      * @param ip2
      * @return boolean
-     * @throws AlgebricksException
+     * @throws HyracksDataException
      * @see #endedBy(AIntervalPointable, AIntervalPointable)
      */
-    public boolean ends(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean ends(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getStart(s1);
         ip1.getEnd(e1);
         ip2.getStart(s2);
@@ -183,11 +183,19 @@ public class IntervalLogic implements Serializable{
                 && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, e2) == 0;
     }
 
-    public boolean endedBy(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    public boolean endedBy(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         return ends(ip2, ip1);
     }
 
-    public boolean equals(AIntervalPointable ip1, AIntervalPointable ip2) throws AlgebricksException {
+    /**
+     * Intervals with the same start and end time.
+     *
+     * @param ip1
+     * @param ip2
+     * @return boolean
+     * @throws HyracksDataException
+     */
+    public boolean same(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
         ip1.getStart(s1);
         ip1.getEnd(e1);
         ip2.getStart(s2);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMeetsDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMeetsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMeetsDescriptor.java
index 288853c..4faf155 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMeetsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMeetsDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalMeetsDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalMeetsDescriptor extends AbstractIntervalLogicFuncDescriptor
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.meets(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMetByDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMetByDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMetByDescriptor.java
index 2985699..26e71a0 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMetByDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMetByDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalMetByDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalMetByDescriptor extends AbstractIntervalLogicFuncDescriptor
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.metBy(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlappedByDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlappedByDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlappedByDescriptor.java
index 3e0a4e5..ddb5b1b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlappedByDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlappedByDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalOverlappedByDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalOverlappedByDescriptor extends AbstractIntervalLogicFuncDes
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.overlappedBy(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlapsDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlapsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlapsDescriptor.java
index de5bd53..a7abfc5 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlapsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalOverlapsDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalOverlapsDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalOverlapsDescriptor extends AbstractIntervalLogicFuncDescrip
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.overlaps(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartedByDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartedByDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartedByDescriptor.java
index d609b6a..81aea4a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartedByDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartedByDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalStartedByDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalStartedByDescriptor extends AbstractIntervalLogicFuncDescri
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.startedBy(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartsDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartsDescriptor.java
index 656c161..17fbaff 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalStartsDescriptor.java
@@ -22,14 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class IntervalStartsDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -44,7 +44,7 @@ public class IntervalStartsDescriptor extends AbstractIntervalLogicFuncDescripto
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
+            throws HyracksDataException {
         return il.starts(ip1, ip2);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapDescriptor.java
index 7d3fe3f..d27459e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapDescriptor.java
@@ -22,15 +22,14 @@ import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class OverlapDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
-    private final static long serialVersionUID = 1L;
-
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    private static final long serialVersionUID = 1L;
 
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
             return new OverlapDescriptor();
@@ -44,8 +43,8 @@ public class OverlapDescriptor extends AbstractIntervalLogicFuncDescriptor {
 
     @Override
     protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
-        return il.overlap(ip1, ip2);
+            throws HyracksDataException {
+        return il.overlapping(ip1, ip2);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/AbstractExpressionAnnotation.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/AbstractExpressionAnnotation.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/AbstractExpressionAnnotation.java
new file mode 100644
index 0000000..de02572
--- /dev/null
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/AbstractExpressionAnnotation.java
@@ -0,0 +1,35 @@
+/*
+ * 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.hyracks.algebricks.core.algebra.expressions;
+
+public abstract class AbstractExpressionAnnotation implements IExpressionAnnotation {
+
+    protected Object object;
+
+    @Override
+    public Object getObject() {
+        return object;
+    }
+
+    @Override
+    public void setObject(Object object) {
+        this.object = object;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ExpressionAnnotationNoCopyImpl.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ExpressionAnnotationNoCopyImpl.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ExpressionAnnotationNoCopyImpl.java
index 140dfb1..3aa34c8 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ExpressionAnnotationNoCopyImpl.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ExpressionAnnotationNoCopyImpl.java
@@ -18,23 +18,11 @@
  */
 package org.apache.hyracks.algebricks.core.algebra.expressions;
 
-public class ExpressionAnnotationNoCopyImpl implements IExpressionAnnotation {
-
-    private Object object;
+public class ExpressionAnnotationNoCopyImpl extends AbstractExpressionAnnotation {
 
     @Override
     public IExpressionAnnotation copy() {
         return this;
     }
 
-    @Override
-    public Object getObject() {
-        return object;
-    }
-
-    @Override
-    public void setObject(Object object) {
-        this.object = object;
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IndexedNLJoinExpressionAnnotation.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IndexedNLJoinExpressionAnnotation.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IndexedNLJoinExpressionAnnotation.java
index a38a96c..91c0a8b 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IndexedNLJoinExpressionAnnotation.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IndexedNLJoinExpressionAnnotation.java
@@ -18,23 +18,11 @@
  */
 package org.apache.hyracks.algebricks.core.algebra.expressions;
 
-public class IndexedNLJoinExpressionAnnotation implements IExpressionAnnotation {
+public class IndexedNLJoinExpressionAnnotation extends AbstractExpressionAnnotation {
 
-    public static final String INDEXED_NL_JOIN_ANNOTATION_KEY = "indexnl";
+    public static final String HINT_STRING = "indexnl";
     public static final IndexedNLJoinExpressionAnnotation INSTANCE = new IndexedNLJoinExpressionAnnotation();
 
-    private Object object;
-
-    @Override
-    public Object getObject() {
-        return object;
-    }
-
-    @Override
-    public void setObject(Object object) {
-        this.object = object;
-    }
-
     @Override
     public IExpressionAnnotation copy() {
         IndexedNLJoinExpressionAnnotation clone = new IndexedNLJoinExpressionAnnotation();
@@ -44,6 +32,6 @@ public class IndexedNLJoinExpressionAnnotation implements IExpressionAnnotation
 
     @Override
     public String toString() {
-        return INDEXED_NL_JOIN_ANNOTATION_KEY;
+        return HINT_STRING;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
index 1a7e224..4686f32 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
@@ -43,32 +43,34 @@ import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenContext;
 
 public abstract class AbstractLogicalOperator implements ILogicalOperator {
 
-    /*********************************************************************
-     * UNPARTITIONED, the input data is not partitioned
-     * PARTITIONED, the input data is partitioned, the operator is executed on
-     * each partition and may receive input from other partitions (e.g. if it is
-     * a join or an aggregate)
-     * LOCAL, the input data is partitioned, the operator is executed on each
-     * partition and only processes data from that partition
-     */
-
-    public static enum ExecutionMode {
+    public enum ExecutionMode {
+        /**
+         * UNPARTITIONED, the input data is not partitioned
+         */
         UNPARTITIONED,
+        /**
+         * PARTITIONED, the input data is partitioned, the operator is executed on
+         * each partition and may receive input from other partitions (e.g. if it is
+         * a join or an aggregate)
+         */
         PARTITIONED,
+        /**
+         * LOCAL, the input data is partitioned, the operator is executed on each
+         * partition and only processes data from that partition
+         */
         LOCAL
     }
 
     private AbstractLogicalOperator.ExecutionMode mode = AbstractLogicalOperator.ExecutionMode.UNPARTITIONED;
     protected IPhysicalOperator physicalOperator;
-    private final Map<String, Object> annotations = new HashMap<String, Object>();
+    private final Map<String, Object> annotations = new HashMap<>();
     private boolean bJobGenEnabled = true;
 
-    final protected List<Mutable<ILogicalOperator>> inputs;
-    // protected List<LogicalOperatorReference> outputs;
+    protected final List<Mutable<ILogicalOperator>> inputs;
     protected List<LogicalVariable> schema;
 
     public AbstractLogicalOperator() {
-        inputs = new ArrayList<Mutable<ILogicalOperator>>();
+        inputs = new ArrayList<>();
     }
 
     @Override
@@ -134,11 +136,6 @@ public abstract class AbstractLogicalOperator implements ILogicalOperator {
         return inputs;
     }
 
-    // @Override
-    // public final List<LogicalOperatorReference> getOutputs() {
-    // return outputs;
-    // }
-
     @Override
     public final boolean hasInputs() {
         return !inputs.isEmpty();
@@ -161,7 +158,7 @@ public abstract class AbstractLogicalOperator implements ILogicalOperator {
     @Override
     public final void contributeRuntimeOperator(IHyracksJobBuilder builder, JobGenContext context,
             IOperatorSchema propagatedSchema, IOperatorSchema[] inputSchemas, IOperatorSchema outerPlanSchema)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         if (bJobGenEnabled) {
             if (physicalOperator == null) {
                 throw new AlgebricksException("Physical operator not set for operator: " + this);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/ReplicateOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/ReplicateOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/ReplicateOperator.java
index 343ace8..834107c 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/ReplicateOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/ReplicateOperator.java
@@ -34,20 +34,20 @@ import org.apache.hyracks.algebricks.core.algebra.visitors.ILogicalOperatorVisit
 
 public class ReplicateOperator extends AbstractLogicalOperator {
 
-    private int outputArity = 2;
-    private boolean[] outputMaterializationFlags = new boolean[outputArity];
+    private int outputArity;
+    private boolean[] outputMaterializationFlags;
     private List<Mutable<ILogicalOperator>> outputs;
 
     public ReplicateOperator(int outputArity) {
         this.outputArity = outputArity;
         this.outputMaterializationFlags = new boolean[outputArity];
-        this.outputs = new ArrayList<Mutable<ILogicalOperator>>();
+        this.outputs = new ArrayList<>();
     }
 
     public ReplicateOperator(int outputArity, boolean[] outputMaterializationFlags) {
         this.outputArity = outputArity;
         this.outputMaterializationFlags = outputMaterializationFlags;
-        this.outputs = new ArrayList<Mutable<ILogicalOperator>>();
+        this.outputs = new ArrayList<>();
     }
 
     @Override
@@ -89,10 +89,6 @@ public class ReplicateOperator extends AbstractLogicalOperator {
         return outputArity;
     }
 
-    public int setOutputArity(int outputArity) {
-        return this.outputArity = outputArity;
-    }
-
     public void setOutputMaterializationFlags(boolean[] outputMaterializationFlags) {
         this.outputMaterializationFlags = outputMaterializationFlags;
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractExchangePOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractExchangePOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractExchangePOperator.java
index aad0cf3..799a6af 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractExchangePOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractExchangePOperator.java
@@ -29,6 +29,7 @@ import org.apache.hyracks.api.dataflow.IConnectorDescriptor;
 import org.apache.hyracks.api.job.IConnectorDescriptorRegistry;
 
 public abstract class AbstractExchangePOperator extends AbstractPhysicalOperator {
+    @Override
     public void contributeRuntimeOperator(IHyracksJobBuilder builder, JobGenContext context, ILogicalOperator op,
             IOperatorSchema opSchema, IOperatorSchema[] inputSchemas, IOperatorSchema outerPlanSchema)
             throws AlgebricksException {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/BroadcastExchangePOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/BroadcastExchangePOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/BroadcastExchangePOperator.java
index d9e1540..835cc14 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/BroadcastExchangePOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/BroadcastExchangePOperator.java
@@ -37,7 +37,7 @@ import org.apache.hyracks.algebricks.core.algebra.properties.StructuralPropertie
 import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenContext;
 import org.apache.hyracks.api.dataflow.IConnectorDescriptor;
 import org.apache.hyracks.api.job.IConnectorDescriptorRegistry;
-import org.apache.hyracks.dataflow.std.connectors.MToNReplicatingConnectorDescriptor;
+import org.apache.hyracks.dataflow.std.connectors.MToNBroadcastConnectorDescriptor;
 
 public class BroadcastExchangePOperator extends AbstractExchangePOperator {
 
@@ -68,8 +68,8 @@ public class BroadcastExchangePOperator extends AbstractExchangePOperator {
     @Override
     public Pair<IConnectorDescriptor, TargetConstraint> createConnectorDescriptor(IConnectorDescriptorRegistry spec,
             ILogicalOperator op, IOperatorSchema opSchema, JobGenContext context) throws AlgebricksException {
-        IConnectorDescriptor conn = new MToNReplicatingConnectorDescriptor(spec);
-        return new Pair<IConnectorDescriptor, TargetConstraint>(conn, null);
+        IConnectorDescriptor conn = new MToNBroadcastConnectorDescriptor(spec);
+        return new Pair<>(conn, null);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/OneToOneExchangePOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/OneToOneExchangePOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/OneToOneExchangePOperator.java
index 818e1ec..083e4d3 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/OneToOneExchangePOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/OneToOneExchangePOperator.java
@@ -35,9 +35,6 @@ import org.apache.hyracks.dataflow.std.connectors.OneToOneConnectorDescriptor;
 
 public class OneToOneExchangePOperator extends AbstractExchangePOperator {
 
-    public OneToOneExchangePOperator() {
-    }
-
     @Override
     public PhysicalOperatorTag getOperatorTag() {
         return PhysicalOperatorTag.ONE_TO_ONE_EXCHANGE;
@@ -59,7 +56,7 @@ public class OneToOneExchangePOperator extends AbstractExchangePOperator {
     public Pair<IConnectorDescriptor, TargetConstraint> createConnectorDescriptor(IConnectorDescriptorRegistry spec,
             ILogicalOperator op, IOperatorSchema opSchema, JobGenContext context) {
         IConnectorDescriptor conn = new OneToOneConnectorDescriptor(spec);
-        return new Pair<IConnectorDescriptor, TargetConstraint>(conn, TargetConstraint.SAME_COUNT);
+        return new Pair<>(conn, TargetConstraint.SAME_COUNT);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/RandomMergeExchangePOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/RandomMergeExchangePOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/RandomMergeExchangePOperator.java
index e11a64f..aedf046 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/RandomMergeExchangePOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/RandomMergeExchangePOperator.java
@@ -34,7 +34,7 @@ import org.apache.hyracks.algebricks.core.algebra.properties.StructuralPropertie
 import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenContext;
 import org.apache.hyracks.api.dataflow.IConnectorDescriptor;
 import org.apache.hyracks.api.job.IConnectorDescriptorRegistry;
-import org.apache.hyracks.dataflow.std.connectors.MToNReplicatingConnectorDescriptor;
+import org.apache.hyracks.dataflow.std.connectors.MToNBroadcastConnectorDescriptor;
 
 public class RandomMergeExchangePOperator extends AbstractExchangePOperator {
 
@@ -58,7 +58,7 @@ public class RandomMergeExchangePOperator extends AbstractExchangePOperator {
     @Override
     public Pair<IConnectorDescriptor, TargetConstraint> createConnectorDescriptor(IConnectorDescriptorRegistry spec,
             ILogicalOperator op, IOperatorSchema opSchema, JobGenContext context) {
-        IConnectorDescriptor conn = new MToNReplicatingConnectorDescriptor(spec);
+        IConnectorDescriptor conn = new MToNBroadcastConnectorDescriptor(spec);
         return new Pair<IConnectorDescriptor, TargetConstraint>(conn, TargetConstraint.ONE);
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/ReplicatePOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/ReplicatePOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/ReplicatePOperator.java
index 14a8f16..db778f7 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/ReplicatePOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/ReplicatePOperator.java
@@ -89,7 +89,7 @@ public class ReplicatePOperator extends AbstractPhysicalOperator {
                 outputDependencyLabels[i] = 1;
             }
         }
-        return new Pair<int[], int[]>(inputDependencyLabels, outputDependencyLabels);
+        return new Pair<>(inputDependencyLabels, outputDependencyLabels);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/UnionAllPOperator.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/UnionAllPOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/UnionAllPOperator.java
index e6517d0..823294e 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/UnionAllPOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/UnionAllPOperator.java
@@ -21,15 +21,12 @@ package org.apache.hyracks.algebricks.core.algebra.operators.physical;
 import java.util.ArrayList;
 
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.utils.Triple;
 import org.apache.hyracks.algebricks.core.algebra.base.IHyracksJobBuilder;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
 import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
-import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
 import org.apache.hyracks.algebricks.core.algebra.base.PhysicalOperatorTag;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.IOperatorSchema;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.UnionAllOperator;
 import org.apache.hyracks.algebricks.core.algebra.properties.ILocalStructuralProperty;
 import org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty;
 import org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningRequirementsCoordinator;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/bce1888e/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/IPartitioningProperty.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/IPartitioningProperty.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/IPartitioningProperty.java
index 0b7cb3e..20e6215 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/IPartitioningProperty.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/IPartitioningProperty.java
@@ -26,11 +26,30 @@ import org.apache.hyracks.algebricks.core.algebra.base.EquivalenceClass;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
 
 public interface IPartitioningProperty extends IStructuralProperty {
-    enum PartitioningType {
+    /**
+     * The Partitioning Types define the method data is transfered between partitions and/or properties of the data.
+     */
+    public enum PartitioningType {
+        /**
+         * Data is not partitioned.
+         */
         UNPARTITIONED,
+        /**
+         * Data is partitioned without a repeatable method.
+         */
         RANDOM,
+        /**
+         * Data is replicated to all partitions.
+         */
         BROADCAST,
+        /**
+         * Data is hash partitioned.
+         */
         UNORDERED_PARTITIONED,
+        /**
+         * Data is range partitioned (only used on data that has a total order).
+         * The partitions are order based on the data range.
+         */
         ORDERED_PARTITIONED
     }
 


Mime
View raw message