diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/jobgen/QueryLogicalExpressionJobGen.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/jobgen/QueryLogicalExpressionJobGen.java
index f4a926c..37f59dd 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/jobgen/QueryLogicalExpressionJobGen.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/jobgen/QueryLogicalExpressionJobGen.java
@@ -26,7 +26,6 @@
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IExternalFunctionInfo;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
-import org.apache.asterix.runtime.evaluators.comparisons.ComparisonEvalFactory;
 import org.apache.asterix.runtime.formats.FormatUtils;
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -40,14 +39,11 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.StatefulFunctionCallExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.UnnestingFunctionCallExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
-import org.apache.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions;
-import org.apache.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions.ComparisonKind;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.IOperatorSchema;
 import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenContext;
 import org.apache.hyracks.algebricks.runtime.base.IAggregateEvaluatorFactory;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IRunningAggregateEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.base.IUnnestingEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.evaluators.ColumnAccessEvalFactory;
@@ -62,7 +58,7 @@
     @Override
     public IAggregateEvaluatorFactory createAggregateFunctionFactory(AggregateFunctionCallExpression expr,
             IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         IScalarEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
         IFunctionDescriptor fd = getFunctionDescriptor(expr, env, context);
         switch (fd.getFunctionDescriptorTag()) {
@@ -78,9 +74,9 @@
     }
 
     @Override
-    public IRunningAggregateEvaluatorFactory createRunningAggregateFunctionFactory(
-            StatefulFunctionCallExpression expr, IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas,
-            JobGenContext context) throws AlgebricksException {
+    public IRunningAggregateEvaluatorFactory createRunningAggregateFunctionFactory(StatefulFunctionCallExpression expr,
+            IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
+            throws AlgebricksException {
         IScalarEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
         return getFunctionDescriptor(expr, env, context).createRunningAggregateEvaluatorFactory(args);
     }
@@ -88,7 +84,7 @@
     @Override
     public IUnnestingEvaluatorFactory createUnnestingFunctionFactory(UnnestingFunctionCallExpression expr,
             IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         IScalarEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
         return getFunctionDescriptor(expr, env, context).createUnnestingEvaluatorFactory(args);
     }
@@ -133,14 +129,8 @@
 
     private IScalarEvaluatorFactory createScalarFunctionEvaluatorFactory(AbstractFunctionCallExpression expr,
             IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         IScalarEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
-        FunctionIdentifier fi = expr.getFunctionIdentifier();
-        ComparisonKind ck = AlgebricksBuiltinFunctions.getComparisonType(fi);
-        if (ck != null) {
-            return new ComparisonEvalFactory(args[0], args[1], ck);
-        }
-
         IFunctionDescriptor fd = null;
         if (!(expr.getFunctionInfo() instanceof IExternalFunctionInfo)) {
             IDataFormat format = FormatUtils.getDefaultFormat();
@@ -158,8 +148,9 @@
         return format.getConstantEvalFactory(expr.getValue());
     }
 
-    private IScalarEvaluatorFactory[] codegenArguments(AbstractFunctionCallExpression expr, IVariableTypeEnvironment env,
-            IOperatorSchema[] inputSchemas, JobGenContext context) throws AlgebricksException {
+    private IScalarEvaluatorFactory[] codegenArguments(AbstractFunctionCallExpression expr,
+            IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
+            throws AlgebricksException {
         List<Mutable<ILogicalExpression>> arguments = expr.getArguments();
         int n = arguments.size();
         IScalarEvaluatorFactory[] args = new IScalarEvaluatorFactory[n];
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ByNameToByIndexFieldAccessRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ByNameToByIndexFieldAccessRule.java
index 20bfea5..b4f8ac3 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ByNameToByIndexFieldAccessRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ByNameToByIndexFieldAccessRule.java
@@ -19,7 +19,6 @@
 
 package org.apache.asterix.optimizer.rules;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -85,9 +84,9 @@
             ILogicalExpression a0 = fce.getArguments().get(0).getValue();
             if (a0.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
                 LogicalVariable var1 = context.newVar();
-                ArrayList<LogicalVariable> varArray = new ArrayList<LogicalVariable>(1);
+                ArrayList<LogicalVariable> varArray = new ArrayList<>(1);
                 varArray.add(var1);
-                ArrayList<Mutable<ILogicalExpression>> exprArray = new ArrayList<Mutable<ILogicalExpression>>(1);
+                ArrayList<Mutable<ILogicalExpression>> exprArray = new ArrayList<>(1);
                 exprArray.add(new MutableObject<ILogicalExpression>(a0));
                 AssignOperator assignVar = new AssignOperator(varArray, exprArray);
                 fce.getArguments().get(0).setValue(new VariableReferenceExpression(var1));
@@ -100,44 +99,37 @@
             }
 
             IAType t = (IAType) env.getType(fce.getArguments().get(0).getValue());
-            try {
-                switch (t.getTypeTag()) {
-                    case ANY: {
-                        return false || changed;
+            switch (t.getTypeTag()) {
+                case ANY:
+                    return changed;
+                case RECORD:
+                    ARecordType recType = (ARecordType) t;
+                    ILogicalExpression fai = createFieldAccessByIndex(recType, fce);
+                    if (fai == null) {
+                        return changed;
                     }
-                    case RECORD: {
-                        ARecordType recType = (ARecordType) t;
-                        ILogicalExpression fai = createFieldAccessByIndex(recType, fce);
-                        if (fai == null) {
-                            return false || changed;
-                        }
-                        expressions.get(i).setValue(fai);
-                        changed = true;
-                        break;
-                    }
-                    case UNION: {
-                        AUnionType unionT = (AUnionType) t;
-                        if (unionT.isNullableType()) {
-                            IAType t2 = unionT.getNullableType();
-                            if (t2.getTypeTag() == ATypeTag.RECORD) {
-                                ARecordType recType = (ARecordType) t2;
-                                ILogicalExpression fai = createFieldAccessByIndex(recType, fce);
-                                if (fai == null) {
-                                    return false || changed;
-                                }
-                                expressions.get(i).setValue(fai);
-                                changed = true;
-                                break;
-                            }
-                        }
+                    expressions.get(i).setValue(fai);
+                    changed = true;
+                    break;
+                case UNION:
+                    AUnionType unionT = (AUnionType) t;
+                    if (!unionT.isUnknownableType()) {
                         throw new NotImplementedException("Union " + unionT);
                     }
-                    default: {
+                    IAType t2 = unionT.getActualType();
+                    if (t2.getTypeTag() != ATypeTag.RECORD) {
                         throw new AlgebricksException("Cannot call field-access on data of type " + t);
                     }
-                }
-            } catch (IOException e) {
-                throw new AlgebricksException(e);
+                    recType = (ARecordType) t2;
+                    fai = createFieldAccessByIndex(recType, fce);
+                    if (fai == null) {
+                        return changed;
+                    }
+                    expressions.get(i).setValue(fai);
+                    changed = true;
+                    break;
+                default:
+                    throw new AlgebricksException("Cannot call field-access on data of type " + t);
             }
         }
         assign.removeAnnotation(AsterixOperatorAnnotations.PUSHED_FIELD_ACCESS);
@@ -145,8 +137,8 @@
     }
 
     @SuppressWarnings("unchecked")
-    private static ILogicalExpression createFieldAccessByIndex(ARecordType recType, AbstractFunctionCallExpression fce)
-            throws IOException {
+    private static ILogicalExpression createFieldAccessByIndex(ARecordType recType,
+            AbstractFunctionCallExpression fce) {
         String s = getStringSecondArgument(fce);
         if (s == null) {
             return null;
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
index cda7619..1400950 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java
@@ -76,8 +76,8 @@
      */
     private boolean isPossibleBoolean(IAType type) {
         while (NonTaggedFormatUtil.isOptional(type)) {
-            type = ((AUnionType) type).getNullableType();
-            if (type.getTypeTag() == ATypeTag.BOOLEAN || type.getTypeTag() == ATypeTag.ANY) {
+            IAType actualType = ((AUnionType) type).getActualType();
+            if (actualType.getTypeTag() == ATypeTag.BOOLEAN || actualType.getTypeTag() == ATypeTag.ANY) {
                 return true;
             }
         }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java
index fb48395..b29f110 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java
@@ -25,8 +25,7 @@
 
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer;
-import org.apache.asterix.dataflow.data.common.AqlNullableTypeComputer;
-import org.apache.asterix.dataflow.data.nontagged.AqlNullWriterFactory;
+import org.apache.asterix.dataflow.data.nontagged.AqlMissingWriterFactory;
 import org.apache.asterix.formats.nontagged.AqlADMPrinterFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlBinaryBooleanInspectorImpl;
 import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
@@ -40,7 +39,7 @@
 import org.apache.asterix.om.base.IAObject;
 import org.apache.asterix.om.constants.AsterixConstantValue;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AbstractCollectionType;
@@ -126,10 +125,9 @@
             AqlSerializerDeserializerProvider.INSTANCE, AqlBinaryHashFunctionFactoryProvider.INSTANCE,
             AqlBinaryHashFunctionFamilyProvider.INSTANCE, AqlBinaryComparatorFactoryProvider.INSTANCE,
             AqlTypeTraitProvider.INSTANCE, AqlBinaryBooleanInspectorImpl.FACTORY, AqlBinaryIntegerInspector.FACTORY,
-            AqlADMPrinterFactoryProvider.INSTANCE, AqlNullWriterFactory.INSTANCE, null,
+            AqlADMPrinterFactoryProvider.INSTANCE, AqlMissingWriterFactory.INSTANCE, null,
             new LogicalExpressionJobGenToExpressionRuntimeProviderAdapter(QueryLogicalExpressionJobGen.INSTANCE),
-            AqlExpressionTypeComputer.INSTANCE, AqlNullableTypeComputer.INSTANCE, null, null, null, null,
-            GlobalConfig.DEFAULT_FRAME_SIZE, null);
+            AqlExpressionTypeComputer.INSTANCE, null, null, null, null, GlobalConfig.DEFAULT_FRAME_SIZE, null);
 
     private static final IOperatorSchema[] _emptySchemas = new IOperatorSchema[] {};
 
@@ -195,7 +193,7 @@
             //Current List SerDe assumes a strongly typed list, so we do not constant fold the list constructors if they are not strongly typed
             if (expr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.UNORDERED_LIST_CONSTRUCTOR)
                     || expr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.ORDERED_LIST_CONSTRUCTOR)) {
-                AbstractCollectionType listType = (AbstractCollectionType) TypeComputerUtilities.getRequiredType(expr);
+                AbstractCollectionType listType = (AbstractCollectionType) TypeCastUtils.getRequiredType(expr);
                 if (listType != null && (listType.getItemType().getTypeTag() == ATypeTag.ANY
                         || listType.getItemType() instanceof AbstractCollectionType)) {
                     //case1: listType == null,  could be a nested list inside a list<ANY>
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FuzzyJoinRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FuzzyJoinRule.java
index 427eda7..406d4ee 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FuzzyJoinRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FuzzyJoinRule.java
@@ -31,8 +31,8 @@
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.metadata.declared.AqlMetadataProvider;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
+import org.apache.asterix.om.typecomputer.impl.TypeComputeUtils;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
 import org.apache.asterix.optimizer.base.FuzzyUtils;
 import org.apache.asterix.translator.AqlPlusExpressionToPlanTranslator;
 import org.apache.commons.lang3.mutable.Mutable;
@@ -197,8 +197,8 @@
         IAType leftType = (IAType) context.getOutputTypeEnvironment(leftInputOp).getVarType(leftInputVar);
         IAType rightType = (IAType) context.getOutputTypeEnvironment(rightInputOp).getVarType(rightInputVar);
         // left-hand side and right-hand side of "~=" has the same type
-        IAType left2 = TypeHelper.getNonOptionalType(leftType);
-        IAType right2 = TypeHelper.getNonOptionalType(rightType);
+        IAType left2 = TypeComputeUtils.getActualType(leftType);
+        IAType right2 = TypeComputeUtils.getActualType(rightType);
         if (!left2.deepEqual(right2)) {
             return false;
         }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/InlineUnnestFunctionRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/InlineUnnestFunctionRule.java
index 1c27a6e..092c561 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/InlineUnnestFunctionRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/InlineUnnestFunctionRule.java
@@ -22,10 +22,9 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.commons.lang3.mutable.MutableObject;
-
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
@@ -49,7 +48,8 @@
 public class InlineUnnestFunctionRule implements IAlgebraicRewriteRule {
 
     @Override
-    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context) throws AlgebricksException {
+    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
+            throws AlgebricksException {
         return false;
     }
 
@@ -57,20 +57,23 @@
     public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
             throws AlgebricksException {
         AbstractLogicalOperator op1 = (AbstractLogicalOperator) opRef.getValue();
-        if (context.checkIfInDontApplySet(this, op1))
+        if (context.checkIfInDontApplySet(this, op1)) {
             return false;
+        }
         context.addToDontApplySet(this, op1);
-        if (op1.getOperatorTag() != LogicalOperatorTag.UNNEST)
+        if (op1.getOperatorTag() != LogicalOperatorTag.UNNEST) {
             return false;
+        }
         UnnestOperator unnestOperator = (UnnestOperator) op1;
         AbstractFunctionCallExpression expr = (AbstractFunctionCallExpression) unnestOperator.getExpressionRef()
                 .getValue();
         //we only inline for the scan-collection function
-        if (expr.getFunctionIdentifier() != AsterixBuiltinFunctions.SCAN_COLLECTION)
+        if (expr.getFunctionIdentifier() != AsterixBuiltinFunctions.SCAN_COLLECTION) {
             return false;
+        }
 
         // inline all variables from an unnesting function call
-        AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;
+        AbstractFunctionCallExpression funcExpr = expr;
         List<Mutable<ILogicalExpression>> args = funcExpr.getArguments();
         for (int i = 0; i < args.size(); i++) {
             ILogicalExpression argExpr = args.get(i).getValue();
@@ -95,8 +98,8 @@
         AbstractFunctionCallExpression expr = (AbstractFunctionCallExpression) unnestOp.getExpressionRef().getValue();
         List<Pair<AbstractFunctionCallExpression, Integer>> parentAndIndexList = new ArrayList<Pair<AbstractFunctionCallExpression, Integer>>();
         getParentFunctionExpression(usedVar, expr, parentAndIndexList);
-        ILogicalExpression usedVarOrginExpr = findUsedVarOrigin(usedVar, unnestOp, (AbstractLogicalOperator) unnestOp
-                .getInputs().get(0).getValue());
+        ILogicalExpression usedVarOrginExpr = findUsedVarOrigin(usedVar, unnestOp,
+                (AbstractLogicalOperator) unnestOp.getInputs().get(0).getValue());
         if (usedVarOrginExpr != null) {
             for (Pair<AbstractFunctionCallExpression, Integer> parentAndIndex : parentAndIndexList) {
                 //we only rewrite the top scan-collection function
@@ -116,8 +119,9 @@
             ILogicalExpression argExpr = args.get(i).getValue();
             if (argExpr.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
                 VariableReferenceExpression varExpr = (VariableReferenceExpression) argExpr;
-                if (varExpr.getVariableReference().equals(usedVar))
+                if (varExpr.getVariableReference().equals(usedVar)) {
                     parentAndIndexList.add(new Pair<AbstractFunctionCallExpression, Integer>(funcExpr, i));
+                }
             }
             if (argExpr.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
                 getParentFunctionExpression(usedVar, argExpr, parentAndIndexList);
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceAutogenerateIDRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceAutogenerateIDRule.java
index a7327ff..fee1c96 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceAutogenerateIDRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceAutogenerateIDRule.java
@@ -130,7 +130,7 @@
         List<Mutable<ILogicalExpression>> args = new ArrayList<>();
         args.add(new MutableObject<ILogicalExpression>(mergedRec));
         AbstractFunctionCallExpression notNullFn = new ScalarFunctionCallExpression(
-                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.NOT_NULL), args);
+                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.CHECK_UNKNOWN), args);
         return notNullFn;
     }
 
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastForExternalFunctionRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastForExternalFunctionRule.java
index d3370a5..0fb5b0b 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastForExternalFunctionRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastForExternalFunctionRule.java
@@ -121,25 +121,25 @@
         IAType inputRecordType = (IAType) env.getVarType(recordVar.get(0));
 
         /** the input record type can be an union type -- for the case when it comes from a subplan or left-outer join */
-        boolean checkNull = false;
+        boolean checkUnknown = false;
         while (NonTaggedFormatUtil.isOptional(inputRecordType)) {
             /** while-loop for the case there is a nested multi-level union */
-            inputRecordType = ((AUnionType) inputRecordType).getNullableType();
-            checkNull = true;
+            inputRecordType = ((AUnionType) inputRecordType).getActualType();
+            checkUnknown = true;
         }
 
         /** see whether the input record type needs to be casted */
         boolean cast = !IntroduceDynamicTypeCastRule.compatible(requiredRecordType, inputRecordType);
 
-        if (checkNull) {
+        if (checkUnknown) {
             recordVar.set(0, IntroduceDynamicTypeCastRule.addWrapperFunction(requiredRecordType, recordVar.get(0),
-                    assignOp1, context, AsterixBuiltinFunctions.NOT_NULL));
+                    assignOp1, context, AsterixBuiltinFunctions.CHECK_UNKNOWN));
         }
         if (cast) {
             IntroduceDynamicTypeCastRule.addWrapperFunction(requiredRecordType, recordVar.get(0), assignOp1, context,
                     AsterixBuiltinFunctions.CAST_RECORD);
         }
-        return cast || checkNull;
+        return cast || checkUnknown;
     }
 
 }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastRule.java
index f8bbba8..a58da0d 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastRule.java
@@ -25,7 +25,7 @@
 import org.apache.asterix.lang.common.util.FunctionUtil;
 import org.apache.asterix.metadata.declared.AqlDataSource;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
@@ -160,24 +160,24 @@
         IAType inputRecordType = (IAType) env.getVarType(recordVar);
 
         /** the input record type can be an union type -- for the case when it comes from a subplan or left-outer join */
-        boolean checkNull = false;
+        boolean checkUnknown = false;
         while (NonTaggedFormatUtil.isOptional(inputRecordType)) {
             /** while-loop for the case there is a nested multi-level union */
-            inputRecordType = ((AUnionType) inputRecordType).getNullableType();
-            checkNull = true;
+            inputRecordType = ((AUnionType) inputRecordType).getActualType();
+            checkUnknown = true;
         }
 
         /** see whether the input record type needs to be casted */
         boolean cast = !compatible(requiredRecordType, inputRecordType);
 
-        if (checkNull) {
+        if (checkUnknown) {
             recordVar = addWrapperFunction(requiredRecordType, recordVar, op, context,
-                    AsterixBuiltinFunctions.NOT_NULL);
+                    AsterixBuiltinFunctions.CHECK_UNKNOWN);
         }
         if (cast) {
             addWrapperFunction(requiredRecordType, recordVar, op, context, AsterixBuiltinFunctions.CAST_RECORD);
         }
-        return cast || checkNull;
+        return cast || checkUnknown;
     }
 
     /**
@@ -217,7 +217,7 @@
                     cast.getArguments()
                             .add(new MutableObject<ILogicalExpression>(new VariableReferenceExpression(var)));
                     /** enforce the required record type */
-                    TypeComputerUtilities.setRequiredAndInputTypes(cast, requiredRecordType, actualType);
+                    TypeCastUtils.setRequiredAndInputTypes(cast, requiredRecordType, actualType);
                     LogicalVariable newAssignVar = context.newVar();
                     AssignOperator newAssignOperator = new AssignOperator(newAssignVar,
                             new MutableObject<ILogicalExpression>(cast));
@@ -274,7 +274,7 @@
             }
             IAType reqTypeInside = reqTypes[i];
             if (NonTaggedFormatUtil.isOptional(reqTypes[i])) {
-                reqTypeInside = ((AUnionType) reqTypes[i]).getNullableType();
+                reqTypeInside = ((AUnionType) reqTypes[i]).getActualType();
             }
             IAType inputTypeInside = inputTypes[i];
             if (NonTaggedFormatUtil.isOptional(inputTypes[i])) {
@@ -282,9 +282,9 @@
                     /** if the required type is not optional, the two types are incompatible */
                     return false;
                 }
-                inputTypeInside = ((AUnionType) inputTypes[i]).getNullableType();
+                inputTypeInside = ((AUnionType) inputTypes[i]).getActualType();
             }
-            if (inputTypeInside.getTypeTag() != ATypeTag.NULL && !reqTypeInside.equals(inputTypeInside)) {
+            if (inputTypeInside.getTypeTag() != ATypeTag.MISSING && !reqTypeInside.equals(inputTypeInside)) {
                 return false;
             }
         }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceEnforcedListTypeRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceEnforcedListTypeRule.java
index 8b2e003..3ff2a1b 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceEnforcedListTypeRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceEnforcedListTypeRule.java
@@ -24,7 +24,7 @@
 
 import org.apache.commons.lang3.mutable.Mutable;
 
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.optimizer.rules.typecast.StaticTypeCastUtil;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -89,7 +89,7 @@
                 AbstractFunctionCallExpression argFuncExpr = (AbstractFunctionCallExpression) expr;
                 IAType exprType = (IAType) env.getType(argFuncExpr);
                 if (StaticTypeCastUtil.rewriteListExpr(argFuncExpr, exprType, exprType, env)) {
-                    TypeComputerUtilities.resetRequiredAndInputTypes(argFuncExpr);
+                    TypeCastUtils.resetRequiredAndInputTypes(argFuncExpr);
                     changed = true;
                 }
             }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
index e3cca9b..0a7d196 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
@@ -41,7 +41,7 @@
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.constants.AsterixConstantValue;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
@@ -240,7 +240,7 @@
                     // The first argument is the record
                     castFunc.getArguments()
                             .add(new MutableObject<ILogicalExpression>(insertOp.getPayloadExpression().getValue()));
-                    TypeComputerUtilities.setRequiredAndInputTypes(castFunc, enforcedType, insertRecType);
+                    TypeCastUtils.setRequiredAndInputTypes(castFunc, enforcedType, insertRecType);
                     // AssignOperator puts in the cast var the casted record
                     AssignOperator castedRecordAssignOperator = new AssignOperator(castedRecVar,
                             new MutableObject<ILogicalExpression>(castFunc));
@@ -467,7 +467,7 @@
                             new MutableObject<ILogicalExpression>(new VariableReferenceExpression(secondaryKeyVar)));
                 }
                 if (isPointMBR && isBulkload) {
-                    //for PointMBR optimization: see SecondaryRTreeOperationsHelper.buildLoadingJobSpec() and 
+                    //for PointMBR optimization: see SecondaryRTreeOperationsHelper.buildLoadingJobSpec() and
                     //createFieldPermutationForBulkLoadOp(int) for more details.
                     for (LogicalVariable secondaryKeyVar : keyVarList) {
                         secondaryExpressions.add(new MutableObject<ILogicalExpression>(
@@ -502,7 +502,7 @@
                                 new VariableReferenceExpression(secondaryKeyVar)));
                     }
                     if (isPointMBR && isBulkload) {
-                        //for PointMBR optimization: see SecondaryRTreeOperationsHelper.buildLoadingJobSpec() and 
+                        //for PointMBR optimization: see SecondaryRTreeOperationsHelper.buildLoadingJobSpec() and
                         //createFieldPermutationForBulkLoadOp(int) for more details.
                         for (LogicalVariable secondaryKeyVar : originalKeyVarList) {
                             prevSecondaryExpressions.add(new MutableObject<ILogicalExpression>(
@@ -620,8 +620,8 @@
                     // if a an enforced field already exists and the type is correct
                     IAType enforcedFieldType = recordNameTypesMap.get(splits.get(splits.size() - 1));
                     if (enforcedFieldType != null && enforcedFieldType.getTypeTag() == ATypeTag.UNION
-                            && ((AUnionType) enforcedFieldType).isNullableType()) {
-                        enforcedFieldType = ((AUnionType) enforcedFieldType).getNullableType();
+                            && ((AUnionType) enforcedFieldType).isUnknownableType()) {
+                        enforcedFieldType = ((AUnionType) enforcedFieldType).getActualType();
                     }
                     if (enforcedFieldType != null && !ATypeHierarchy.canPromote(enforcedFieldType.getTypeTag(),
                             index.getKeyFieldTypes().get(i).getTypeTag())) {
@@ -731,7 +731,7 @@
                 continue;
             }
             ScalarFunctionCallExpression isNullFuncExpr = new ScalarFunctionCallExpression(
-                    FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_NULL),
+                    FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_UNKOWN),
                     new MutableObject<ILogicalExpression>(new VariableReferenceExpression(secondaryKeyVar)));
             ScalarFunctionCallExpression notFuncExpr = new ScalarFunctionCallExpression(
                     FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.NOT),
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceStaticTypeCastForInsertRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceStaticTypeCastForInsertRule.java
index 223fab3..89280be 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceStaticTypeCastForInsertRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceStaticTypeCastForInsertRule.java
@@ -23,7 +23,7 @@
 import java.util.List;
 
 import org.apache.asterix.metadata.declared.AqlDataSource;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.optimizer.rules.typecast.StaticTypeCastUtil;
 import org.apache.commons.lang3.mutable.Mutable;
@@ -144,7 +144,7 @@
                         AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;
                         // that expression has been rewritten, and it will not
                         // fail but just return false
-                        if (TypeComputerUtilities.getRequiredType(funcExpr) != null) {
+                        if (TypeCastUtils.getRequiredType(funcExpr) != null) {
                             context.computeAndSetTypeEnvironmentForOperator(assignOp);
                             return false;
                         }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ReplaceSinkOpWithCommitOpRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ReplaceSinkOpWithCommitOpRule.java
index 0628681..8aefd1a 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ReplaceSinkOpWithCommitOpRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ReplaceSinkOpWithCommitOpRule.java
@@ -102,17 +102,17 @@
                         upsertVar = context.newVar();
                         AbstractFunctionCallExpression orFunc = new ScalarFunctionCallExpression(
                                 FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.OR));
-                        // is new value null? -> this means that the expected operation is delete
-                        AbstractFunctionCallExpression isNewNullFunc = new ScalarFunctionCallExpression(
-                                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_NULL));
-                        isNewNullFunc.getArguments().add(insertDeleteUpsertOperator.getPayloadExpression());
-                        AbstractFunctionCallExpression isPrevNullFunc = new ScalarFunctionCallExpression(
-                                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_NULL));
+                        // is new value missing? -> this means that the expected operation is delete
+                        AbstractFunctionCallExpression isNewMissingFunc = new ScalarFunctionCallExpression(
+                                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_MISSING));
+                        isNewMissingFunc.getArguments().add(insertDeleteUpsertOperator.getPayloadExpression());
+                        AbstractFunctionCallExpression isPrevMissingFunc = new ScalarFunctionCallExpression(
+                                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_MISSING));
                         // argument is the previous record
-                        isPrevNullFunc.getArguments().add(new MutableObject<ILogicalExpression>(
+                        isPrevMissingFunc.getArguments().add(new MutableObject<ILogicalExpression>(
                                 new VariableReferenceExpression(insertDeleteUpsertOperator.getPrevRecordVar())));
-                        orFunc.getArguments().add(new MutableObject<ILogicalExpression>(isPrevNullFunc));
-                        orFunc.getArguments().add(new MutableObject<ILogicalExpression>(isNewNullFunc));
+                        orFunc.getArguments().add(new MutableObject<ILogicalExpression>(isPrevMissingFunc));
+                        orFunc.getArguments().add(new MutableObject<ILogicalExpression>(isNewMissingFunc));
 
                         // AssignOperator puts in the cast var the casted record
                         upsertFlagAssign = new AssignOperator(upsertVar, new MutableObject<ILogicalExpression>(orFunc));
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SetClosedRecordConstructorsRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SetClosedRecordConstructorsRule.java
index 1af312d..ee55aa1 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SetClosedRecordConstructorsRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SetClosedRecordConstructorsRule.java
@@ -21,7 +21,7 @@
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.lang.common.util.FunctionUtil;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.AUnionType;
@@ -108,7 +108,7 @@
             boolean allClosed = true;
             boolean changed = false;
             if (expr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.OPEN_RECORD_CONSTRUCTOR)) {
-                ARecordType reqType = (ARecordType) TypeComputerUtilities.getRequiredType(expr);
+                ARecordType reqType = (ARecordType) TypeCastUtils.getRequiredType(expr);
                 if (reqType == null || !reqType.isOpen()) {
                     int n = expr.getArguments().size();
                     if (n % 2 > 0) {
@@ -142,7 +142,7 @@
                 boolean rewrite = true;
                 if (expr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.ORDERED_LIST_CONSTRUCTOR)
                         || (expr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.UNORDERED_LIST_CONSTRUCTOR))) {
-                    IAType reqType = TypeComputerUtilities.getRequiredType(expr);
+                    IAType reqType = TypeCastUtils.getRequiredType(expr);
                     if (reqType == null) {
                         rewrite = false;
                     }
@@ -172,45 +172,21 @@
                 throw new AlgebricksException(
                         "Could not infer type for variable '" + expr.getVariableReference() + "'.");
             }
-            boolean dataIsClosed = isClosedRec((IAType) varType);
+            boolean dataIsClosed = isClosed((IAType) varType);
             return new ClosedDataInfo(false, dataIsClosed, expr);
         }
 
         private boolean hasClosedType(ILogicalExpression expr) throws AlgebricksException {
             IAType t = (IAType) context.getExpressionTypeComputer().getType(expr, context.getMetadataProvider(), env);
-            return isClosedRec(t);
+            return isClosed(t);
         }
 
-        private static boolean isClosedRec(IAType t) throws AlgebricksException {
+        private static boolean isClosed(IAType t) throws AlgebricksException {
             switch (t.getTypeTag()) {
+                case MISSING:
                 case ANY: {
                     return false;
                 }
-                case CIRCLE:
-                case INT8:
-                case INT16:
-                case INT32:
-                case INT64:
-                case BINARY:
-                case BITARRAY:
-                case FLOAT:
-                case DOUBLE:
-                case STRING:
-                case LINE:
-                case NULL:
-                case BOOLEAN:
-                case DATETIME:
-                case DATE:
-                case TIME:
-                case UUID:
-                case DURATION:
-                case YEARMONTHDURATION:
-                case DAYTIMEDURATION:
-                case INTERVAL:
-                case POINT:
-                case POINT3D:
-                case POLYGON:
-                case RECTANGLE:
                 case SHORTWITHOUTTYPEINFO: {
                     return true;
                 }
@@ -219,24 +195,21 @@
                 }
                 case UNION: {
                     AUnionType ut = (AUnionType) t;
-                    for (IAType t2 : ut.getUnionList()) {
-                        if (!isClosedRec(t2)) {
-                            return false;
-                        }
+                    if (!isClosed(ut.getActualType())) {
+                        return false;
                     }
                     return true;
                 }
                 case ORDEREDLIST: {
                     AOrderedListType ol = (AOrderedListType) t;
-                    return isClosedRec(ol.getItemType());
+                    return isClosed(ol.getItemType());
                 }
                 case UNORDEREDLIST: {
                     AUnorderedListType ul = (AUnorderedListType) t;
-                    return isClosedRec(ul.getItemType());
+                    return isClosed(ul.getItemType());
                 }
-                default: {
-                    throw new IllegalStateException("Closed type analysis not implemented for type " + t);
-                }
+                default:
+                    return true;
             }
         }
     }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java
index 0152c12..d17b663 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java
@@ -443,7 +443,7 @@
             // Need to also verify the index is pending no op
             if (index.getKeyFieldNames().contains(fieldName) && index.getPendingOp() == IMetadataEntity.PENDING_NO_OP) {
                 indexCandidates.add(index);
-                if (optFuncExpr.getFieldType(varIdx) == BuiltinType.ANULL
+                if (optFuncExpr.getFieldType(varIdx) == BuiltinType.AMISSING
                         || optFuncExpr.getFieldType(varIdx) == BuiltinType.ANY) {
                     optFuncExpr.setFieldType(varIdx,
                             index.getKeyFieldTypes().get(index.getKeyFieldNames().indexOf(fieldName)));
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
index 2ce43c2..db2c627 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
@@ -516,7 +516,7 @@
         return primaryIndexUnnestOp;
     }
 
-    public static ScalarFunctionCallExpression findLOJIsNullFuncInGroupBy(GroupByOperator lojGroupbyOp)
+    public static ScalarFunctionCallExpression findLOJIsMissingFuncInGroupBy(GroupByOperator lojGroupbyOp)
             throws AlgebricksException {
         //find IS_NULL function of which argument has the nullPlaceholder variable in the nested plan of groupby.
         ALogicalPlanImpl subPlan = (ALogicalPlanImpl) lojGroupbyOp.getNestedPlans().get(0);
@@ -536,7 +536,7 @@
                         if (notFuncExpr.getArguments().get(0).getValue()
                                 .getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
                             if (((AbstractFunctionCallExpression) notFuncExpr.getArguments().get(0).getValue())
-                                    .getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.IS_NULL)) {
+                                    .getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.IS_MISSING)) {
                                 isNullFuncExpr = (ScalarFunctionCallExpression) notFuncExpr.getArguments().get(0)
                                         .getValue();
                                 if (isNullFuncExpr.getArguments().get(0).getValue()
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java
index 8a9bb3f..e1cda09 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java
@@ -158,7 +158,7 @@
         if (isLeftOuterJoin && hasGroupBy) {
             analysisCtx.setLOJGroupbyOpRef(opRef);
             ScalarFunctionCallExpression isNullFuncExpr = AccessMethodUtils
-                    .findLOJIsNullFuncInGroupBy((GroupByOperator) opRef.getValue());
+                    .findLOJIsMissingFuncInGroupBy((GroupByOperator) opRef.getValue());
             analysisCtx.setLOJIsNullFuncInGroupBy(isNullFuncExpr);
         }
 
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/InvertedIndexAccessMethod.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/InvertedIndexAccessMethod.java
index 06776ed..305d1a9 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/InvertedIndexAccessMethod.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/InvertedIndexAccessMethod.java
@@ -34,7 +34,7 @@
 import org.apache.asterix.metadata.entities.Index;
 import org.apache.asterix.om.base.AFloat;
 import org.apache.asterix.om.base.AInt32;
-import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.base.IACollection;
 import org.apache.asterix.om.base.IAObject;
@@ -142,7 +142,7 @@
 
     public boolean analyzeGetItemFuncExpr(AbstractFunctionCallExpression funcExpr,
             List<AbstractLogicalOperator> assignsAndUnnests, AccessMethodAnalysisContext analysisCtx)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         if (funcExpr.getFunctionIdentifier() != AsterixBuiltinFunctions.GET_ITEM) {
             return false;
         }
@@ -812,7 +812,7 @@
     private void addFunctionSpecificArgs(IOptimizableFuncExpr optFuncExpr, InvertedIndexJobGenParams jobGenParams) {
         if (optFuncExpr.getFuncExpr().getFunctionIdentifier() == AsterixBuiltinFunctions.STRING_CONTAINS) {
             jobGenParams.setSearchModifierType(SearchModifierType.CONJUNCTIVE);
-            jobGenParams.setSimilarityThreshold(new AsterixConstantValue(ANull.NULL));
+            jobGenParams.setSimilarityThreshold(new AsterixConstantValue(AMissing.MISSING));
         }
         if (optFuncExpr.getFuncExpr().getFunctionIdentifier() == AsterixBuiltinFunctions.SIMILARITY_JACCARD_CHECK) {
             jobGenParams.setSearchModifierType(SearchModifierType.JACCARD);
@@ -836,7 +836,7 @@
 
     private void addKeyVarsAndExprs(IOptimizableFuncExpr optFuncExpr, ArrayList<LogicalVariable> keyVarList,
             ArrayList<Mutable<ILogicalExpression>> keyExprList, IOptimizationContext context)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         // For now we are assuming a single secondary index key.
         // Add a variable and its expr to the lists which will be passed into an assign op.
         LogicalVariable keyVar = context.newVar();
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/subplan/InlineSubplanInputForNestedTupleSourceRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/subplan/InlineSubplanInputForNestedTupleSourceRule.java
index c018e8e..1881461 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/subplan/InlineSubplanInputForNestedTupleSourceRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/subplan/InlineSubplanInputForNestedTupleSourceRule.java
@@ -431,8 +431,8 @@
         List<Mutable<ILogicalExpression>> args = new ArrayList<Mutable<ILogicalExpression>>();
         args.add(filterVarExpr);
         List<Mutable<ILogicalExpression>> argsForNotFunction = new ArrayList<Mutable<ILogicalExpression>>();
-        argsForNotFunction.add(new MutableObject<ILogicalExpression>(
-                new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_NULL), args)));
+        argsForNotFunction.add(new MutableObject<ILogicalExpression>(new ScalarFunctionCallExpression(
+                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_MISSING), args)));
         SelectOperator selectOp = new SelectOperator(
                 new MutableObject<ILogicalExpression>(new ScalarFunctionCallExpression(
                         FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.NOT), argsForNotFunction)),
@@ -525,7 +525,7 @@
                 args.add(filterVarExpr);
                 List<Mutable<ILogicalExpression>> argsForNotFunction = new ArrayList<Mutable<ILogicalExpression>>();
                 argsForNotFunction.add(new MutableObject<ILogicalExpression>(new ScalarFunctionCallExpression(
-                        FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_NULL), args)));
+                        FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.IS_MISSING), args)));
                 nullCheckExprRefs.add(new MutableObject<ILogicalExpression>(new ScalarFunctionCallExpression(
                         FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.NOT), argsForNotFunction)));
             }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
index c553231..eaf9484 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
@@ -31,7 +31,7 @@
 import org.apache.asterix.om.constants.AsterixConstantValue;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
@@ -187,14 +187,15 @@
      */
     private static boolean rewriteRecordFuncExpr(AbstractFunctionCallExpression funcExpr,
             ARecordType requiredRecordType, ARecordType inputRecordType, IVariableTypeEnvironment env)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         // if already rewritten, the required type is not null
-        if (TypeComputerUtilities.getRequiredType(funcExpr) != null)
+        if (TypeCastUtils.getRequiredType(funcExpr) != null) {
             return false;
+        }
         boolean casted = staticRecordTypeCast(funcExpr, requiredRecordType, inputRecordType, env);
         if (casted) {
             //enforce the required type if it is statically casted
-            TypeComputerUtilities.setRequiredAndInputTypes(funcExpr, requiredRecordType, inputRecordType);
+            TypeCastUtils.setRequiredAndInputTypes(funcExpr, requiredRecordType, inputRecordType);
         }
         return casted;
     }
@@ -213,11 +214,12 @@
      */
     private static boolean rewriteListFuncExpr(AbstractFunctionCallExpression funcExpr,
             AbstractCollectionType requiredListType, AbstractCollectionType inputListType, IVariableTypeEnvironment env)
-                    throws AlgebricksException {
-        if (TypeComputerUtilities.getRequiredType(funcExpr) != null)
+            throws AlgebricksException {
+        if (TypeCastUtils.getRequiredType(funcExpr) != null) {
             return false;
+        }
 
-        TypeComputerUtilities.setRequiredAndInputTypes(funcExpr, requiredListType, inputListType);
+        TypeCastUtils.setRequiredAndInputTypes(funcExpr, requiredListType, inputListType);
         List<Mutable<ILogicalExpression>> args = funcExpr.getArguments();
 
         IAType itemType = requiredListType.getItemType();
@@ -305,9 +307,9 @@
 
                     // match the optional field
                     if (NonTaggedFormatUtil.isOptional(reqFieldType)) {
-                        IAType itemType = ((AUnionType) reqFieldType).getNullableType();
+                        IAType itemType = ((AUnionType) reqFieldType).getActualType();
                         reqFieldType = itemType;
-                        if (fieldType.equals(BuiltinType.ANULL) || fieldType.equals(itemType)) {
+                        if (fieldType.equals(BuiltinType.AMISSING) || fieldType.equals(itemType)) {
                             fieldPermutation[j] = i;
                             openFields[i] = false;
                             matched = true;
@@ -324,14 +326,14 @@
                     // match the optional type input for a non-optional field
                     // delay that to runtime by calling the not-null function
                     if (NonTaggedFormatUtil.isOptional(fieldType)) {
-                        IAType itemType = ((AUnionType) fieldType).getNullableType();
+                        IAType itemType = ((AUnionType) fieldType).getActualType();
                         if (reqFieldType.equals(itemType)) {
                             fieldPermutation[j] = i;
                             openFields[i] = false;
                             matched = true;
 
                             ScalarFunctionCallExpression notNullFunc = new ScalarFunctionCallExpression(
-                                    FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.NOT_NULL));
+                                    FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.CHECK_UNKNOWN));
                             notNullFunc.getArguments().add(new MutableObject<ILogicalExpression>(arg));
                             //wrap the not null function to the original function
                             func.getArguments().get(2 * i + 1).setValue(notNullFunc);
@@ -365,8 +367,9 @@
             for (int j = 0; j < inputFieldNames.length; j++) {
                 String fieldName = inputFieldNames[j];
                 IAType fieldType = inputFieldTypes[j];
-                if (!fieldName.equals(reqFieldName))
+                if (!fieldName.equals(reqFieldName)) {
                     continue;
+                }
                 // should check open field here
                 // because number of entries in fieldPermuations is the
                 // number of required schema fields
@@ -378,16 +381,18 @@
                 }
 
                 // match the optional field
-                if (NonTaggedFormatUtil.isOptional(reqFieldType)) {
-                    IAType itemType = ((AUnionType) reqFieldType).getNullableType();
-                    if (fieldType.equals(BuiltinType.ANULL) || fieldType.equals(itemType)) {
-                        matched = true;
-                        break;
-                    }
+                if (!NonTaggedFormatUtil.isOptional(reqFieldType)) {
+                    continue;
+                }
+                IAType itemType = ((AUnionType) reqFieldType).getActualType();
+                if (fieldType.equals(BuiltinType.AMISSING) || fieldType.equals(itemType)) {
+                    matched = true;
+                    break;
                 }
             }
-            if (matched)
+            if (matched) {
                 continue;
+            }
 
             if (NonTaggedFormatUtil.isOptional(reqFieldType)) {
                 // add a null field
@@ -470,19 +475,18 @@
                 injectCastFunction(FunctionUtil.getFunctionInfo(fi), reqFieldType, inputFieldType, expRef, argExpr);
                 castInjected = true;
             }
-            if (argExpr.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
-                //recursively rewrite function arguments
-                if (TypeComputerUtilities.getRequiredType((AbstractFunctionCallExpression) argExpr) == null
-                        && reqFieldType != null) {
-                    if (castInjected) {
-                        //rewrite the arg expression inside the dynamic cast
-                        ScalarFunctionCallExpression argFunc = (ScalarFunctionCallExpression) argExpr;
-                        rewriteFuncExpr(argFunc, inputFieldType, inputFieldType, env);
-                    } else {
-                        //rewrite arg
-                        ScalarFunctionCallExpression argFunc = (ScalarFunctionCallExpression) argExpr;
-                        rewriteFuncExpr(argFunc, reqFieldType, inputFieldType, env);
-                    }
+            //recursively rewrite function arguments
+            if (argExpr.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL
+                    && TypeCastUtils.getRequiredType((AbstractFunctionCallExpression) argExpr) == null
+                    && reqFieldType != null) {
+                if (castInjected) {
+                    //rewrite the arg expression inside the dynamic cast
+                    ScalarFunctionCallExpression argFunc = (ScalarFunctionCallExpression) argExpr;
+                    rewriteFuncExpr(argFunc, inputFieldType, inputFieldType, env);
+                } else {
+                    //rewrite arg
+                    ScalarFunctionCallExpression argFunc = (ScalarFunctionCallExpression) argExpr;
+                    rewriteFuncExpr(argFunc, reqFieldType, inputFieldType, env);
                 }
             }
         }
@@ -508,7 +512,7 @@
         ScalarFunctionCallExpression cast = new ScalarFunctionCallExpression(funcInfo);
         cast.getArguments().add(new MutableObject<ILogicalExpression>(argExpr));
         exprRef.setValue(cast);
-        TypeComputerUtilities.setRequiredAndInputTypes(cast, reqType, inputType);
+        TypeCastUtils.setRequiredAndInputTypes(cast, reqType, inputType);
     }
 
     /**
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
index 8a2d3a5..8ded10b 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
@@ -29,6 +29,7 @@
 import org.apache.asterix.om.base.AFloat;
 import org.apache.asterix.om.base.AInt32;
 import org.apache.asterix.om.base.AInt64;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.base.IAObject;
@@ -37,38 +38,31 @@
 
     public static IAObject objectFromLiteral(Literal valLiteral) {
         switch (valLiteral.getLiteralType()) {
-            case DOUBLE: {
+            case DOUBLE:
                 DoubleLiteral d = (DoubleLiteral) valLiteral;
                 return new ADouble(d.getValue());
-            }
-            case FALSE: {
+            case FALSE:
                 return ABoolean.FALSE;
-            }
-            case FLOAT: {
+            case FLOAT:
                 FloatLiteral fl = (FloatLiteral) valLiteral;
                 return new AFloat(fl.getValue());
-            }
-            case INTEGER: {
+            case INTEGER:
                 IntegerLiteral il = (IntegerLiteral) valLiteral;
                 return new AInt32(il.getValue());
-            }
-            case LONG: {
-                LongIntegerLiteral il = (LongIntegerLiteral) valLiteral;
-                return new AInt64(il.getValue());
-            }
-            case NULL: {
+            case LONG:
+                LongIntegerLiteral ll = (LongIntegerLiteral) valLiteral;
+                return new AInt64(ll.getValue());
+            case MISSING:
+                return AMissing.MISSING;
+            case NULL:
                 return ANull.NULL;
-            }
-            case STRING: {
+            case STRING:
                 StringLiteral sl = (StringLiteral) valLiteral;
                 return new AString(sl.getValue());
-            }
-            case TRUE: {
+            case TRUE:
                 return ABoolean.TRUE;
-            }
-            default: {
+            default:
                 throw new IllegalStateException();
-            }
         }
     }
 
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
index 551fa85..bfa29ec 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
@@ -1363,6 +1363,7 @@
         List<Mutable<ILogicalExpression>> argRefs = new ArrayList<>();
         argRefs.add(new MutableObject<ILogicalExpression>(expr));
         switch (expr.getExpressionTag()) {
+            case CONSTANT:
             case VARIABLE: {
                 return new UnnestingFunctionCallExpression(
                         FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.SCAN_COLLECTION), argRefs);
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TypeTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TypeTranslator.java
index 2d405f7..d2dfd30 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TypeTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TypeTranslator.java
@@ -60,7 +60,7 @@
 
     public static Map<TypeSignature, IAType> computeTypes(MetadataTransactionContext mdTxnCtx, TypeExpression typeExpr,
             String typeName, String typeDataverse, Map<TypeSignature, IAType> typeMap)
-                    throws AlgebricksException, MetadataException {
+            throws AlgebricksException, MetadataException {
         Map<String, Map<ARecordType, List<Integer>>> incompleteFieldTypes = new HashMap<String, Map<ARecordType, List<Integer>>>();
         Map<TypeSignature, List<AbstractCollectionType>> incompleteItemTypes = new HashMap<TypeSignature, List<AbstractCollectionType>>();
         Map<TypeSignature, List<TypeSignature>> incompleteTopLevelTypeReferences = new HashMap<TypeSignature, List<TypeSignature>>();
@@ -69,9 +69,11 @@
         secondPass(mdTxnCtx, typeMap, incompleteFieldTypes, incompleteItemTypes, incompleteTopLevelTypeReferences,
                 typeDataverse);
 
-        for (IAType type : typeMap.values())
-            if (type.getTypeTag().isDerivedType())
+        for (IAType type : typeMap.values()) {
+            if (type.getTypeTag().isDerivedType()) {
                 ((AbstractComplexType) type).generateNestedDerivedTypeNames();
+            }
+        }
         return typeMap;
     }
 
@@ -81,7 +83,7 @@
             Map<String, Map<ARecordType, List<Integer>>> incompleteFieldTypes,
             Map<TypeSignature, List<AbstractCollectionType>> incompleteItemTypes,
             Map<TypeSignature, List<TypeSignature>> incompleteTopLevelTypeReferences, String typeDataverse)
-                    throws AlgebricksException {
+            throws AlgebricksException {
 
         if (builtinTypeMap.get(typeName) != null) {
             throw new AlgebricksException("Cannot redefine builtin type " + typeName + " .");
@@ -134,7 +136,7 @@
             Map<String, Map<ARecordType, List<Integer>>> incompleteFieldTypes,
             Map<TypeSignature, List<AbstractCollectionType>> incompleteItemTypes,
             Map<TypeSignature, List<TypeSignature>> incompleteTopLevelTypeReferences, String typeDataverse)
-                    throws AlgebricksException, MetadataException {
+            throws AlgebricksException, MetadataException {
         // solve remaining top level references
 
         for (TypeSignature typeSignature : incompleteTopLevelTypeReferences.keySet()) {
@@ -143,8 +145,9 @@
                     typeSignature.getName());
             if (dt == null) {
                 throw new AlgebricksException("Could not resolve type " + typeSignature);
-            } else
+            } else {
                 t = dt.getDatatype();
+            }
             for (TypeSignature sign : incompleteTopLevelTypeReferences.get(typeSignature)) {
                 typeMap.put(sign, t);
             }
@@ -155,8 +158,9 @@
             Datatype dt = MetadataManager.INSTANCE.getDatatype(mdTxnCtx, typeDataverse, trefName);
             if (dt == null) {
                 throw new AlgebricksException("Could not resolve type " + trefName);
-            } else
+            } else {
                 t = dt.getDatatype();
+            }
             Map<ARecordType, List<Integer>> fieldsToFix = incompleteFieldTypes.get(trefName);
             for (ARecordType recType : fieldsToFix.keySet()) {
                 List<Integer> positions = fieldsToFix.get(recType);
@@ -166,7 +170,7 @@
                         fldTypes[pos] = t;
                     } else { // nullable
                         AUnionType nullableUnion = (AUnionType) fldTypes[pos];
-                        nullableUnion.setTypeAtIndex(t, 1);
+                        nullableUnion.setActualType(t);
                     }
                 }
             }
@@ -195,7 +199,7 @@
     private static AOrderedListType computeOrderedListType(TypeSignature typeSignature, OrderedListTypeDefinition oltd,
             Map<TypeSignature, IAType> typeMap, Map<TypeSignature, List<AbstractCollectionType>> incompleteItemTypes,
             Map<String, Map<ARecordType, List<Integer>>> incompleteFieldTypes, String defaultDataverse)
-                    throws AsterixException {
+            throws AsterixException {
         TypeExpression tExpr = oltd.getItemTypeExpression();
         String typeName = typeSignature != null ? typeSignature.getName() : null;
         AOrderedListType aolt = new AOrderedListType(null, typeName);
@@ -207,7 +211,7 @@
             UnorderedListTypeDefinition ultd, Map<TypeSignature, IAType> typeMap,
             Map<TypeSignature, List<AbstractCollectionType>> incompleteItemTypes,
             Map<String, Map<ARecordType, List<Integer>>> incompleteFieldTypes, String defaulDataverse)
-                    throws AsterixException {
+            throws AsterixException {
         TypeExpression tExpr = ultd.getItemTypeExpression();
         String typeName = typeSignature != null ? typeSignature.getName() : null;
         AUnorderedListType ault = new AUnorderedListType(null, typeName);
@@ -312,7 +316,7 @@
     private static ARecordType computeRecordType(TypeSignature typeSignature, RecordTypeDefinition rtd,
             Map<TypeSignature, IAType> typeMap, Map<String, Map<ARecordType, List<Integer>>> incompleteFieldTypes,
             Map<TypeSignature, List<AbstractCollectionType>> incompleteItemTypes, String defaultDataverse)
-                    throws AsterixException {
+            throws AsterixException {
         List<String> names = rtd.getFieldNames();
         int n = names.size();
         String[] fldNames = new String[n];
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
index c575476f..820d935 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
@@ -93,6 +93,12 @@
 import org.apache.asterix.runtime.evaluators.accessors.TemporalMonthAccessor;
 import org.apache.asterix.runtime.evaluators.accessors.TemporalSecondAccessor;
 import org.apache.asterix.runtime.evaluators.accessors.TemporalYearAccessor;
+import org.apache.asterix.runtime.evaluators.comparisons.EqualsDescriptor;
+import org.apache.asterix.runtime.evaluators.comparisons.GreaterThanDescriptor;
+import org.apache.asterix.runtime.evaluators.comparisons.GreaterThanOrEqualsDescriptor;
+import org.apache.asterix.runtime.evaluators.comparisons.LessThanDescriptor;
+import org.apache.asterix.runtime.evaluators.comparisons.LessThanOrEqualsDescriptor;
+import org.apache.asterix.runtime.evaluators.comparisons.NotEqualsDescriptor;
 import org.apache.asterix.runtime.evaluators.constructors.ABinaryBase64StringConstructorDescriptor;
 import org.apache.asterix.runtime.evaluators.constructors.ABinaryHexStringConstructorDescriptor;
 import org.apache.asterix.runtime.evaluators.constructors.ABooleanConstructorDescriptor;
@@ -127,6 +133,7 @@
 import org.apache.asterix.runtime.evaluators.functions.AnyCollectionMemberDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CastListDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CastRecordDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.CheckUnknownDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CodePointToStringDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CountHashedGramTokensDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CountHashedWordTokensDescriptor;
@@ -142,21 +149,19 @@
 import org.apache.asterix.runtime.evaluators.functions.EditDistanceCheckDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.EditDistanceContainsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.EditDistanceDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.EditDistanceListIsFilterable;
-import org.apache.asterix.runtime.evaluators.functions.EditDistanceStringIsFilterable;
-import org.apache.asterix.runtime.evaluators.functions.EmbedTypeDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.FlowRecordDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.FuzzyEqDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.EditDistanceListIsFilterableDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.EditDistanceStringIsFilterableDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.GetItemDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.GramTokensDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.HashedGramTokensDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.HashedWordTokensDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.InjectFailureDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.IsMissingDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.IsNullDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.IsSystemNullDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.IsUnknownDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.LenDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.NotDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.NotNullDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.NumericAbsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.NumericAddDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.NumericCaretDescriptor;
@@ -235,7 +240,8 @@
 import org.apache.asterix.runtime.evaluators.functions.temporal.DatetimeFromUnixTimeInMsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.DatetimeFromUnixTimeInSecsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.DayOfWeekDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.temporal.DayTimeDurationComparatorDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.temporal.DayTimeDurationGreaterThanComparatorDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.temporal.DayTimeDurationLessThanComparatorDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.DurationEqualDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.DurationFromIntervalDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.DurationFromMillisecondsDescriptor;
@@ -249,7 +255,7 @@
 import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalCoveredByDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalCoversDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalEndedByDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalEndsDecriptor;
+import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalEndsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalMeetsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalMetByDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalOverlappedByDescriptor;
@@ -268,7 +274,8 @@
 import org.apache.asterix.runtime.evaluators.functions.temporal.PrintTimeDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.TimeFromDatetimeDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.temporal.TimeFromUnixTimeInMsDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.temporal.YearMonthDurationComparatorDecriptor;
+import org.apache.asterix.runtime.evaluators.functions.temporal.YearMonthDurationGreaterThanComparatorDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.temporal.YearMonthDurationLessThanComparatorDescriptor;
 import org.apache.asterix.runtime.evaluators.staticcodegen.CodeGenUtil;
 import org.apache.asterix.runtime.runningaggregates.std.TidRunningAggregateDescriptor;
 import org.apache.asterix.runtime.unnestingfunctions.std.RangeDescriptor;
@@ -281,85 +288,16 @@
 public class FunctionCollection {
 
     private static final String FACTORY = "FACTORY";
-    private static final List<IFunctionDescriptorFactory> temp = new ArrayList<IFunctionDescriptorFactory>();
+    private static final List<IFunctionDescriptorFactory> temp = new ArrayList<>();
 
     static {
-        // format-independent
+        // unnesting function
         temp.add(TidRunningAggregateDescriptor.FACTORY);
-
-        // format-dependent
-        temp.add(AndDescriptor.FACTORY);
-        temp.add(OrDescriptor.FACTORY);
-        temp.add(StringLikeDescriptor.FACTORY);
         temp.add(ScanCollectionDescriptor.FACTORY);
-        temp.add(AnyCollectionMemberDescriptor.FACTORY);
-        temp.add(ClosedRecordConstructorDescriptor.FACTORY);
-        temp.add(FieldAccessByIndexDescriptor.FACTORY);
-        temp.add(FieldAccessByNameDescriptor.FACTORY);
-        temp.add(FieldAccessNestedDescriptor.FACTORY);
-        temp.add(GetRecordFieldsDescriptor.FACTORY);
-        temp.add(GetRecordFieldValueDescriptor.FACTORY);
-        temp.add(FieldAccessByNameDescriptor.FACTORY);
-        temp.add(GetItemDescriptor.FACTORY);
-        temp.add(NumericUnaryMinusDescriptor.FACTORY);
-        temp.add(OpenRecordConstructorDescriptor.FACTORY);
-        temp.add(OrderedListConstructorDescriptor.FACTORY);
-        temp.add(UnorderedListConstructorDescriptor.FACTORY);
-        temp.add(EmbedTypeDescriptor.FACTORY);
-
-        temp.add(NumericAddDescriptor.FACTORY);
-        temp.add(NumericDivideDescriptor.FACTORY);
-        temp.add(NumericMultiplyDescriptor.FACTORY);
-        temp.add(NumericSubDescriptor.FACTORY);
-        temp.add(NumericModuloDescriptor.FACTORY);
-        temp.add(NumericCaretDescriptor.FACTORY);
-        temp.add(IsNullDescriptor.FACTORY);
-        temp.add(IsSystemNullDescriptor.FACTORY);
-        temp.add(NotDescriptor.FACTORY);
-        temp.add(LenDescriptor.FACTORY);
-        temp.add(EmptyStreamAggregateDescriptor.FACTORY);
-        temp.add(NonEmptyStreamAggregateDescriptor.FACTORY);
         temp.add(RangeDescriptor.FACTORY);
+        temp.add(SubsetCollectionDescriptor.FACTORY);
 
-        temp.add(NumericAbsDescriptor.FACTORY);
-        temp.add(getGeneratedFunctionDescriptorFactory(NumericCeilingDescriptor.class));
-        temp.add(NumericFloorDescriptor.FACTORY);
-        temp.add(NumericRoundDescriptor.FACTORY);
-        temp.add(NumericRoundHalfToEvenDescriptor.FACTORY);
-        temp.add(NumericRoundHalfToEven2Descriptor.FACTORY);
-
-        // Binary functions
-        temp.add(BinaryLengthDescriptor.FACTORY);
-        temp.add(ParseBinaryDescriptor.FACTORY);
-        temp.add(PrintBinaryDescriptor.FACTORY);
-        temp.add(BinaryConcatDescriptor.FACTORY);
-        temp.add(SubBinaryFromDescriptor.FACTORY);
-        temp.add(SubBinaryFromToDescriptor.FACTORY);
-        temp.add(FindBinaryDescriptor.FACTORY);
-        temp.add(FindBinaryFromDescriptor.FACTORY);
-
-        // String functions
-        temp.add(StringContainsDescriptor.FACTORY);
-        temp.add(StringEndsWithDescriptor.FACTORY);
-        temp.add(StringStartsWithDescriptor.FACTORY);
-        temp.add(getGeneratedFunctionDescriptorFactory(SubstringDescriptor.class));
-        temp.add(StringEqualDescriptor.FACTORY);
-        temp.add(StringMatchesDescriptor.FACTORY);
-        temp.add(getGeneratedFunctionDescriptorFactory(StringLowerCaseDescriptor.class));
-        temp.add(getGeneratedFunctionDescriptorFactory(StringUpperCaseDescriptor.class));
-        temp.add(StringMatchesWithFlagDescriptor.FACTORY);
-        temp.add(StringReplaceDescriptor.FACTORY);
-        temp.add(StringReplaceWithFlagsDescriptor.FACTORY);
-        temp.add(getGeneratedFunctionDescriptorFactory(StringLengthDescriptor.class));
-        temp.add(getGeneratedFunctionDescriptorFactory(Substring2Descriptor.class));
-        temp.add(SubstringBeforeDescriptor.FACTORY);
-        temp.add(SubstringAfterDescriptor.FACTORY);
-        temp.add(StringToCodePointDescriptor.FACTORY);
-        temp.add(CodePointToStringDescriptor.FACTORY);
-        temp.add(StringConcatDescriptor.FACTORY);
-        temp.add(StringJoinDescriptor.FACTORY);
-
-        // aggregates
+        // aggregate functions
         temp.add(ListifyAggregateDescriptor.FACTORY);
         temp.add(CountAggregateDescriptor.FACTORY);
         temp.add(AvgAggregateDescriptor.FACTORY);
@@ -388,6 +326,8 @@
         temp.add(ScalarSumAggregateDescriptor.FACTORY);
         temp.add(ScalarMaxAggregateDescriptor.FACTORY);
         temp.add(ScalarMinAggregateDescriptor.FACTORY);
+        temp.add(EmptyStreamAggregateDescriptor.FACTORY);
+        temp.add(NonEmptyStreamAggregateDescriptor.FACTORY);
 
         // SQL aggregates
         temp.add(SqlCountAggregateDescriptor.FACTORY);
@@ -418,164 +358,258 @@
         temp.add(ScalarSqlMaxAggregateDescriptor.FACTORY);
         temp.add(ScalarSqlMinAggregateDescriptor.FACTORY);
 
-        // new functions - constructors
-        temp.add(ABooleanConstructorDescriptor.FACTORY);
-        temp.add(ANullConstructorDescriptor.FACTORY);
-        temp.add(ABinaryHexStringConstructorDescriptor.FACTORY);
-        temp.add(ABinaryBase64StringConstructorDescriptor.FACTORY);
-        temp.add(AStringConstructorDescriptor.FACTORY);
-        temp.add(AInt8ConstructorDescriptor.FACTORY);
-        temp.add(AInt16ConstructorDescriptor.FACTORY);
-        temp.add(AInt32ConstructorDescriptor.FACTORY);
-        temp.add(AInt64ConstructorDescriptor.FACTORY);
-        temp.add(AFloatConstructorDescriptor.FACTORY);
-        temp.add(ADoubleConstructorDescriptor.FACTORY);
-        temp.add(APointConstructorDescriptor.FACTORY);
-        temp.add(APoint3DConstructorDescriptor.FACTORY);
-        temp.add(ALineConstructorDescriptor.FACTORY);
-        temp.add(APolygonConstructorDescriptor.FACTORY);
-        temp.add(ACircleConstructorDescriptor.FACTORY);
-        temp.add(ARectangleConstructorDescriptor.FACTORY);
-        temp.add(ATimeConstructorDescriptor.FACTORY);
-        temp.add(ADateConstructorDescriptor.FACTORY);
-        temp.add(ADateTimeConstructorDescriptor.FACTORY);
-        temp.add(ADurationConstructorDescriptor.FACTORY);
-        temp.add(AYearMonthDurationConstructorDescriptor.FACTORY);
-        temp.add(ADayTimeDurationConstructorDescriptor.FACTORY);
-        temp.add(AUUIDFromStringConstructorDescriptor.FACTORY);
+        // boolean functions
+        temp.add(AndDescriptor.FACTORY);
+        temp.add(OrDescriptor.FACTORY);
 
-        temp.add(DeepEqualityDescriptor.FACTORY);
+        // Record constructors
+        temp.add(ClosedRecordConstructorDescriptor.FACTORY);
+        temp.add(OpenRecordConstructorDescriptor.FACTORY);
 
-        temp.add(CreateUUIDDescriptor.FACTORY);
-        temp.add(CreateQueryUIDDescriptor.FACTORY);
-        // Spatial
-        temp.add(CreatePointDescriptor.FACTORY);
-        temp.add(CreateLineDescriptor.FACTORY);
-        temp.add(CreatePolygonDescriptor.FACTORY);
-        temp.add(CreateCircleDescriptor.FACTORY);
-        temp.add(CreateRectangleDescriptor.FACTORY);
-        temp.add(SpatialAreaDescriptor.FACTORY);
-        temp.add(SpatialDistanceDescriptor.FACTORY);
-        temp.add(SpatialIntersectDescriptor.FACTORY);
-        temp.add(CreateMBRDescriptor.FACTORY);
-        temp.add(SpatialCellDescriptor.FACTORY);
-        temp.add(PointXCoordinateAccessor.FACTORY);
-        temp.add(PointYCoordinateAccessor.FACTORY);
-        temp.add(CircleRadiusAccessor.FACTORY);
-        temp.add(CircleCenterAccessor.FACTORY);
-        temp.add(LineRectanglePolygonAccessor.FACTORY);
+        // List constructors
+        temp.add(OrderedListConstructorDescriptor.FACTORY);
+        temp.add(UnorderedListConstructorDescriptor.FACTORY);
 
-        // fuzzyjoin function
-        temp.add(FuzzyEqDescriptor.FACTORY);
-        temp.add(SubsetCollectionDescriptor.FACTORY);
-        temp.add(PrefixLenJaccardDescriptor.FACTORY);
-
-        temp.add(WordTokensDescriptor.FACTORY);
-        temp.add(HashedWordTokensDescriptor.FACTORY);
-        temp.add(CountHashedWordTokensDescriptor.FACTORY);
-
-        temp.add(GramTokensDescriptor.FACTORY);
-        temp.add(HashedGramTokensDescriptor.FACTORY);
-        temp.add(CountHashedGramTokensDescriptor.FACTORY);
-
-        temp.add(EditDistanceDescriptor.FACTORY);
-        temp.add(EditDistanceCheckDescriptor.FACTORY);
-        temp.add(EditDistanceStringIsFilterable.FACTORY);
-        temp.add(EditDistanceListIsFilterable.FACTORY);
-        temp.add(EditDistanceContainsDescriptor.FACTORY);
-
-        temp.add(SimilarityJaccardDescriptor.FACTORY);
-        temp.add(SimilarityJaccardCheckDescriptor.FACTORY);
-        temp.add(SimilarityJaccardSortedDescriptor.FACTORY);
-        temp.add(SimilarityJaccardSortedCheckDescriptor.FACTORY);
-        temp.add(SimilarityJaccardPrefixDescriptor.FACTORY);
-        temp.add(SimilarityJaccardPrefixCheckDescriptor.FACTORY);
-
-        //Record functions
-        temp.add(RecordMergeDescriptor.FACTORY);
-        temp.add(RecordAddFieldsDescriptor.FACTORY);
-        temp.add(RecordRemoveFieldsDescriptor.FACTORY);
-        temp.add(SwitchCaseDescriptor.FACTORY);
-        temp.add(RegExpDescriptor.FACTORY);
+        // Cast functions
         temp.add(InjectFailureDescriptor.FACTORY);
         temp.add(CastListDescriptor.FACTORY);
         temp.add(CastRecordDescriptor.FACTORY);
-        temp.add(FlowRecordDescriptor.FACTORY);
-        temp.add(NotNullDescriptor.FACTORY);
 
-        // Spatial and temporal type accessors
-        temp.add(TemporalYearAccessor.FACTORY);
-        temp.add(TemporalMonthAccessor.FACTORY);
-        temp.add(TemporalDayAccessor.FACTORY);
-        temp.add(TemporalHourAccessor.FACTORY);
-        temp.add(TemporalMinuteAccessor.FACTORY);
-        temp.add(TemporalSecondAccessor.FACTORY);
-        temp.add(TemporalMillisecondAccessor.FACTORY);
-        temp.add(TemporalIntervalStartAccessor.FACTORY);
-        temp.add(TemporalIntervalEndAccessor.FACTORY);
-        temp.add(TemporalIntervalStartDateAccessor.FACTORY);
-        temp.add(TemporalIntervalEndDateAccessor.FACTORY);
-        temp.add(TemporalIntervalStartTimeAccessor.FACTORY);
-        temp.add(TemporalIntervalEndTimeAccessor.FACTORY);
-        temp.add(TemporalIntervalStartDatetimeAccessor.FACTORY);
-        temp.add(TemporalIntervalEndDatetimeAccessor.FACTORY);
+        // Switch case
+        temp.add(SwitchCaseDescriptor.FACTORY);
 
-        // Temporal functions
-        temp.add(DateFromUnixTimeInDaysDescriptor.FACTORY);
-        temp.add(DateFromDatetimeDescriptor.FACTORY);
-        temp.add(TimeFromUnixTimeInMsDescriptor.FACTORY);
-        temp.add(TimeFromDatetimeDescriptor.FACTORY);
-        temp.add(DatetimeFromUnixTimeInMsDescriptor.FACTORY);
-        temp.add(DatetimeFromUnixTimeInSecsDescriptor.FACTORY);
-        temp.add(DatetimeFromDateAndTimeDescriptor.FACTORY);
-        temp.add(CalendarDurationFromDateTimeDescriptor.FACTORY);
-        temp.add(CalendarDuartionFromDateDescriptor.FACTORY);
-        temp.add(AdjustDateTimeForTimeZoneDescriptor.FACTORY);
-        temp.add(AdjustTimeForTimeZoneDescriptor.FACTORY);
-        temp.add(IntervalBeforeDescriptor.FACTORY);
-        temp.add(IntervalAfterDescriptor.FACTORY);
-        temp.add(IntervalMeetsDescriptor.FACTORY);
-        temp.add(IntervalMetByDescriptor.FACTORY);
-        temp.add(IntervalOverlapsDescriptor.FACTORY);
-        temp.add(IntervalOverlappedByDescriptor.FACTORY);
-        temp.add(OverlapDescriptor.FACTORY);
-        temp.add(IntervalStartsDescriptor.FACTORY);
-        temp.add(IntervalStartedByDescriptor.FACTORY);
-        temp.add(IntervalCoversDescriptor.FACTORY);
-        temp.add(IntervalCoveredByDescriptor.FACTORY);
-        temp.add(IntervalEndsDecriptor.FACTORY);
-        temp.add(IntervalEndedByDescriptor.FACTORY);
+        // null functions
+        temp.add(IsMissingDescriptor.FACTORY);
+        temp.add(IsNullDescriptor.FACTORY);
+        temp.add(IsUnknownDescriptor.FACTORY);
+        temp.add(IsSystemNullDescriptor.FACTORY);
+        temp.add(CheckUnknownDescriptor.FACTORY);
+
+        // uuid generators (zero independent functions)
+        temp.add(CreateUUIDDescriptor.FACTORY);
+        temp.add(CreateQueryUIDDescriptor.FACTORY);
         temp.add(CurrentDateDescriptor.FACTORY);
         temp.add(CurrentTimeDescriptor.FACTORY);
         temp.add(CurrentDateTimeDescriptor.FACTORY);
-        temp.add(DurationFromMillisecondsDescriptor.FACTORY);
-        temp.add(DurationFromMonthsDescriptor.FACTORY);
-        temp.add(YearMonthDurationComparatorDecriptor.GREATER_THAN_FACTORY);
-        temp.add(YearMonthDurationComparatorDecriptor.LESS_THAN_FACTORY);
-        temp.add(DayTimeDurationComparatorDescriptor.GREATER_THAN_FACTORY);
-        temp.add(DayTimeDurationComparatorDescriptor.LESS_THAN_FACTORY);
-        temp.add(MonthsFromYearMonthDurationDescriptor.FACTORY);
-        temp.add(MillisecondsFromDayTimeDurationDescriptor.FACTORY);
-        temp.add(DurationEqualDescriptor.FACTORY);
-        temp.add(GetYearMonthDurationDescriptor.FACTORY);
-        temp.add(GetDayTimeDurationDescriptor.FACTORY);
-        temp.add(IntervalBinDescriptor.FACTORY);
-        temp.add(OverlapBinsDescriptor.FACTORY);
-        temp.add(DayOfWeekDescriptor.FACTORY);
-        temp.add(ParseDateDescriptor.FACTORY);
-        temp.add(ParseTimeDescriptor.FACTORY);
-        temp.add(ParseDateTimeDescriptor.FACTORY);
-        temp.add(PrintDateDescriptor.FACTORY);
-        temp.add(PrintTimeDescriptor.FACTORY);
-        temp.add(PrintDateTimeDescriptor.FACTORY);
-        temp.add(GetOverlappingIntervalDescriptor.FACTORY);
-        temp.add(DurationFromIntervalDescriptor.FACTORY);
 
-        // Interval constructor
-        temp.add(AIntervalConstructorDescriptor.FACTORY);
-        temp.add(AIntervalStartFromDateConstructorDescriptor.FACTORY);
-        temp.add(AIntervalStartFromDateTimeConstructorDescriptor.FACTORY);
-        temp.add(AIntervalStartFromTimeConstructorDescriptor.FACTORY);
+        // TODO: decide how should we deal these two weird functions as
+        // the number of arguments of the function depend on the first few arguments.
+        temp.add(SimilarityJaccardPrefixDescriptor.FACTORY);
+        temp.add(SimilarityJaccardPrefixCheckDescriptor.FACTORY);
+
+        // functions that need generated class for null-handling.
+        List<IFunctionDescriptorFactory> functionsToInjectUnkownHandling = new ArrayList<>();
+
+        // Element accessors.
+        functionsToInjectUnkownHandling.add(FieldAccessByIndexDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(FieldAccessByNameDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(FieldAccessNestedDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AnyCollectionMemberDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GetItemDescriptor.FACTORY);
+
+        // Numeric functions
+        functionsToInjectUnkownHandling.add(NumericUnaryMinusDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericAddDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericDivideDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericMultiplyDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericSubDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericModuloDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericCaretDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NotDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(LenDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericAbsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericCeilingDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericFloorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericRoundDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericRoundHalfToEvenDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NumericRoundHalfToEven2Descriptor.FACTORY);
+
+        // Comparisons.
+        functionsToInjectUnkownHandling.add(EqualsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GreaterThanDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GreaterThanOrEqualsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(LessThanDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(LessThanOrEqualsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(NotEqualsDescriptor.FACTORY);
+
+        // Binary functions
+        functionsToInjectUnkownHandling.add(BinaryLengthDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ParseBinaryDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(PrintBinaryDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(BinaryConcatDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SubBinaryFromDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SubBinaryFromToDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(FindBinaryDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(FindBinaryFromDescriptor.FACTORY);
+
+        // String functions
+        functionsToInjectUnkownHandling.add(StringLikeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringContainsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringEndsWithDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringStartsWithDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SubstringDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringEqualDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringMatchesDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringLowerCaseDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringUpperCaseDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringMatchesWithFlagDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringReplaceDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringReplaceWithFlagsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringLengthDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(Substring2Descriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SubstringBeforeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SubstringAfterDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringToCodePointDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CodePointToStringDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringConcatDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringJoinDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(RegExpDescriptor.FACTORY);
+
+        // Constructors
+        functionsToInjectUnkownHandling.add(ABooleanConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ANullConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ABinaryHexStringConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ABinaryBase64StringConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AStringConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AInt8ConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AInt16ConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AInt32ConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AInt64ConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AFloatConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ADoubleConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(APointConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(APoint3DConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ALineConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(APolygonConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ACircleConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ARectangleConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ATimeConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ADateConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ADateTimeConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ADurationConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AYearMonthDurationConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ADayTimeDurationConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AUUIDFromStringConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AIntervalConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AIntervalStartFromDateConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AIntervalStartFromDateTimeConstructorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AIntervalStartFromTimeConstructorDescriptor.FACTORY);
+
+        // Spatial
+        functionsToInjectUnkownHandling.add(CreatePointDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CreateLineDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CreatePolygonDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CreateCircleDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CreateRectangleDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SpatialAreaDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SpatialDistanceDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SpatialIntersectDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CreateMBRDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SpatialCellDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(PointXCoordinateAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(PointYCoordinateAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(CircleRadiusAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(CircleCenterAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(LineRectanglePolygonAccessor.FACTORY);
+
+        // fuzzyjoin function
+        functionsToInjectUnkownHandling.add(PrefixLenJaccardDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(WordTokensDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(HashedWordTokensDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CountHashedWordTokensDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GramTokensDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(HashedGramTokensDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CountHashedGramTokensDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(EditDistanceDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(EditDistanceCheckDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(EditDistanceStringIsFilterableDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(EditDistanceListIsFilterableDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(EditDistanceContainsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SimilarityJaccardDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SimilarityJaccardCheckDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SimilarityJaccardSortedDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(SimilarityJaccardSortedCheckDescriptor.FACTORY);
+
+        // Record functions.
+        functionsToInjectUnkownHandling.add(GetRecordFieldsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GetRecordFieldValueDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(FieldAccessByNameDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DeepEqualityDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(RecordMergeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(RecordAddFieldsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(RecordRemoveFieldsDescriptor.FACTORY);
+
+        // Spatial and temporal type accessors
+        functionsToInjectUnkownHandling.add(TemporalYearAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalMonthAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalDayAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalHourAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalMinuteAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalSecondAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalMillisecondAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalStartAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalEndAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalStartDateAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalEndDateAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalStartTimeAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalEndTimeAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalStartDatetimeAccessor.FACTORY);
+        functionsToInjectUnkownHandling.add(TemporalIntervalEndDatetimeAccessor.FACTORY);
+
+        // Temporal functions
+        functionsToInjectUnkownHandling.add(DateFromUnixTimeInDaysDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DateFromDatetimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(TimeFromUnixTimeInMsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(TimeFromDatetimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DatetimeFromUnixTimeInMsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DatetimeFromUnixTimeInSecsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DatetimeFromDateAndTimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CalendarDurationFromDateTimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(CalendarDuartionFromDateDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AdjustDateTimeForTimeZoneDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(AdjustTimeForTimeZoneDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalBeforeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalAfterDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalMeetsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalMetByDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalOverlapsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalOverlappedByDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(OverlapDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalStartsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalStartedByDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalCoversDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalCoveredByDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalEndsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalEndedByDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DurationFromMillisecondsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DurationFromMonthsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(YearMonthDurationGreaterThanComparatorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(YearMonthDurationLessThanComparatorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DayTimeDurationGreaterThanComparatorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DayTimeDurationLessThanComparatorDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(MonthsFromYearMonthDurationDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(MillisecondsFromDayTimeDurationDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DurationEqualDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GetYearMonthDurationDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GetDayTimeDurationDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(IntervalBinDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(OverlapBinsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DayOfWeekDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ParseDateDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ParseTimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(ParseDateTimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(PrintDateDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(PrintTimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(PrintDateTimeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(GetOverlappingIntervalDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(DurationFromIntervalDescriptor.FACTORY);
+
+        List<IFunctionDescriptorFactory> generatedFactories = new ArrayList<>();
+        for (IFunctionDescriptorFactory factory : functionsToInjectUnkownHandling) {
+            generatedFactories
+                    .add(getGeneratedFunctionDescriptorFactory(factory.createFunctionDescriptor().getClass()));
+        }
+        temp.addAll(generatedFactories);
     }
 
     public static List<IFunctionDescriptorFactory> getFunctionDescriptorFactories() {
@@ -592,7 +626,8 @@
      */
     private static IFunctionDescriptorFactory getGeneratedFunctionDescriptorFactory(Class<?> cl) {
         try {
-            String className = cl.getName() + CodeGenUtil.DEFAULT_SUFFIX_FOR_GENERATED_CLASS;
+            String className = CodeGenUtil.getGeneratedFunctionDescriptorClassName(cl.getName(),
+                    CodeGenUtil.DEFAULT_SUFFIX_FOR_GENERATED_CLASS);
             Class<?> generatedCl = cl.getClassLoader().loadClass(className);
             Field factory = generatedCl.getDeclaredField(FACTORY);
             return (IFunctionDescriptorFactory) factory.get(null);
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java
index 03e3fe8..13153c2 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java
@@ -160,14 +160,14 @@
             List<String> fieldName = keyFieldNames.get(pos);
             if (fieldType == null) {
                 fieldType = keyFieldTypes.get(pos);
-                if (keyFieldTypes.get(pos) == BuiltinType.ANULL) {
+                if (keyFieldTypes.get(pos) == BuiltinType.AMISSING) {
                     throw new AsterixException("A field with this name  \"" + fieldName + "\" could not be found.");
                 }
             } else if (openFieldCompositeIdx) {
                 throw new AsterixException("A closed field \"" + fieldName
                         + "\" could be only in a prefix part of the composite index, containing opened field.");
             }
-            if (keyFieldTypes.get(pos) != BuiltinType.ANULL
+            if (keyFieldTypes.get(pos) != BuiltinType.AMISSING
                     && fieldType.getTypeTag() != keyFieldTypes.get(pos).getTypeTag()) {
                 throw new AsterixException(
                         "A field \"" + fieldName + "\" is already defined with the type \"" + fieldType + "\"");
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
index 42b1cc3..5cd049d 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
@@ -34,7 +34,7 @@
 import org.apache.asterix.compiler.provider.ILangCompilationProvider;
 import org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer;
 import org.apache.asterix.dataflow.data.common.AqlMergeAggregationExpressionFactory;
-import org.apache.asterix.dataflow.data.common.AqlNullableTypeComputer;
+import org.apache.asterix.dataflow.data.common.AqlMissableTypeComputer;
 import org.apache.asterix.dataflow.data.common.AqlPartialAggregationTypeComputer;
 import org.apache.asterix.formats.base.IDataFormat;
 import org.apache.asterix.jobgen.QueryLogicalExpressionJobGen;
@@ -64,7 +64,7 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionEvalSizeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IMergeAggregationExpressionFactory;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.LogicalExpressionJobGenToExpressionRuntimeProviderAdapter;
 import org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor;
 import org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPlotter;
@@ -160,10 +160,10 @@
         public IOptimizationContext createOptimizationContext(int varCounter,
                 IExpressionEvalSizeComputer expressionEvalSizeComputer,
                 IMergeAggregationExpressionFactory mergeAggregationExpressionFactory,
-                IExpressionTypeComputer expressionTypeComputer, INullableTypeComputer nullableTypeComputer,
+                IExpressionTypeComputer expressionTypeComputer, IMissableTypeComputer missableTypeComputer,
                 PhysicalOptimizationConfig physicalOptimizationConfig, AlgebricksPartitionConstraint clusterLocations) {
             return new AlgebricksOptimizationContext(varCounter, expressionEvalSizeComputer,
-                    mergeAggregationExpressionFactory, expressionTypeComputer, nullableTypeComputer,
+                    mergeAggregationExpressionFactory, expressionTypeComputer, missableTypeComputer,
                     physicalOptimizationConfig, clusterLocations);
         }
 
@@ -282,7 +282,7 @@
         builder.setIMergeAggregationExpressionFactory(new AqlMergeAggregationExpressionFactory());
         builder.setPartialAggregationTypeComputer(new AqlPartialAggregationTypeComputer());
         builder.setExpressionTypeComputer(AqlExpressionTypeComputer.INSTANCE);
-        builder.setNullableTypeComputer(AqlNullableTypeComputer.INSTANCE);
+        builder.setMissableTypeComputer(AqlMissableTypeComputer.INSTANCE);
         builder.setClusterLocations(queryMetadataProvider.getClusterLocations());
 
         ICompiler compiler = compilerFactory.createCompiler(plan, queryMetadataProvider, t.getVarCounter());
@@ -330,7 +330,7 @@
                 new LogicalExpressionJobGenToExpressionRuntimeProviderAdapter(QueryLogicalExpressionJobGen.INSTANCE));
         builder.setHashFunctionFactoryProvider(format.getBinaryHashFunctionFactoryProvider());
         builder.setHashFunctionFamilyProvider(format.getBinaryHashFunctionFamilyProvider());
-        builder.setNullWriterFactory(format.getNullWriterFactory());
+        builder.setMissingWriterFactory(format.getMissingWriterFactory());
         builder.setPredicateEvaluatorFactoryProvider(format.getPredicateEvaluatorFactoryProvider());
 
         switch (conf.fmt()) {
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
index 2f017e5..65afe3c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
@@ -53,7 +53,7 @@
 import org.apache.asterix.om.util.AsterixAppContextInfo;
 import org.apache.asterix.runtime.evaluators.functions.AndDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CastRecordDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.IsNullDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.IsUnknownDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.NotDescriptor;
 import org.apache.asterix.runtime.job.listener.JobEventListenerFactory;
 import org.apache.asterix.transaction.management.opcallbacks.PrimaryIndexInstantSearchOperationCallbackFactory;
@@ -436,11 +436,11 @@
             RecordDescriptor secondaryRecDesc) throws AlgebricksException {
         IScalarEvaluatorFactory[] andArgsEvalFactories = new IScalarEvaluatorFactory[numSecondaryKeyFields];
         NotDescriptor notDesc = new NotDescriptor();
-        IsNullDescriptor isNullDesc = new IsNullDescriptor();
+        IsUnknownDescriptor isUnknownDesc = new IsUnknownDescriptor();
         for (int i = 0; i < numSecondaryKeyFields; i++) {
             // Access column i, and apply 'is not null'.
             ColumnAccessEvalFactory columnAccessEvalFactory = new ColumnAccessEvalFactory(i);
-            IScalarEvaluatorFactory isNullEvalFactory = isNullDesc
+            IScalarEvaluatorFactory isNullEvalFactory = isUnknownDesc
                     .createEvaluatorFactory(new IScalarEvaluatorFactory[] { columnAccessEvalFactory });
             IScalarEvaluatorFactory notEvalFactory = notDesc
                     .createEvaluatorFactory(new IScalarEvaluatorFactory[] { isNullEvalFactory });
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/runtime/NullMissingTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/runtime/NullMissingTest.java
new file mode 100644
index 0000000..d4b50a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/runtime/NullMissingTest.java
@@ -0,0 +1,105 @@
+
+/*
+ * 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;
+
+import static org.mockito.Mockito.mock;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
+import org.apache.asterix.translator.util.FunctionCollection;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.evaluators.ConstantEvalFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.data.std.primitive.VoidPointable;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class NullMissingTest {
+
+    @Test
+    public void test() throws Exception {
+        List<IFunctionDescriptorFactory> functions = FunctionCollection.getFunctionDescriptorFactories();
+        for (IFunctionDescriptorFactory func : functions) {
+            String className = func.getClass().getName();
+            // We test all generated functions except
+            // record functions, which requires type settings (we test them in runtime tests);
+            if (className.contains("generated") && !className.contains("record")) {
+                testFunction(func);
+            }
+        }
+    }
+
+    private void testFunction(IFunctionDescriptorFactory funcFactory) throws Exception {
+        AbstractScalarFunctionDynamicDescriptor funcDesc = (AbstractScalarFunctionDynamicDescriptor) funcFactory
+                .createFunctionDescriptor();
+        int inputArity = funcDesc.getIdentifier().getArity();
+        Iterator<IScalarEvaluatorFactory[]> argEvalFactoryIterator = getArgCombinations(inputArity);
+        int index = 0;
+        while (argEvalFactoryIterator.hasNext()) {
+            IScalarEvaluatorFactory evalFactory = funcDesc.createEvaluatorFactory(argEvalFactoryIterator.next());
+            IHyracksTaskContext ctx = mock(IHyracksTaskContext.class);
+            IScalarEvaluator evaluator = evalFactory.createScalarEvaluator(ctx);
+            IPointable resultPointable = new VoidPointable();
+            evaluator.evaluate(null, resultPointable);
+            if (index != 0) {
+                Assert.assertTrue(resultPointable.getByteArray()[resultPointable
+                        .getStartOffset()] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
+            } else {
+                Assert.assertTrue(resultPointable.getByteArray()[resultPointable
+                        .getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+            }
+            ++index;
+        }
+    }
+
+    private Iterator<IScalarEvaluatorFactory[]> getArgCombinations(int argSize) {
+        final int numCombinations = 1 << argSize;
+        return new Iterator<IScalarEvaluatorFactory[]>() {
+            private int index = 0;
+
+            @Override
+            public boolean hasNext() {
+                return index < numCombinations;
+            }
+
+            @Override
+            public IScalarEvaluatorFactory[] next() {
+                IScalarEvaluatorFactory[] scalarEvaluatorFactories = new IScalarEvaluatorFactory[argSize];
+                for (int j = 0; j < argSize; ++j) {
+                    byte serializedTypeTag = (index & (1 << j)) != 0 ? ATypeTag.SERIALIZED_MISSING_TYPE_TAG
+                            : ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+                    scalarEvaluatorFactories[j] = new ConstantEvalFactory(new byte[] { serializedTypeTag });
+                }
+                ++index;
+                return scalarEvaluatorFactories;
+            }
+
+        };
+
+    }
+
+}
diff --git a/asterixdb/asterix-app/src/test/resources/metadata/results/basic/metadata_datatype/metadata_datatype.1.adm b/asterixdb/asterix-app/src/test/resources/metadata/results/basic/metadata_datatype/metadata_datatype.1.adm
index 4a303ad..157270f 100644
--- a/asterixdb/asterix-app/src/test/resources/metadata/results/basic/metadata_datatype/metadata_datatype.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/metadata/results/basic/metadata_datatype/metadata_datatype.1.adm
@@ -49,6 +49,7 @@
 { "DataverseName": "Metadata", "DatatypeName": "int8", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
 { "DataverseName": "Metadata", "DatatypeName": "interval", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
 { "DataverseName": "Metadata", "DatatypeName": "line", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
+{ "DataverseName": "Metadata", "DatatypeName": "missing", "Derived": null, "Timestamp": "Mon Apr 25 14:46:17 PDT 2016" }
 { "DataverseName": "Metadata", "DatatypeName": "null", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
 { "DataverseName": "Metadata", "DatatypeName": "point", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
 { "DataverseName": "Metadata", "DatatypeName": "point3d", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
@@ -58,4 +59,4 @@
 { "DataverseName": "Metadata", "DatatypeName": "string", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
 { "DataverseName": "Metadata", "DatatypeName": "time", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
 { "DataverseName": "Metadata", "DatatypeName": "uuid", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
-{ "DataverseName": "Metadata", "DatatypeName": "year-month-duration", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
\ No newline at end of file
+{ "DataverseName": "Metadata", "DatatypeName": "year-month-duration", "Derived": null, "Timestamp": "Thu Dec 17 12:12:59 PST 2015" }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/semistructured/has-param1/has-param1.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/semistructured/has-param1/has-param1.3.query.aql
index a4240fb..62f7690 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/semistructured/has-param1/has-param1.3.query.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/semistructured/has-param1/has-param1.3.query.aql
@@ -20,6 +20,6 @@
 set import-private-functions 'true';
 
 for $o in dataset('Orders')
-where not(is-null($o.param1))
-order by $o.oid 
+where not(is-missing($o.param1))
+order by $o.oid
 return $o
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/array/array.1.query.sqlpp
similarity index 97%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/array/array.1.query.sqlpp
index fbf98ef..dc01561 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/array/array.1.query.sqlpp
@@ -17,4 +17,4 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+[1, null, missing];
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/boolean/boolean.1.query.sqlpp
similarity index 67%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/boolean/boolean.1.query.sqlpp
index fbf98ef..ccb7d66 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/boolean/boolean.1.query.sqlpp
@@ -17,4 +17,21 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+{
+  '1': null and missing,
+  '2': null or missing,
+  '3': null and true,
+  '4': null and false,
+  '5': missing and true,
+  '6': missing and false,
+  '7': null or true,
+  '8': null or false,
+  '9': missing or true,
+  '10': missing or false,
+  '11': null and null,
+  '12': null or null,
+  '13': missing and missing,
+  '14': missing or missing,
+  '15': true and false,
+  '16': true or false
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/ceil/ceil.1.query.sqlpp
similarity index 93%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/ceil/ceil.1.query.sqlpp
index fbf98ef..4896197 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/ceil/ceil.1.query.sqlpp
@@ -17,4 +17,7 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+{
+  'null': CEIL(null),
+  'missing': CEIL(missing)
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/field-access/field-access.1.query.sqlpp
similarity index 92%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/field-access/field-access.1.query.sqlpp
index fbf98ef..9658700 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/field-access/field-access.1.query.sqlpp
@@ -17,4 +17,7 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+{
+  'null': {'a': null}.a,
+  'missing': {'b': missing}.b
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/length/length.1.query.sqlpp
similarity index 93%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/length/length.1.query.sqlpp
index fbf98ef..7f8615a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/length/length.1.query.sqlpp
@@ -17,4 +17,7 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+{
+  'null': LENGTH(null),
+  'missing': LENGTH(missing)
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/lower/lower.1.query.sqlpp
similarity index 93%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/lower/lower.1.query.sqlpp
index fbf98ef..7c0e51e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/lower/lower.1.query.sqlpp
@@ -17,4 +17,7 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+{
+  'null': LOWER(null),
+  'missing': LOWER(missing)
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/scan-collection/scan-collection.1.query.sqlpp
similarity index 82%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/scan-collection/scan-collection.1.query.sqlpp
index fbf98ef..66c8960 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/scan-collection/scan-collection.1.query.sqlpp
@@ -17,4 +17,8 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+{
+  'null': (SELECT ELEMENT item FROM null AS item),
+  'missing': (SELECT ELEMENT item FROM missing AS item),
+  'empty_list': (SELECT ELEMENT item FROM [] AS item)
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/substr/substr.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/substr/substr.1.query.sqlpp
similarity index 70%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/substr/substr.1.query.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/substr/substr.1.query.sqlpp
index bece63a..d6bb472 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/substr/substr.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/substr/substr.1.query.sqlpp
@@ -27,5 +27,17 @@
   'g': SUBSTR(null, null, 2),
   'h': substr(null, 1, null),
   'i': SUBSTR(null, null, null),
-  'j': SUBSTR('abc', null, null)
+  'j': SUBSTR('abc', null, null),
+  'k': SUBSTR(missing, 1),
+  'l': SUBSTR('abc', missing),
+  'm': SUBSTR(missing, missing),
+  'o': SUBSTR(missing, 1, 2),
+  'p': substr('abc', missing, 2),
+  'q': SUBSTR('abc', 1, missing),
+  'r': SUBSTR(missing, missing, 2),
+  's': substr(missing, 1, missing),
+  't': SUBSTR(missing, missing, missing),
+  'u': SUBSTR('abc', missing, missing),
+  'v': SUBSTR(null, missing, missing),
+  'w': SUBSTR(null, null, missing)
 };
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/upper/upper.1.query.sqlpp
similarity index 93%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/upper/upper.1.query.sqlpp
index fbf98ef..7c8e4f3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/upper/upper.1.query.sqlpp
@@ -17,4 +17,7 @@
  * under the License.
  */
 
-LOWER(null);
\ No newline at end of file
+{
+  'null': UPPER(null),
+  'missing': UPPER(missing)
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/ceil/ceil.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/ceil/ceil.1.query.sqlpp
deleted file mode 100644
index c880e2d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/ceil/ceil.1.query.sqlpp
+++ /dev/null
@@ -1,20 +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.
- */
-
-CEIL(null);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/length/length.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/length/length.1.query.sqlpp
deleted file mode 100644
index 034ea1b..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/length/length.1.query.sqlpp
+++ /dev/null
@@ -1,20 +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.
- */
-
-LENGTH(null);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/upper/upper.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/upper/upper.1.query.sqlpp
deleted file mode 100644
index 367ee62..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/upper/upper.1.query.sqlpp
+++ /dev/null
@@ -1,20 +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.
- */
-
-UPPER(null);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp
index ba8ebd4..55123af 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp
@@ -24,6 +24,6 @@
 
 select element o
 from  Orders as o
-where test.not(test."is-null"(o.param1))
+where not("is-missing"(o.param1))
 order by o.oid
 ;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp
index c4119f1..a8f49a9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp
@@ -25,6 +25,6 @@
 
 select element fbu
 from  FacebookUsers as fbu
-where some e in fbu.employment satisfies TinySocial."is-null"(e."end-date")
+where some e in fbu.employment satisfies TinySocial."is-missing"(e."end-date")
 order by fbu.id
 ;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp
index 5611b99..2de3e41 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp
@@ -25,6 +25,6 @@
 
 select element fbu
 from  FacebookUsers as fbu
-where every e in fbu.employment satisfies TinySocial.not(TinySocial."is-null"(e."end-date"))
+where every e in fbu.employment satisfies TinySocial.not(TinySocial."is-missing"(e."end-date"))
 order by fbu.id
 ;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm
index aa5c557..fb2d326 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm
@@ -1,4 +1,4 @@
-{ "orderid": 1000, "ordertot": 97.20656f, "list": [ [ "1.0f", "yassser" ], [ 11, 14, "yasir", 1.6f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ "1.0f", "yassser" ], "item2": [ 11, 14, "yasir", 1.6f ], "item5": null, "item10": null }
-{ "orderid": 1, "ordertot": 7.206f, "list": [ [ 1.0f, "5.2f", "60" ], [ 13231, "foo", null, 13.25d, 13.2f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.0f, "5.2f", "60" ], "item2": [ 13231, "foo", null, 13.25d, 13.2f ], "item5": null, "item10": null }
-{ "orderid": 100, "ordertot": 124.26f, "list": [ [ 1.3f, 5.2f, "60", 12.32f ], [ 10, 2.0f, 3.0d, 40 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.3f, 5.2f, "60", 12.32f ], "item2": [ 10, 2.0f, 3.0d, 40 ], "item5": null, "item10": null }
-{ "orderid": 10, "ordertot": 14.2326f, "list": [ [ 2.4f, "15" ], [ 110 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), { "oid": 75, "total": 87.61863f } ], "item1": [ 2.4f, "15" ], "item2": [ 110 ], "item5": { "oid": 75, "total": 87.61863f }, "item10": null }
+{ "orderid": 1000, "ordertot": 97.20656f, "list": [ [ "1.0f", "yassser" ], [ 11, 14, "yasir", 1.6f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ "1.0f", "yassser" ], "item2": [ 11, 14, "yasir", 1.6f ], "item5": null }
+{ "orderid": 1, "ordertot": 7.206f, "list": [ [ 1.0f, "5.2f", "60" ], [ 13231, "foo", null, 13.25d, 13.2f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.0f, "5.2f", "60" ], "item2": [ 13231, "foo", null, 13.25d, 13.2f ], "item5": null }
+{ "orderid": 100, "ordertot": 124.26f, "list": [ [ 1.3f, 5.2f, "60", 12.32f ], [ 10, 2.0f, 3.0d, 40 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.3f, 5.2f, "60", 12.32f ], "item2": [ 10, 2.0f, 3.0d, 40 ], "item5": null }
+{ "orderid": 10, "ordertot": 14.2326f, "list": [ [ 2.4f, "15" ], [ 110 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), { "oid": 75, "total": 87.61863f } ], "item1": [ 2.4f, "15" ], "item2": [ 110 ], "item5": { "oid": 75, "total": 87.61863f } }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm
index 4d0e0c0..7314f94 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm
@@ -1,4 +1,4 @@
-{ "orderid": 1000, "ordertot": 97.20656f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
-{ "orderid": 1, "ordertot": 7.206f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
-{ "orderid": 100, "ordertot": 124.26f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
-{ "orderid": 10, "ordertot": 14.2326f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
+{ "orderid": 1000, "ordertot": 97.20656f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }} }
+{ "orderid": 1, "ordertot": 7.206f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }} }
+{ "orderid": 100, "ordertot": 124.26f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }} }
+{ "orderid": 10, "ordertot": 14.2326f, "emptyorderedlist": [  ], "emptyunorderedlist": {{  }} }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/array/array.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/array/array.1.adm
new file mode 100644
index 0000000..c239a54
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/array/array.1.adm
@@ -0,0 +1 @@
+[ 1, null, null ]
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/boolean/boolean.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/boolean/boolean.1.adm
new file mode 100644
index 0000000..feb539b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/boolean/boolean.1.adm
@@ -0,0 +1 @@
+{ "2": null, "3": null, "4": false, "6": false, "7": true, "8": null, "9": true, "11": null, "12": null, "15": false, "16": true }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/ceil/ceil.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/ceil/ceil.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/ceil/ceil.1.adm
@@ -0,0 +1 @@
+{ "null": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/field-access/field-access.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/field-access/field-access.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/field-access/field-access.1.adm
@@ -0,0 +1 @@
+{ "null": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/length/length.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/length/length.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/length/length.1.adm
@@ -0,0 +1 @@
+{ "null": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/lower/lower.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/lower/lower.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/lower/lower.1.adm
@@ -0,0 +1 @@
+{ "null": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/scan-collection/scan-collection.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/scan-collection/scan-collection.1.adm
new file mode 100644
index 0000000..3a7ad17
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/scan-collection/scan-collection.1.adm
@@ -0,0 +1 @@
+{ "null": null, "empty_list": [  ] }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/substr/substr.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/substr/substr.1.adm
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results/null/substr/substr.1.adm
rename to asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/substr/substr.1.adm
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/upper/upper.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/upper/upper.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/upper/upper.1.adm
@@ -0,0 +1 @@
+{ "null": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/ceil/ceil.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/ceil/ceil.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/ceil/ceil.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/length/length.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/length/length.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/length/length.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/lower/lower.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/lower/lower.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/lower/lower.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/upper/upper.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/upper/upper.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/upper/upper.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm
index 19da672..72e7ff3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm
@@ -1,9 +1,9 @@
-{ "uname": "BramHatch", "alias": "Bram", "msg": "cemail-service is OMG:(" }
-{ "uname": "BramHatch", "alias": "Bram", "msg": "mand is bad:(" }
-{ "uname": "EmoryUnk", "alias": "Emory", "msg": "u is awesome:)" }
-{ "uname": "IsbelDull", "alias": "Isbel", "msg": "s mind-blowing" }
-{ "uname": "IsbelDull", "alias": "Isbel", "msg": "zing" }
-{ "uname": "MargaritaStoddard", "alias": "Margarita", "msg": " is horrible:(" }
-{ "uname": "MargaritaStoddard", "alias": "Margarita", "msg": " terrible" }
-{ "uname": "MargaritaStoddard", "alias": "Margarita", "msg": "een is horrible" }
-{ "uname": "WillisWynne", "alias": "Willis", "msg": "n is mind-blowing" }
+{ "msg": "cemail-service is OMG:(", "uname": "BramHatch", "alias": "Bram" }
+{ "msg": "mand is bad:(", "uname": "BramHatch", "alias": "Bram" }
+{ "msg": "u is awesome:)", "uname": "EmoryUnk", "alias": "Emory" }
+{ "msg": "s mind-blowing", "uname": "IsbelDull", "alias": "Isbel" }
+{ "msg": "zing", "uname": "IsbelDull", "alias": "Isbel" }
+{ "msg": " is horrible:(", "uname": "MargaritaStoddard", "alias": "Margarita" }
+{ "msg": " terrible", "uname": "MargaritaStoddard", "alias": "Margarita" }
+{ "msg": "een is horrible", "uname": "MargaritaStoddard", "alias": "Margarita" }
+{ "msg": "n is mind-blowing", "uname": "WillisWynne", "alias": "Willis" }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm
index 3181666..3486483 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm
@@ -1,49 +1,49 @@
-{ "emp.id": 1, "emp.supvrid": null }
+{ "emp.id": 1 }
 { "emp.id": 2, "emp.supvrid": 1 }
 { "emp.id": 3, "emp.supvrid": 1 }
 { "emp.id": 4, "emp.supvrid": "1" }
 { "emp.id": 5, "emp.supvrid": 1.0d }
-{ "emp.id": 6, "emp.supvrid": null }
+{ "emp.id": 6 }
 { "emp.id": 7, "emp.supvrid": 2 }
 { "emp.id": 8, "emp.supvrid": 2 }
 { "emp.id": 9, "emp.supvrid": "2" }
 { "emp.id": 10, "emp.supvrid": 2.0d }
-{ "emp.id": 11, "emp.supvrid": null }
+{ "emp.id": 11 }
 { "emp.id": 12, "emp.supvrid": 3 }
 { "emp.id": 13, "emp.supvrid": 3 }
 { "emp.id": 14, "emp.supvrid": "3" }
 { "emp.id": 15, "emp.supvrid": 3.0d }
-{ "emp.id": 16, "emp.supvrid": null }
+{ "emp.id": 16 }
 { "emp.id": 17, "emp.supvrid": 4 }
 { "emp.id": 18, "emp.supvrid": 4 }
 { "emp.id": 19, "emp.supvrid": "4" }
 { "emp.id": 20, "emp.supvrid": 4.0d }
-{ "emp.id": 21, "emp.supvrid": null }
+{ "emp.id": 21 }
 { "emp.id": 22, "emp.supvrid": 5 }
 { "emp.id": 23, "emp.supvrid": 5 }
 { "emp.id": 24, "emp.supvrid": "5" }
 { "emp.id": 25, "emp.supvrid": 5.0d }
-{ "emp.id": 26, "emp.supvrid": null }
+{ "emp.id": 26 }
 { "emp.id": 27, "emp.supvrid": 6 }
 { "emp.id": 28, "emp.supvrid": 6 }
 { "emp.id": 29, "emp.supvrid": "6" }
 { "emp.id": 30, "emp.supvrid": 6.0d }
-{ "emp.id": 31, "emp.supvrid": null }
+{ "emp.id": 31 }
 { "emp.id": 32, "emp.supvrid": 7 }
 { "emp.id": 33, "emp.supvrid": 7 }
 { "emp.id": 34, "emp.supvrid": "7" }
 { "emp.id": 35, "emp.supvrid": 7.0d }
-{ "emp.id": 36, "emp.supvrid": null }
+{ "emp.id": 36 }
 { "emp.id": 37, "emp.supvrid": 8 }
 { "emp.id": 38, "emp.supvrid": 8 }
 { "emp.id": 39, "emp.supvrid": "8" }
 { "emp.id": 40, "emp.supvrid": 8.0d }
-{ "emp.id": 41, "emp.supvrid": null }
+{ "emp.id": 41 }
 { "emp.id": 42, "emp.supvrid": 9 }
 { "emp.id": 43, "emp.supvrid": 9 }
 { "emp.id": 44, "emp.supvrid": "9" }
 { "emp.id": 45, "emp.supvrid": 9.0d }
-{ "emp.id": 46, "emp.supvrid": null }
+{ "emp.id": 46 }
 { "emp.id": 47, "emp.supvrid": 10 }
 { "emp.id": 48, "emp.supvrid": 10 }
 { "emp.id": 49, "emp.supvrid": "10" }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast
index 5fb8fda..1bdd63d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast
@@ -11,7 +11,7 @@
 ]
 Where
   FunctionCall test.not@1[
-    FunctionCall test.is-null@1[
+    FunctionCall test.is-missing@1[
       FieldAccessor [
         Variable [ Name=$o ]
         Field=param1
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast
index c6a14c7..e4278c4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast
@@ -18,7 +18,7 @@
       ]
     ]
     Satifies [
-      FunctionCall TinySocial.is-null@1[
+      FunctionCall TinySocial.is-missing@1[
         FieldAccessor [
           Variable [ Name=$e ]
           Field=end-date
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast
index 0bc18b9..d82f5bd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast
@@ -19,7 +19,7 @@
     ]
     Satifies [
       FunctionCall TinySocial.not@1[
-        FunctionCall TinySocial.is-null@1[
+        FunctionCall TinySocial.is-missing@1[
           FieldAccessor [
             Variable [ Name=$e ]
             Field=end-date
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index b753974..86d5822 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -3582,28 +3582,48 @@
       </compilation-unit>
     </test-case>
   </test-group>
-  <test-group name="null">
-    <test-case FilePath="null">
+  <test-group name="null-missing">
+    <test-case FilePath="null-missing">
+      <compilation-unit name="array">
+        <output-dir compare="Text">array</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="null-missing">
+      <compilation-unit name="boolean">
+        <output-dir compare="Text">boolean</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="null-missing">
       <compilation-unit name="ceil">
         <output-dir compare="Text">ceil</output-dir>
       </compilation-unit>
     </test-case>
-    <test-case FilePath="null">
+    <test-case FilePath="null-missing">
+      <compilation-unit name="field-access">
+        <output-dir compare="Text">field-access</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="null-missing">
       <compilation-unit name="length">
         <output-dir compare="Text">length</output-dir>
       </compilation-unit>
     </test-case>
-    <test-case FilePath="null">
+    <test-case FilePath="null-missing">
       <compilation-unit name="lower">
         <output-dir compare="Text">lower</output-dir>
       </compilation-unit>
     </test-case>
-    <test-case FilePath="null">
+    <test-case FilePath="null-missing">
+      <compilation-unit name="scan-collection">
+        <output-dir compare="Text">scan-collection</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="null-missing">
       <compilation-unit name="substr">
         <output-dir compare="Text">substr</output-dir>
       </compilation-unit>
     </test-case>
-    <test-case FilePath="null">
+    <test-case FilePath="null-missing">
       <compilation-unit name="upper">
         <output-dir compare="Text">upper</output-dir>
       </compilation-unit>
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
index c7304a1..d78abb6 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
@@ -21,7 +21,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -52,7 +52,8 @@
             IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] fieldPermutation,
             IndexOperation op, IIndexDataflowHelperFactory dataflowHelperFactory,
             ITupleFilterFactory tupleFilterFactory, boolean isPrimary, String indexName,
-            INullWriterFactory nullWriterFactory, IModificationOperationCallbackFactory modificationOpCallbackProvider,
+            IMissingWriterFactory nullWriterFactory,
+            IModificationOperationCallbackFactory modificationOpCallbackProvider,
             ISearchOperationCallbackFactory searchOpCallbackProvider) {
         super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, bloomFilterKeyFields, fieldPermutation, op, dataflowHelperFactory,
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java
index 49c5943..fa6897f 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java
@@ -35,7 +35,7 @@
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
@@ -49,16 +49,16 @@
     private final int[] ridFields;
     private Map<String, String> configuration;
     private final boolean retainInput;
-    private final boolean retainNull;
-    private final INullWriterFactory iNullWriterFactory;
+    private final boolean retainMissing;
+    private final IMissingWriterFactory isMissingWriterFactory;
 
     public LookupAdapterFactory(ARecordType recordType, int[] ridFields, boolean retainInput, boolean retainNull,
-            INullWriterFactory iNullWriterFactory) {
+            IMissingWriterFactory iNullWriterFactory) {
         this.recordType = recordType;
         this.ridFields = ridFields;
         this.retainInput = retainInput;
-        this.retainNull = retainNull;
-        this.iNullWriterFactory = iNullWriterFactory;
+        this.retainMissing = retainNull;
+        this.isMissingWriterFactory = iNullWriterFactory;
     }
 
     public LookupAdapter<T> createAdapter(IHyracksTaskContext ctx, int partition, RecordDescriptor inRecDesc,
@@ -69,8 +69,8 @@
                     snapshotAccessor);
             reader.configure(configuration);
             RecordIdReader ridReader = RecordIdReaderFactory.create(configuration, ridFields);
-            return new LookupAdapter<T>(dataParser, reader, inRecDesc, ridReader, retainInput, retainNull,
-                    iNullWriterFactory, ctx, writer);
+            return new LookupAdapter<>(dataParser, reader, inRecDesc, ridReader, retainInput, retainMissing,
+                    isMissingWriterFactory, ctx, writer);
         } catch (Exception e) {
             throw new HyracksDataException(e);
         }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java
index 69cd063..baf5dba 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java
@@ -31,8 +31,8 @@
 import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.comm.VSizeFrame;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -52,11 +52,11 @@
     private FrameTupleAccessor tupleAccessor;
     private IFrameWriter writer;
     private FrameTupleReference frameTuple;
-    private ArrayTupleBuilder nullTupleBuild;
+    private ArrayTupleBuilder missingTupleBuild;
 
     public LookupAdapter(IRecordDataParser<T> dataParser, ILookupRecordReader<? extends T> recordReader,
             RecordDescriptor inRecDesc, RecordIdReader ridReader, boolean propagateInput, boolean retainNull,
-            INullWriterFactory iNullWriterFactory, IHyracksTaskContext ctx, IFrameWriter writer)
+            IMissingWriterFactory iNullWriterFactory, IHyracksTaskContext ctx, IFrameWriter writer)
                     throws HyracksDataException {
         this.dataParser = dataParser;
         this.recordReader = recordReader;
@@ -70,7 +70,7 @@
         this.writer = writer;
     }
 
-    private void configurePropagation(INullWriterFactory iNullWriterFactory) {
+    private void configurePropagation(IMissingWriterFactory iNullWriterFactory) {
         if (propagateInput) {
             // This LookupAdapter generates an external record as its output.
             // Thus, we add 1.
@@ -80,16 +80,16 @@
             tb = new ArrayTupleBuilder(1);
         }
         if (retainNull) {
-            INullWriter nullWriter = iNullWriterFactory.createNullWriter();
-            nullTupleBuild = new ArrayTupleBuilder(1);
-            DataOutput out = nullTupleBuild.getDataOutput();
+            IMissingWriter missingWriter = iNullWriterFactory.createMissingWriter();
+            missingTupleBuild = new ArrayTupleBuilder(1);
+            DataOutput out = missingTupleBuild.getDataOutput();
             try {
-                nullWriter.writeNull(out);
+                missingWriter.writeMissing(out);
             } catch (IOException e) {
                 e.printStackTrace();
             }
         } else {
-            nullTupleBuild = null;
+            missingTupleBuild = null;
         }
     }
 
@@ -131,7 +131,7 @@
                     tb.addFieldEndOffset();
                     DataflowUtils.addTupleToFrame(appender, tb, writer);
                 } else if (retainNull) {
-                    tb.getDataOutput().write(nullTupleBuild.getByteArray());
+                    tb.getDataOutput().write(missingTupleBuild.getByteArray());
                     tb.addFieldEndOffset();
                     DataflowUtils.addTupleToFrame(appender, tb, writer);
                 }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java
index 2b4cc9c..5de2d9d 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java
@@ -31,7 +31,7 @@
 
 public class RecordIdReader {
 
-    private final static byte nullByte = ATypeTag.NULL.serialize();
+    private final static byte MISSING_BYTE = ATypeTag.SERIALIZED_MISSING_TYPE_TAG;
     protected FrameTupleAccessor tupleAccessor;
     protected int fieldSlotsLength;
     protected int[] ridFields;
@@ -60,7 +60,7 @@
         int fileNumberStartOffset = tupleAccessor.getFieldStartOffset(index,
                 ridFields[IndexingConstants.FILE_NUMBER_FIELD_INDEX]);
         frameBuffer = tupleAccessor.getBuffer();
-        if (frameBuffer.get(tupleStartOffset + fileNumberStartOffset) == nullByte) {
+        if (frameBuffer.get(tupleStartOffset + fileNumberStartOffset) == MISSING_BYTE) {
             return null;
         }
         // Get file number
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java
index df0ddc8..4f5242e 100755
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java
@@ -77,12 +77,12 @@
         ((IExternalScalarFunction) externalFunction).evaluate(argumentProvider);
         /*
          * Make sure that if "setResult" is not called,
-         * or the result object is null we let Hyracks storage manager know
-         * we want to discard a null object
+         * or the result object is missing we let Hyracks storage manager know
+         * we want to discard a missing object
          */
         byte byteOutput = resultBuffer.getByteArray()[0];
-        if (!argumentProvider.isValidResult() || byteOutput == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-            resultBuffer.getDataOutput().writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+        if (!argumentProvider.isValidResult() || byteOutput == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+            resultBuffer.getDataOutput().writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
         }
     }
 
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
index cdd29ff..e2ed092 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
@@ -18,8 +18,6 @@
  */
 package org.apache.asterix.external.library;
 
-import java.util.List;
-
 import org.apache.asterix.external.api.IJObject;
 import org.apache.asterix.external.library.java.JObjects.JBoolean;
 import org.apache.asterix.external.library.java.JObjects.JCircle;
@@ -43,7 +41,6 @@
 import org.apache.asterix.external.library.java.JObjects.JUnorderedList;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.AUnorderedListType;
 import org.apache.asterix.om.types.IAType;
@@ -135,18 +132,16 @@
                 break;
             case UNION:
                 AUnionType unionType = (AUnionType) type;
-                List<IAType> unionList = unionType.getUnionList();
                 IJObject itemObject = null;
-                for (IAType elementType : unionList) {
-                    if (!elementType.getTypeTag().equals(ATypeTag.NULL)) {
-                        itemObject = create(elementType);
-                        break;
-                    }
+                if (unionType.isMissableType()) {
+                    itemObject = create(unionType);
                 }
-                return retValue = itemObject;
+                retValue = itemObject;
+                break;
             default:
                 break;
         }
         return retValue;
     }
+
 }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
index ed3cd32..0630985 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
@@ -254,17 +254,18 @@
                 dis.readInt(); // list size
                 int numberOfitems;
                 numberOfitems = dis.readInt();
-                if (numberOfitems > 0) {
-                    if (!fixedSize) {
-                        for (int i = 0; i < numberOfitems; i++)
-                            dis.readInt();
-                    }
+                if (numberOfitems <= 0) {
+                    break;
+                }
+                if (!fixedSize) {
                     for (int i = 0; i < numberOfitems; i++) {
-                        IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
-                        ((JUnorderedList) jObject).add(v);
+                        dis.readInt();
                     }
                 }
-
+                for (int i = 0; i < numberOfitems; i++) {
+                    IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
+                    ((JUnorderedList) jObject).add(v);
+                }
                 break;
             }
             case ORDEREDLIST: {
@@ -289,17 +290,18 @@
                 dis.readInt(); // list size
                 int numberOfitems;
                 numberOfitems = dis.readInt();
-                if (numberOfitems > 0) {
-                    if (!fixedSize) {
-                        for (int i = 0; i < numberOfitems; i++)
-                            dis.readInt();
-                    }
+                if (numberOfitems <= 0) {
+                    break;
+                }
+                if (!fixedSize) {
                     for (int i = 0; i < numberOfitems; i++) {
-                        IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
-                        ((JOrderedList) jObject).add(v);
+                        dis.readInt();
                     }
                 }
-
+                for (int i = 0; i < numberOfitems; i++) {
+                    IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
+                    ((JOrderedList) jObject).add(v);
+                }
                 break;
             }
             case RECORD:
@@ -348,7 +350,7 @@
                         IAType fieldType = fieldTypes[fieldNumber];
                         if (fieldTypes[fieldNumber].getTypeTag() == ATypeTag.UNION) {
                             if (((AUnionType) fieldTypes[fieldNumber]).isNullableType()) {
-                                fieldType = ((AUnionType) fieldTypes[fieldNumber]).getNullableType();
+                                fieldType = ((AUnionType) fieldTypes[fieldNumber]).getActualType();
                                 fieldValueTypeTag = fieldType.getTypeTag();
                             }
                         } else {
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
index a0e66b1..ebda69c 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
@@ -143,7 +143,7 @@
         public void serialize(DataOutput dataOutput, boolean writeTypeTag) throws HyracksDataException {
             if (writeTypeTag) {
                 try {
-                    dataOutput.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                    dataOutput.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
                 } catch (IOException e) {
                     throw new HyracksDataException(e);
                 }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
index 26c9c7d..c1903e0 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
@@ -21,7 +21,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -42,11 +42,11 @@
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] lowKeyFields,
             int[] highKeyFields, boolean lowKeyInclusive, boolean highKeyInclusive,
-            IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainNull,
-            INullWriterFactory iNullWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider) {
+            IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainMissing,
+            IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider) {
         super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, bloomFilterKeyFields, lowKeyFields, highKeyFields, lowKeyInclusive,
-                highKeyInclusive, dataflowHelperFactory, retainInput, retainNull, iNullWriterFactory,
+                highKeyInclusive, dataflowHelperFactory, retainInput, retainMissing, missingWriterFactory,
                 searchOpCallbackProvider, null, null);
     }
 
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java
index 9435387..9b83a12 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java
@@ -51,20 +51,20 @@
         accessor = new FrameTupleAccessor(inputRecDesc);
         dataFlowHelper.open();
         index = indexHelper.getIndexInstance();
-        if (retainNull) {
+        if (retainMissing) {
             int fieldCount = getFieldCount();
-            nullTupleBuild = new ArrayTupleBuilder(fieldCount);
-            DataOutput out = nullTupleBuild.getDataOutput();
+            nonMatchTupleBuild = new ArrayTupleBuilder(fieldCount);
+            DataOutput out = nonMatchTupleBuild.getDataOutput();
             for (int i = 0; i < fieldCount; i++) {
                 try {
-                    nullWriter.writeNull(out);
+                    nonMatchWriter.writeMissing(out);
                 } catch (IOException e) {
                     e.printStackTrace();
                 }
-                nullTupleBuild.addFieldEndOffset();
+                nonMatchTupleBuild.addFieldEndOffset();
             }
         } else {
-            nullTupleBuild = null;
+            nonMatchTupleBuild = null;
         }
         ExternalBTreeWithBuddy externalIndex = (ExternalBTreeWithBuddy) index;
         try {
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
index 2cab3a7..f4c7644 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
@@ -26,7 +26,7 @@
 import org.apache.asterix.external.indexing.FilesIndexDescription;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -52,19 +52,19 @@
             boolean propagateInput, IIndexLifecycleManagerProvider lcManagerProvider,
             IStorageManagerInterface storageManager, IFileSplitProvider fileSplitProvider, int datasetId,
             double bloomFilterFalsePositiveRate, ISearchOperationCallbackFactory searchOpCallbackFactory,
-            boolean retainNull, INullWriterFactory iNullWriterFactory) {
+            boolean retainMissing, IMissingWriterFactory missingWriterFactory) {
         super(spec, 1, 1, outRecDesc, storageManager, lcManagerProvider, fileSplitProvider,
                 new FilesIndexDescription().EXTERNAL_FILE_INDEX_TYPE_TRAITS,
                 new FilesIndexDescription().FILES_INDEX_COMP_FACTORIES, FilesIndexDescription.BLOOM_FILTER_FIELDS,
-                externalFilesIndexDataFlowHelperFactory, null, propagateInput, retainNull, iNullWriterFactory, null,
-                searchOpCallbackFactory, null);
+                externalFilesIndexDataFlowHelperFactory, null, propagateInput, retainMissing, missingWriterFactory,
+                null, searchOpCallbackFactory, null);
         this.adapterFactory = adapterFactory;
     }
 
     @Override
     public IOperatorNodePushable createPushRuntime(final IHyracksTaskContext ctx,
             final IRecordDescriptorProvider recordDescProvider, final int partition, int nPartitions)
-                    throws HyracksDataException {
+            throws HyracksDataException {
         // Create a file index accessor to be used for files lookup operations
         // Note that all file index accessors will use partition 0 since we only have 1 files index per NC
         final ExternalFileIndexAccessor snapshotAccessor = new ExternalFileIndexAccessor(
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
index 306f75a..e217365 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
@@ -21,7 +21,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -41,10 +41,10 @@
             IStorageManagerInterface storageManager, IIndexLifecycleManagerProvider lifecycleManagerProvider,
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] comparatorFactories, int[] keyFields,
-            ExternalRTreeDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainNull,
-            INullWriterFactory iNullWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory) {
+            ExternalRTreeDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainMissing,
+            IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory) {
         super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, keyFields, dataflowHelperFactory, retainInput, retainNull, iNullWriterFactory,
+                comparatorFactories, keyFields, dataflowHelperFactory, retainInput, retainMissing, missingWriterFactory,
                 searchOpCallbackFactory, null, null);
     }
 
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java
index 81e6b17..cda2985 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java
@@ -50,20 +50,20 @@
         indexHelper.open();
         ExternalRTreeDataflowHelper rTreeDataflowHelper = (ExternalRTreeDataflowHelper) indexHelper;
         index = indexHelper.getIndexInstance();
-        if (retainNull) {
+        if (retainMissing) {
             int fieldCount = getFieldCount();
-            nullTupleBuild = new ArrayTupleBuilder(fieldCount);
-            DataOutput out = nullTupleBuild.getDataOutput();
+            nonMatchTupleBuild = new ArrayTupleBuilder(fieldCount);
+            DataOutput out = nonMatchTupleBuild.getDataOutput();
             for (int i = 0; i < fieldCount; i++) {
                 try {
-                    nullWriter.writeNull(out);
+                    nonMatchWriter.writeMissing(out);
                 } catch (IOException e) {
                     e.printStackTrace();
                 }
-                nullTupleBuild.addFieldEndOffset();
+                nonMatchTupleBuild.addFieldEndOffset();
             }
         } else {
-            nullTupleBuild = null;
+            nonMatchTupleBuild = null;
         }
         ExternalRTree rTreeIndex = (ExternalRTree) index;
         try {
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
index 2bc6043..63a3780 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
@@ -21,7 +21,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.ActivityId;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -114,12 +114,12 @@
     }
 
     @Override
-    public boolean getRetainNull() {
+    public boolean getRetainMissing() {
         return false;
     }
 
     @Override
-    public INullWriterFactory getNullWriterFactory() {
+    public IMissingWriterFactory getMissingWriterFactory() {
         return null;
     }
 
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
index c273412..0ad7be1 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
@@ -464,11 +464,10 @@
         }
 
         if (aObjectType.getTypeTag() == ATypeTag.UNION) {
-            List<IAType> unionList = ((AUnionType) aObjectType).getUnionList();
-            for (int i = 0; i < unionList.size(); i++) {
-                if (unionList.get(i).getTypeTag() == tag) {
-                    return unionList.get(i);
-                }
+            AUnionType unionType = (AUnionType) aObjectType;
+            IAType type = unionType.getActualType();
+            if (type.getTypeTag() == tag) {
+                return type;
             }
         }
         return null; // wont get here
@@ -490,7 +489,7 @@
         } else { // union
             List<IAType> unionList = ((AUnionType) aObjectType).getUnionList();
             for (IAType t : unionList) {
-                ATypeTag typeTag = t.getTypeTag();
+                final ATypeTag typeTag = t.getTypeTag();
                 if (ATypeHierarchy.canPromote(expectedTypeTag, typeTag)
                         || ATypeHierarchy.canDemote(expectedTypeTag, typeTag)) {
                     return typeTag;
@@ -621,7 +620,6 @@
     }
 
     private int checkNullConstraints(ARecordType recType, BitSet nulls) {
-        boolean isNull = false;
         for (int i = 0; i < recType.getFieldTypes().length; i++) {
             if (nulls.get(i) == false) {
                 IAType type = recType.getFieldTypes()[i];
@@ -629,17 +627,13 @@
                     return i;
                 }
 
-                if (type.getTypeTag() == ATypeTag.UNION) { // union
-                    List<IAType> unionList = ((AUnionType) type).getUnionList();
-                    for (int j = 0; j < unionList.size(); j++) {
-                        if (unionList.get(j).getTypeTag() == ATypeTag.NULL) {
-                            isNull = true;
-                            break;
-                        }
-                    }
-                    if (!isNull) {
-                        return i;
-                    }
+                if (type.getTypeTag() != ATypeTag.UNION) {
+                    continue;
+                }
+                // union
+                AUnionType unionType = (AUnionType) type;
+                if (!unionType.isNullableType()) {
+                    return i;
                 }
             }
         }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java
index 725ef22..28fd169 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java
@@ -167,7 +167,9 @@
         cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote);
         if (in != null && hasHeader) {
             cursor.nextRecord();
-            while (cursor.nextField());
+            while (cursor.nextField()) {
+                ;
+            }
         }
     }
 
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
index 6e7e7f3..9723461 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
@@ -218,7 +218,7 @@
             if (NonTaggedFormatUtil.isOptional(type)) {
                 throw new NotImplementedException("Non-optional UNION type is not supported.");
             }
-            tag = ((AUnionType) type).getNullableType().getTypeTag();
+            tag = ((AUnionType) type).getActualType().getTypeTag();
         }
         if (tag == null) {
             throw new NotImplementedException("Failed to get the type information for field " + i + ".");
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java
index 38932d3..5c46a42 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java
@@ -77,7 +77,7 @@
             rwm = converter.convert(record);
             if (rwm.getRecord().size() == 0) {
                 // null record
-                out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
             } else {
                 recordParser.parse(rwm.getRecord(), out);
             }
@@ -90,7 +90,7 @@
     public void parseMeta(DataOutput out) throws HyracksDataException {
         try {
             if (rwm.getRecord().size() == 0) {
-                out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
             } else {
                 metaBuilder.reset(metaType);
                 metaBuilder.init();
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java
index f40cd15..e39e3bd 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java
@@ -30,7 +30,7 @@
 import org.apache.asterix.external.util.ExternalDataCompatibilityUtils;
 import org.apache.asterix.external.util.ExternalDataUtils;
 import org.apache.asterix.om.types.ARecordType;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 
 /**
  * This class represents the entry point to all things adapters
@@ -61,10 +61,10 @@
 
     // Lookup Adapters
     public static LookupAdapterFactory<?> getLookupAdapterFactory(Map<String, String> configuration,
-            ARecordType recordType, int[] ridFields, boolean retainInput, boolean retainNull,
-            INullWriterFactory iNullWriterFactory) throws AsterixException {
+            ARecordType recordType, int[] ridFields, boolean retainInput, boolean retainMissing,
+            IMissingWriterFactory missingWriterFactory) throws AsterixException {
         LookupAdapterFactory<?> adapterFactory = new LookupAdapterFactory<>(recordType, ridFields, retainInput,
-                retainNull, iNullWriterFactory);
+                retainMissing, missingWriterFactory);
         adapterFactory.configure(configuration);
         return adapterFactory;
     }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
index 76898c2..1df4e42 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
@@ -19,7 +19,6 @@
 package org.apache.asterix.external.util;
 
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.asterix.common.exceptions.AsterixException;
@@ -31,7 +30,6 @@
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.IAType;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.dataflow.common.data.parsers.DoubleParserFactory;
 import org.apache.hyracks.dataflow.common.data.parsers.FloatParserFactory;
@@ -164,11 +162,11 @@
         for (int i = 0; i < n; i++) {
             ATypeTag tag = null;
             if (recordType.getFieldTypes()[i].getTypeTag() == ATypeTag.UNION) {
-                List<IAType> unionTypes = ((AUnionType) recordType.getFieldTypes()[i]).getUnionList();
-                if ((unionTypes.size() != 2) && (unionTypes.get(0).getTypeTag() != ATypeTag.NULL)) {
+                AUnionType unionType = (AUnionType) recordType.getFieldTypes()[i];
+                if (!unionType.isNullableType()) {
                     throw new NotImplementedException("Non-optional UNION type is not supported.");
                 }
-                tag = unionTypes.get(1).getTypeTag();
+                tag = unionType.getActualType().getTypeTag();
             } else {
                 tag = recordType.getFieldTypes()[i].getTypeTag();
             }
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
index 3c22241..923163f 100644
--- a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
@@ -339,11 +339,11 @@
             // add field value to value buffer
             writeFieldValueToBuffer(fieldType, fieldValueBuffer.getDataOutput(), fldName, entry.getValue(), pAd);
             if (openRecordField) {
-                if (fieldValueBuffer.getByteArray()[0] != ATypeTag.NULL.serialize()) {
+                if (fieldValueBuffer.getByteArray()[0] != ATypeTag.MISSING.serialize()) {
                     recBuilder.addField(fieldNameBuffer, fieldValueBuffer);
                 }
             } else if (NonTaggedFormatUtil.isOptional(fieldType)) {
-                if (fieldValueBuffer.getByteArray()[0] != ATypeTag.NULL.serialize()) {
+                if (fieldValueBuffer.getByteArray()[0] != ATypeTag.MISSING.serialize()) {
                     recBuilder.addField(fieldId, fieldValueBuffer);
                 }
             } else {
@@ -387,7 +387,7 @@
 
         if (fieldType != null) {
             if (NonTaggedFormatUtil.isOptional(fieldType)) {
-                fieldType = ((AUnionType) fieldType).getNullableType();
+                fieldType = ((AUnionType) fieldType).getActualType();
             }
         }
         switch (val.getValueType()) {
@@ -622,23 +622,16 @@
     }
 
     public static int checkNullConstraints(ARecordType recType, BitSet nulls) {
-        boolean isNull = false;
         for (int i = 0; i < recType.getFieldTypes().length; i++) {
             if (nulls.get(i) == false) {
                 IAType type = recType.getFieldTypes()[i];
-                if (type.getTypeTag() != ATypeTag.NULL && type.getTypeTag() != ATypeTag.UNION) {
+                if (type.getTypeTag() != ATypeTag.MISSING && type.getTypeTag() != ATypeTag.UNION) {
                     return i;
                 }
 
                 if (type.getTypeTag() == ATypeTag.UNION) { // union
-                    List<IAType> unionList = ((AUnionType) type).getUnionList();
-                    for (int j = 0; j < unionList.size(); j++) {
-                        if (unionList.get(j).getTypeTag() == ATypeTag.NULL) {
-                            isNull = true;
-                            break;
-                        }
-                    }
-                    if (!isNull) {
+                    AUnionType unionType = (AUnionType) type;
+                    if (!unionType.isNullableType()) {
                         return i;
                     }
                 }
@@ -685,7 +678,7 @@
             case SLIST_VALUE:
                 return ATypeTag.UNORDEREDLIST;
             case NULL_VALUE:
-                return ATypeTag.NULL;
+                return ATypeTag.MISSING;
             case REAL_VALUE:
                 return ATypeTag.DOUBLE;
             case RELATIVE_TIME_VALUE:
diff --git a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
index 8205021..63b066e 100644
--- a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
+++ b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
@@ -88,6 +88,7 @@
 import org.apache.asterix.lang.common.literal.FalseLiteral;
 import org.apache.asterix.lang.common.literal.FloatLiteral;
 import org.apache.asterix.lang.common.literal.LongIntegerLiteral;
+import org.apache.asterix.lang.common.literal.MissingLiteral;
 import org.apache.asterix.lang.common.literal.NullLiteral;
 import org.apache.asterix.lang.common.literal.StringLiteral;
 import org.apache.asterix.lang.common.literal.TrueLiteral;
@@ -1907,6 +1908,10 @@
     {
       lit.setValue(new DoubleLiteral(new Double(token.image)));
     }
+  | <MISSING>
+    {
+      lit.setValue(MissingLiteral.INSTANCE);
+    }
   | <NULL>
     {
       lit.setValue(NullLiteral.INSTANCE);
@@ -2609,7 +2614,8 @@
 <DEFAULT,IN_DBL_BRACE>
 TOKEN :
 {
-    <NULL : "null">
+  < MISSING : "missing">
+  | <NULL : "null">
   | <TRUE : "true">
   | <FALSE : "false">
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
index 34e1363..1ca8ac46 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
@@ -29,6 +29,7 @@
     public enum Type {
         STRING,
         INTEGER,
+        MISSING,
         NULL,
         TRUE,
         FALSE,
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/MissingLiteral.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/MissingLiteral.java
new file mode 100644
index 0000000..2c2fa8e
--- /dev/null
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/MissingLiteral.java
@@ -0,0 +1,55 @@
+/*
+ * 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.lang.common.literal;
+
+import org.apache.asterix.lang.common.base.Literal;
+
+public class MissingLiteral extends Literal {
+    private static final long serialVersionUID = 1L;
+
+    private MissingLiteral() {
+    }
+
+    public final static MissingLiteral INSTANCE = new MissingLiteral();
+
+    @Override
+    public Type getLiteralType() {
+        return Type.MISSING;
+    }
+
+    @Override
+    public String getStringValue() {
+        return "missing";
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj == INSTANCE;
+    }
+
+    @Override
+    public int hashCode() {
+        return (int) serialVersionUID;
+    }
+
+    @Override
+    public Object getValue() {
+        return null;
+    }
+}
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
index a1e6363..b332df3 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
@@ -27,9 +27,9 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.asterix.common.config.MetadataConstants;
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
+import org.apache.asterix.common.config.MetadataConstants;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
@@ -158,7 +158,7 @@
     public Void visit(LiteralExpr l, Integer step) {
         Literal lc = l.getValue();
         if (lc.getLiteralType().equals(Literal.Type.TRUE) || lc.getLiteralType().equals(Literal.Type.FALSE)
-                || lc.getLiteralType().equals(Literal.Type.NULL)) {
+                || lc.getLiteralType().equals(Literal.Type.NULL) || lc.getLiteralType().equals(Literal.Type.MISSING)) {
             out.print(lc.getLiteralType().toString().toLowerCase());
         } else if (lc.getLiteralType().equals(Literal.Type.STRING)) {
             out.print(revertStringToLiteral(lc.getStringValue()));
@@ -455,7 +455,8 @@
         if (dd.getDatasetType() == DatasetType.INTERNAL) {
             String temp = dd.getDatasetDetailsDecl().isTemp() ? "temporary" : "";
             out.print(skip(step) + "create " + temp + datasetSymbol + generateFullName(dd.getDataverse(), dd.getName())
-                    + generateIfNotExists(dd.getIfNotExists()) + "(" + dd.getQualifiedTypeName() + ")" + " primary key ");
+                    + generateIfNotExists(dd.getIfNotExists()) + "(" + dd.getQualifiedTypeName() + ")"
+                    + " primary key ");
             printDelimitedKeys(((InternalDetailsDecl) dd.getDatasetDetailsDecl()).getPartitioningExprs(), ",");
             if (((InternalDetailsDecl) dd.getDatasetDetailsDecl()).isAutogenerated()) {
                 out.print(" autogenerated ");
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java
index c635403..ceb45bb 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java
@@ -98,7 +98,7 @@
     public Void visit(LiteralExpr l, Integer step) {
         Literal lc = l.getValue();
         if (lc.getLiteralType().equals(Literal.Type.TRUE) || lc.getLiteralType().equals(Literal.Type.FALSE)
-                || lc.getLiteralType().equals(Literal.Type.NULL)) {
+                || lc.getLiteralType().equals(Literal.Type.NULL) || lc.getLiteralType().equals(Literal.Type.MISSING)) {
             out.println(skip(step) + "LiteralExpr [" + l.getValue().getLiteralType() + "]");
         } else {
             out.println(skip(step) + "LiteralExpr [" + l.getValue().getLiteralType() + "] ["
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index 3c81cff..c26edc1 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -83,6 +83,7 @@
 import org.apache.asterix.lang.common.literal.FalseLiteral;
 import org.apache.asterix.lang.common.literal.FloatLiteral;
 import org.apache.asterix.lang.common.literal.LongIntegerLiteral;
+import org.apache.asterix.lang.common.literal.MissingLiteral;
 import org.apache.asterix.lang.common.literal.NullLiteral;
 import org.apache.asterix.lang.common.literal.StringLiteral;
 import org.apache.asterix.lang.common.literal.TrueLiteral;
@@ -1896,6 +1897,10 @@
     {
       lit.setValue(new DoubleLiteral(new Double(token.image)));
     }
+  | <MISSING>
+    {
+      lit.setValue(MissingLiteral.INSTANCE);
+    }
   | <NULL>
     {
       lit.setValue(NullLiteral.INSTANCE);
@@ -2854,7 +2859,8 @@
 <DEFAULT,IN_DBL_BRACE>
 TOKEN :
 {
-    <NULL : "null">
+  <MISSING : "missing">
+  |  <NULL : "null">
   | <TRUE : "true">
   | <FALSE : "false">
 }
diff --git a/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/src/main/java/org/apache/asterix/runtime/evaluators/plugin/EvaluatorGeneratorMojo.java b/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/src/main/java/org/apache/asterix/runtime/evaluators/plugin/EvaluatorGeneratorMojo.java
index d001bb0..888df55 100644
--- a/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/src/main/java/org/apache/asterix/runtime/evaluators/plugin/EvaluatorGeneratorMojo.java
+++ b/asterixdb/asterix-maven-plugins/asterix-evaluator-generator-maven-plugin/src/main/java/org/apache/asterix/runtime/evaluators/plugin/EvaluatorGeneratorMojo.java
@@ -90,4 +90,5 @@
             outputStream.write(classDefinitionBinary, 0, classDefinitionBinary.length);
         }
     }
+
 }
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java
index 55a5f3d..620461b 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java
@@ -227,7 +227,7 @@
                 "DatasourceAdapter", "Properties", "Function", "Status", "CompactionPolicy",
                 "CompactionPolicyProperties" };
 
-        AUnionType feedFunctionUnion = AUnionType.createNullableType(BuiltinType.ASTRING);
+        IAType feedFunctionUnion = AUnionType.createNullableType(BuiltinType.ASTRING);
 
         IAType[] fieldTypes = { BuiltinType.ASTRING, BuiltinType.ASTRING, orderedListType, orderedListType,
                 BuiltinType.ASTRING, BuiltinType.ASTRING, orderedListOfPropertiesType, feedFunctionUnion,
@@ -257,8 +257,8 @@
                 "GroupName", "CompactionPolicy", "CompactionPolicyProperties", "InternalDetails", "ExternalDetails",
                 "Hints", "Timestamp", "DatasetId", "PendingOp" };
 
-        AUnionType internalRecordUnion = AUnionType.createNullableType(INTERNAL_DETAILS_RECORDTYPE);
-        AUnionType externalRecordUnion = AUnionType.createNullableType(EXTERNAL_DETAILS_RECORDTYPE);
+        IAType internalRecordUnion = AUnionType.createNullableType(INTERNAL_DETAILS_RECORDTYPE);
+        IAType externalRecordUnion = AUnionType.createNullableType(EXTERNAL_DETAILS_RECORDTYPE);
         AOrderedListType compactionPolicyPropertyListType = new AOrderedListType(
                 COMPACTION_POLICY_PROPERTIES_RECORDTYPE, null);
 
@@ -305,8 +305,8 @@
 
     private static final ARecordType createDerivedTypeRecordType() throws AsterixException {
         String[] fieldNames = { "Tag", "IsAnonymous", "Record", "UnorderedList", "OrderedList" };
-        AUnionType recordUnion = AUnionType.createNullableType(RECORD_RECORDTYPE);
-        AUnionType collectionUnion = AUnionType.createNullableType(BuiltinType.ASTRING);
+        IAType recordUnion = AUnionType.createNullableType(RECORD_RECORDTYPE);
+        IAType collectionUnion = AUnionType.createNullableType(BuiltinType.ASTRING);
 
         IAType[] fieldTypes = { BuiltinType.ASTRING, BuiltinType.ABOOLEAN, recordUnion, collectionUnion,
                 collectionUnion };
@@ -322,7 +322,7 @@
 
     private static final ARecordType createDatatypeRecordType() throws AsterixException {
         String[] fieldNames = { "DataverseName", "DatatypeName", "Derived", "Timestamp" };
-        AUnionType recordUnion = AUnionType.createNullableType(DERIVEDTYPE_RECORDTYPE);
+        IAType recordUnion = AUnionType.createNullableType(DERIVEDTYPE_RECORDTYPE);
         IAType[] fieldTypes = { BuiltinType.ASTRING, BuiltinType.ASTRING, recordUnion, BuiltinType.ASTRING };
         return new ARecordType("DatatypeRecordType", fieldNames, fieldTypes, true);
     };
@@ -435,9 +435,9 @@
 
     private static ARecordType createFeedRecordType() throws AsterixException, HyracksDataException {
 
-        AUnionType feedFunctionUnion = AUnionType.createNullableType(BuiltinType.ASTRING);
-        AUnionType primaryRecordUnion = AUnionType.createNullableType(PRIMARY_FEED_DETAILS_RECORDTYPE);
-        AUnionType secondaryRecordUnion = AUnionType.createNullableType(SECONDARY_FEED_DETAILS_RECORDTYPE);
+        IAType feedFunctionUnion = AUnionType.createNullableType(BuiltinType.ASTRING);
+        IAType primaryRecordUnion = AUnionType.createNullableType(PRIMARY_FEED_DETAILS_RECORDTYPE);
+        IAType secondaryRecordUnion = AUnionType.createNullableType(SECONDARY_FEED_DETAILS_RECORDTYPE);
 
         String[] fieldNames = { "DataverseName", "FeedName", "Function", "FeedType", "PrimaryTypeDetails",
                 "SecondaryTypeDetails", "Timestamp" };
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/AsterixBuiltinTypeMap.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/AsterixBuiltinTypeMap.java
index 7bb212c..8cd3d05 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/AsterixBuiltinTypeMap.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/AsterixBuiltinTypeMap.java
@@ -60,6 +60,7 @@
         _builtinTypeMap.put("polygon", BuiltinType.APOLYGON);
         _builtinTypeMap.put("circle", BuiltinType.ACIRCLE);
         _builtinTypeMap.put("rectangle", BuiltinType.ARECTANGLE);
+        _builtinTypeMap.put("missing", BuiltinType.AMISSING);
         _builtinTypeMap.put("null", BuiltinType.ANULL);
         _builtinTypeMap.put("uuid", BuiltinType.AUUID);
         _builtinTypeMap.put("shortwithouttypeinfo", BuiltinType.SHORTWITHOUTTYPEINFO);
@@ -80,8 +81,9 @@
                 throw new MetadataException(e);
             }
         }
-        if (isNullable)
+        if (isNullable) {
             type = AUnionType.createNullableType(type);
+        }
         return type;
     }
 }
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Index.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Index.java
index 3ff9a57..949e6ca 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Index.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Index.java
@@ -131,11 +131,12 @@
 
     public static Pair<IAType, Boolean> getNonNullableType(IAType keyType) throws AsterixException {
         boolean nullable = false;
+        IAType actualKeyType = keyType;
         if (NonTaggedFormatUtil.isOptional(keyType)) {
-            keyType = ((AUnionType) keyType).getNullableType();
+            actualKeyType = ((AUnionType) keyType).getActualType();
             nullable = true;
         }
-        return new Pair<IAType, Boolean>(keyType, nullable);
+        return new Pair<>(actualKeyType, nullable);
     }
 
     public static Pair<IAType, Boolean> getNonNullableOpenFieldType(IAType fieldType, List<String> fieldName,
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatatypeTupleTranslator.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatatypeTupleTranslator.java
index a1b23d6..0604fff 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatatypeTupleTranslator.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatatypeTupleTranslator.java
@@ -201,7 +201,7 @@
         IAType fieldType = dataType.getDatatype();
         //unwrap nullable type out of the union
         if (fieldType.getTypeTag() == ATypeTag.UNION) {
-            fieldType = ((AUnionType) dataType.getDatatype()).getNullableType();
+            fieldType = ((AUnionType) dataType.getDatatype()).getActualType();
         }
 
         // write field 3
@@ -310,11 +310,12 @@
             boolean fieldIsNullable = false;
             if (NonTaggedFormatUtil.isOptional(fieldType)) {
                 fieldIsNullable = true;
-                fieldType = ((AUnionType) fieldType).getNullableType();
+                fieldType = ((AUnionType) fieldType).getActualType();
             }
-            if (fieldType.getTypeTag().isDerivedType())
+            if (fieldType.getTypeTag().isDerivedType()) {
                 handleNestedDerivedType(fieldType.getTypeName(), (AbstractComplexType) fieldType, instance,
                         instance.getDataverseName(), instance.getDatatypeName());
+            }
 
             itemValue.reset();
             fieldRecordBuilder.reset(MetadataRecordTypes.FIELD_RECORDTYPE);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/AbstractListBuilder.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/AbstractListBuilder.java
index 59e669a..a2b16dd 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/AbstractListBuilder.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/AbstractListBuilder.java
@@ -71,23 +71,35 @@
         }
         headerSize = 2;
         metadataInfoSize = 8;
-        // 8 = 4 (# of items) + 4 (the size of the list)
+        if (itemTypeTag == ATypeTag.MISSING) {
+            itemTypeTag = ATypeTag.NULL;
+        }
     }
 
     @Override
     public void addItem(IValueReference item) throws HyracksDataException {
         try {
-            if (!fixedSize && (item.getByteArray()[item.getStartOffset()] != ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || itemTypeTag == ATypeTag.ANY)) {
+            byte[] data = item.getByteArray();
+            int start = item.getStartOffset();
+            int len = item.getLength();
+
+            byte serializedTypeTag = data[start];
+            if (serializedTypeTag == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                // NULL in a list is MISSING.
+                serializedTypeTag = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+            }
+
+            if (!fixedSize && (serializedTypeTag != ATypeTag.SERIALIZED_NULL_TYPE_TAG || itemTypeTag == ATypeTag.ANY)) {
                 this.offsets.add(outputStorage.getLength());
             }
-            if (itemTypeTag == ATypeTag.ANY || (itemTypeTag == ATypeTag.NULL
-                    && item.getByteArray()[item.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG)) {
+            if (itemTypeTag == ATypeTag.ANY
+                    || (itemTypeTag == ATypeTag.NULL && serializedTypeTag == ATypeTag.SERIALIZED_NULL_TYPE_TAG)) {
                 this.numberOfItems++;
-                this.outputStream.write(item.getByteArray(), item.getStartOffset(), item.getLength());
-            } else if (item.getByteArray()[item.getStartOffset()] != ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
+                this.outputStream.write(serializedTypeTag);
+                this.outputStream.write(data, start + 1, len - 1);
+            } else if (serializedTypeTag != ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
                 this.numberOfItems++;
-                this.outputStream.write(item.getByteArray(), item.getStartOffset() + 1, item.getLength() - 1);
+                this.outputStream.write(data, start + 1, len - 1);
             }
         } catch (IOException e) {
             throw new HyracksDataException(e);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/RecordBuilder.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/RecordBuilder.java
index 65caf40..bfe08da 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/RecordBuilder.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/builders/RecordBuilder.java
@@ -131,22 +131,25 @@
         headerSize = 5;
         // this is the record tag (1) + record size (4)
 
-        if (isOpen)
+        if (isOpen) {
             // to tell whether the record has an open part or not.
             headerSize += 1;
+        }
 
         if (numberOfSchemaFields > 0) {
             // there is a schema associated with the record.
 
             headerSize += 4;
             // 4 = four bytes to store the number of closed fields.
-            if (closedPartOffsets == null || closedPartOffsets.length < numberOfSchemaFields)
+            if (closedPartOffsets == null || closedPartOffsets.length < numberOfSchemaFields) {
                 closedPartOffsets = new int[numberOfSchemaFields];
+            }
 
             if (isNullable) {
                 nullBitMapSize = (int) Math.ceil(numberOfSchemaFields / 8.0);
-                if (nullBitMap == null || nullBitMap.length < nullBitMapSize)
+                if (nullBitMap == null || nullBitMap.length < nullBitMapSize) {
                     this.nullBitMap = new byte[nullBitMapSize];
+                }
                 Arrays.fill(nullBitMap, 0, nullBitMapSize, (byte) 0);
                 headerSize += nullBitMap.length;
             }
@@ -183,11 +186,10 @@
                     openFieldNameLengths.length + DEFAULT_NUM_OPEN_FIELDS);
         }
         int fieldNameHashCode = utf8HashFunction.hash(name.getByteArray(), name.getStartOffset() + 1,
-                    name.getLength() - 1);
+                name.getLength() - 1);
         if (recType != null) {
             int cFieldPos;
-                cFieldPos = recTypeInfo.getFieldIndex(name.getByteArray(), name.getStartOffset() + 1,
-                        name.getLength() - 1);
+            cFieldPos = recTypeInfo.getFieldIndex(name.getByteArray(), name.getStartOffset() + 1, name.getLength() - 1);
             if (cFieldPos >= 0) {
                 throw new HyracksDataException("Open field \"" + recType.getFieldNames()[cFieldPos]
                         + "\" has the same field name as closed field at index " + cFieldPos);
@@ -210,8 +212,9 @@
             h += 4;
             // 4 = four bytes to store the offset to the open part.
             openPartOffsetArraySize = numberOfOpenFields * 8;
-            if (openPartOffsetArray == null || openPartOffsetArray.length < openPartOffsetArraySize)
+            if (openPartOffsetArray == null || openPartOffsetArray.length < openPartOffsetArraySize) {
                 openPartOffsetArray = new byte[openPartOffsetArraySize];
+            }
 
             Arrays.sort(this.openPartOffsets, 0, numberOfOpenFields);
             if (numberOfOpenFields > 1) {
@@ -256,17 +259,20 @@
                 if (this.numberOfOpenFields > 0) {
                     out.writeBoolean(true);
                     out.writeInt(openPartOffset);
-                } else
+                } else {
                     out.writeBoolean(false);
+                }
             }
 
             // write the closed part
             if (numberOfSchemaFields > 0) {
                 out.writeInt(numberOfClosedFields);
-                if (isNullable)
+                if (isNullable) {
                     out.write(nullBitMap, 0, nullBitMapSize);
-                for (int i = 0; i < numberOfSchemaFields; i++)
+                }
+                for (int i = 0; i < numberOfSchemaFields; i++) {
                     out.writeInt(closedPartOffsets[i] + headerSize + (numberOfSchemaFields * 4));
+                }
                 out.write(closedPartOutputStream.toByteArray());
             }
 
@@ -284,8 +290,9 @@
     @Override
     public int getFieldId(String fieldName) {
         for (int i = 0; i < recType.getFieldNames().length; i++) {
-            if (recType.getFieldNames()[i].equals(fieldName))
+            if (recType.getFieldNames()[i].equals(fieldName)) {
                 return i;
+            }
         }
         return -1;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlExpressionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlExpressionTypeComputer.java
index 66008f4..4cd3015 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlExpressionTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlExpressionTypeComputer.java
@@ -70,7 +70,7 @@
         FunctionIdentifier fi = expr.getFunctionIdentifier();
         ComparisonKind ck = AlgebricksBuiltinFunctions.getComparisonType(fi);
         if (ck != null) {
-            return AUnionType.createNullableType(BuiltinType.ABOOLEAN, "OptionalBoolean");
+            return AUnionType.createUnknownableType(BuiltinType.ABOOLEAN, "OptionalBoolean");
         }
         // Note: built-in functions + udfs
         IResultTypeComputer rtc = null;
@@ -90,6 +90,8 @@
         IAlgebricksConstantValue acv = expr.getValue();
         if (acv.isFalse() || acv.isTrue()) {
             return BuiltinType.ABOOLEAN;
+        } else if (acv.isMissing()) {
+            return BuiltinType.AMISSING;
         } else if (acv.isNull()) {
             return BuiltinType.ANULL;
         } else {
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlNullableTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMissableTypeComputer.java
similarity index 68%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlNullableTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMissableTypeComputer.java
index ab5119b..aa88ec9 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlNullableTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMissableTypeComputer.java
@@ -18,38 +18,35 @@
  */
 package org.apache.asterix.dataflow.data.common;
 
+import org.apache.asterix.om.typecomputer.impl.TypeComputeUtils;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.types.TypeHelper;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 
-public class AqlNullableTypeComputer implements INullableTypeComputer {
+public class AqlMissableTypeComputer implements IMissableTypeComputer {
 
-    public static final AqlNullableTypeComputer INSTANCE = new AqlNullableTypeComputer();
+    public static final AqlMissableTypeComputer INSTANCE = new AqlMissableTypeComputer();
 
-    private AqlNullableTypeComputer() {
+    private AqlMissableTypeComputer() {
     }
 
     @Override
-    public IAType makeNullableType(Object type) throws AlgebricksException {
+    public IAType makeMissableType(Object type) throws AlgebricksException {
         IAType t = (IAType) type;
-        if (TypeHelper.canBeNull(t)) {
-            return t;
-        } else {
-            return AUnionType.createNullableType(t);
-        }
+        return AUnionType.createMissableType(t);
     }
 
     @Override
-    public boolean canBeNull(Object type) {
+    public boolean canBeMissing(Object type) {
         IAType t = (IAType) type;
-        return TypeHelper.canBeNull(t);
+        return TypeHelper.canBeMissing(t);
     }
 
     @Override
     public Object getNonOptionalType(Object type) {
         IAType t = (IAType) type;
-        return TypeHelper.getNonOptionalType(t);
+        return TypeComputeUtils.getActualType(t);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
index 3913588..fe5a3e0 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
@@ -19,16 +19,12 @@
 package org.apache.asterix.dataflow.data.common;
 
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.AggregateFunctionCallExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IPartialAggregationTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions;
-import org.apache.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions.ComparisonKind;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
@@ -42,18 +38,14 @@
         if (partialFid.equals(AsterixBuiltinFunctions.SERIAL_GLOBAL_AVG)) {
             partialFid = AsterixBuiltinFunctions.SERIAL_LOCAL_AVG;
         }
-        AggregateFunctionCallExpression partialAgg = AsterixBuiltinFunctions.makeAggregateFunctionExpression(
-                partialFid, agg.getArguments());
-        return getTypeForFunction((AbstractFunctionCallExpression) partialAgg, env, metadataProvider);
+        AggregateFunctionCallExpression partialAgg = AsterixBuiltinFunctions.makeAggregateFunctionExpression(partialFid,
+                agg.getArguments());
+        return getTypeForFunction(partialAgg, env, metadataProvider);
     }
 
     private Object getTypeForFunction(AbstractFunctionCallExpression expr, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        FunctionIdentifier fi = expr.getFunctionIdentifier();
-        ComparisonKind ck = AlgebricksBuiltinFunctions.getComparisonType(fi);
-        if (ck != null) {
-            return AUnionType.createNullableType(BuiltinType.ABOOLEAN, "OptionalBoolean");
-        }
-        return AsterixBuiltinFunctions.getResultTypeComputer(fi).computeType(expr, env, metadataProvider);
+        return AsterixBuiltinFunctions.getResultTypeComputer(expr.getFunctionIdentifier()).computeType(expr, env,
+                metadataProvider);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/AqlNullWriterFactory.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/AqlMissingWriterFactory.java
similarity index 60%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/AqlNullWriterFactory.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/AqlMissingWriterFactory.java
index 8fa881a..313f821 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/AqlNullWriterFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/AqlMissingWriterFactory.java
@@ -22,32 +22,29 @@
 import java.io.IOException;
 
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
-public class AqlNullWriterFactory implements INullWriterFactory {
+public class AqlMissingWriterFactory implements IMissingWriterFactory {
 
     private static final long serialVersionUID = 1L;
-    public static final AqlNullWriterFactory INSTANCE = new AqlNullWriterFactory();
+    public static final AqlMissingWriterFactory INSTANCE = new AqlMissingWriterFactory();
 
-    private AqlNullWriterFactory() {
+    private AqlMissingWriterFactory() {
     }
 
     @Override
-    public INullWriter createNullWriter() {
+    public IMissingWriter createMissingWriter() {
+        return out -> writeMissing(out);
+    }
 
-        return new INullWriter() {
-
-            @Override
-            public void writeNull(DataOutput out) throws HyracksDataException {
-                try {
-                    out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
-                } catch (IOException e) {
-                    throw new HyracksDataException(e);
-                }
-            }
-        };
+    private static void writeMissing(DataOutput out) throws HyracksDataException {
+        try {
+            out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
+        } catch (IOException e) {
+            throw new HyracksDataException(e);
+        }
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ABinaryComparator.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ABinaryComparator.java
index 05ffb3a..6afc9d8 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ABinaryComparator.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ABinaryComparator.java
@@ -18,10 +18,6 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.comparators;
 
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
-import org.apache.hyracks.api.dataflow.value.BinaryComparatorConstant.ComparableResultCode;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
@@ -30,26 +26,6 @@
  */
 public abstract class ABinaryComparator implements IBinaryComparator {
 
-    public static ComparableResultCode isComparable(byte tag1,byte tag2) {
-        // NULL Check. If one type is NULL, then we return NULL
-        if (tag1 == ATypeTag.SERIALIZED_NULL_TYPE_TAG || tag2 == ATypeTag.SERIALIZED_NULL_TYPE_TAG || tag1 == 0
-                || tag2 == 0) {
-            return ComparableResultCode.UNKNOWN;
-        }
-
-        // Checks whether two types are comparable or not
-        ATypeTag typeTag1 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(tag1);
-        ATypeTag typeTag2 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(tag2);
-
-        // Are two types compatible, meaning that they can be compared? (e.g., compare between numeric types
-        if (ATypeHierarchy.isCompatible(typeTag1, typeTag2)) {
-            return ComparableResultCode.TRUE;
-        } else {
-            return ComparableResultCode.FALSE;
-        }
-
-    }
-
     @Override
     public abstract int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) throws HyracksDataException;
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AObjectAscBinaryComparatorFactory.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AObjectAscBinaryComparatorFactory.java
index 4ce9617..e7a6b77 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AObjectAscBinaryComparatorFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AObjectAscBinaryComparatorFactory.java
@@ -110,17 +110,26 @@
             @Override
             public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) throws HyracksDataException {
 
-                // Normally, comparing between NULL and non-NULL values should return UNKNOWN as the result.
-                // However, at this point, we assume that NULL check between two types is already done.
+                // Normally, comparing between MISSING and non-MISSING values should return MISSING as the result.
+                // However, this comparator is used by order-by/group-by/distinct-by.
+                // Therefore, inside this method, we return an order between two values even if one value is MISSING.
+                if (b1[s1] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                    return b2[s2] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG ? 0 : -1;
+                } else {
+                    if (b2[s2] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                        return 1;
+                    }
+                }
+
+                // Normally, comparing between NULL and non-NULL/MISSING values should return NULL as the result.
+                // However, this comparator is used by order-by/group-by/distinct-by.
                 // Therefore, inside this method, we return an order between two values even if one value is NULL.
                 if (b1[s1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                    if (b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG)
-                        return 0;
-                    else
-                        return -1;
+                    return b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG ? 0 : -1;
                 } else {
-                    if (b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG)
+                    if (b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
                         return 1;
+                    }
                 }
 
                 ATypeTag tag1 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b1[s1]);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ListItemBinaryComparatorFactory.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ListItemBinaryComparatorFactory.java
index 8907bca..c4a82ee 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ListItemBinaryComparatorFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/ListItemBinaryComparatorFactory.java
@@ -43,7 +43,7 @@
 
     @Override
     public IBinaryComparator createBinaryComparator() {
-        return createBinaryComparator(ATypeTag.NULL, ATypeTag.NULL, false);
+        return createBinaryComparator(ATypeTag.MISSING, ATypeTag.MISSING, false);
     }
 
     public IBinaryComparator createBinaryComparator(final ATypeTag firstItemTypeTag, final ATypeTag secondItemTypeTag,
@@ -83,15 +83,17 @@
 
             @Override
             public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) throws HyracksDataException {
-
+                //  A list item cannot be MISSING.
                 if (b1[s1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                    if (b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG)
+                    if (b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
                         return 0;
-                    else
+                    } else {
                         return -1;
+                    }
                 } else {
-                    if (b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG)
+                    if (b2[s2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
                         return 1;
+                    }
                 }
 
                 ATypeTag tag1 = firstItemTypeTag;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java
index f063d82..010e968 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java
@@ -48,14 +48,14 @@
             public void init() throws HyracksDataException {
                 nullPrinter = (AqlADMPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL))
                         .createPrinter();
-                fieldPrinter = (AqlADMPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getNullableType()))
+                fieldPrinter = (AqlADMPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getActualType()))
                         .createPrinter();
             }
 
             @Override
             public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                 fieldPrinter.init();
-                if (b[s] == ATypeTag.NULL.serialize()) {
+                if (b[s] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
                     nullPrinter.print(b, s, l, ps);
                 } else {
                     fieldPrinter.print(b, s, l, ps);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AObjectPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AObjectPrinter.java
index 6527032..27aa754 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AObjectPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AObjectPrinter.java
@@ -58,6 +58,7 @@
                 AInt64Printer.INSTANCE.print(b, s, l, ps);
                 break;
             }
+            case MISSING:
             case NULL: {
                 ANullPrinter.INSTANCE.print(b, s, l, ps);
                 break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java
index 3d76087..f920080 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/ANullableFieldPrinterFactory.java
@@ -46,16 +46,16 @@
 
             @Override
             public void init() throws HyracksDataException {
-                nullPrinter = (AqlCSVPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL))
+                nullPrinter = (AqlCSVPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.AMISSING))
                         .createPrinter();
-                fieldPrinter = (AqlCSVPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getNullableType()))
+                fieldPrinter = (AqlCSVPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getActualType()))
                         .createPrinter();
             }
 
             @Override
             public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                 fieldPrinter.init();
-                if (b[s] == ATypeTag.NULL.serialize()) {
+                if (b[s] == ATypeTag.MISSING.serialize()) {
                     nullPrinter.print(b, s, l, ps);
                 } else {
                     fieldPrinter.print(b, s, l, ps);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java
index 6587d52..09cd5ac 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/csv/AObjectPrinter.java
@@ -56,6 +56,7 @@
                 AInt64Printer.INSTANCE.print(b, s, l, ps);
                 break;
             }
+            case MISSING:
             case NULL: {
                 ANullPrinter.INSTANCE.print(b, s, l, ps);
                 break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java
index b1319c8..24c8903 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/ANullableFieldPrinterFactory.java
@@ -46,16 +46,16 @@
 
             @Override
             public void init() throws HyracksDataException {
-                nullPrinter = (AqlCleanJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL))
+                nullPrinter = (AqlCleanJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.AMISSING))
                         .createPrinter();
                 fieldPrinter = (AqlCleanJSONPrinterFactoryProvider.INSTANCE
-                        .getPrinterFactory(unionType.getNullableType())).createPrinter();
+                        .getPrinterFactory(unionType.getActualType())).createPrinter();
             }
 
             @Override
             public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                 fieldPrinter.init();
-                if (b[s] == ATypeTag.NULL.serialize()) {
+                if (b[s] == ATypeTag.MISSING.serialize()) {
                     nullPrinter.print(b, s, l, ps);
                 } else {
                     fieldPrinter.print(b, s, l, ps);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java
index d4183f6..ee94187 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/clean/AObjectPrinter.java
@@ -58,6 +58,7 @@
                 AInt64Printer.INSTANCE.print(b, s, l, ps);
                 break;
             }
+            case MISSING:
             case NULL: {
                 ANullPrinter.INSTANCE.print(b, s, l, ps);
                 break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java
index 1d495b1..a4f4200 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/ANullableFieldPrinterFactory.java
@@ -46,16 +46,16 @@
 
             @Override
             public void init() throws HyracksDataException {
-                nullPrinter = (AqlLosslessJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL))
+                nullPrinter = (AqlLosslessJSONPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.AMISSING))
                         .createPrinter();
                 fieldPrinter = (AqlLosslessJSONPrinterFactoryProvider.INSTANCE
-                        .getPrinterFactory(unionType.getNullableType())).createPrinter();
+                        .getPrinterFactory(unionType.getActualType())).createPrinter();
             }
 
             @Override
             public void print(byte[] b, int s, int l, PrintStream ps) throws HyracksDataException {
                 fieldPrinter.init();
-                if (b[s] == ATypeTag.NULL.serialize()) {
+                if (b[s] == ATypeTag.MISSING.serialize()) {
                     nullPrinter.print(b, s, l, ps);
                 } else {
                     fieldPrinter.print(b, s, l, ps);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AObjectPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AObjectPrinter.java
index 534a95a..1acbc06 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AObjectPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/lossless/AObjectPrinter.java
@@ -58,6 +58,7 @@
                 AInt64Printer.INSTANCE.print(b, s, l, ps);
                 break;
             }
+            case MISSING:
             case NULL: {
                 ANullPrinter.INSTANCE.print(b, s, l, ps);
                 break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AMissingSerializerDeserializer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AMissingSerializerDeserializer.java
new file mode 100644
index 0000000..3ffc7a1
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AMissingSerializerDeserializer.java
@@ -0,0 +1,47 @@
+/*
+ * 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.dataflow.data.nontagged.serde;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+
+import org.apache.asterix.om.base.AMissing;
+import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class AMissingSerializerDeserializer implements ISerializerDeserializer<AMissing> {
+
+    private static final long serialVersionUID = 1L;
+
+    public static final AMissingSerializerDeserializer INSTANCE = new AMissingSerializerDeserializer();
+
+    private AMissingSerializerDeserializer() {
+    }
+
+    @Override
+    public AMissing deserialize(DataInput in) throws HyracksDataException {
+        return AMissing.MISSING;
+    }
+
+    @Override
+    public void serialize(AMissing instance, DataOutput out) throws HyracksDataException {
+        // A missing value only has a typetag in its serialized form.
+    }
+
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ANullSerializerDeserializer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ANullSerializerDeserializer.java
index fb387a8..738284f 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ANullSerializerDeserializer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ANullSerializerDeserializer.java
@@ -22,10 +22,11 @@
 import java.io.DataOutput;
 
 import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.base.IAObject;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
-public class ANullSerializerDeserializer implements ISerializerDeserializer<ANull> {
+public class ANullSerializerDeserializer implements ISerializerDeserializer<IAObject> {
 
     private static final long serialVersionUID = 1L;
 
@@ -40,7 +41,8 @@
     }
 
     @Override
-    public void serialize(ANull instance, DataOutput out) throws HyracksDataException {
+    public void serialize(IAObject instance, DataOutput out) throws HyracksDataException {
+        // A null value only has a typetag in its serialized form.
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
index 6c754f1..3994d6d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
@@ -36,7 +36,7 @@
 import org.apache.asterix.om.base.AInt8;
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.ALine;
-import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.AOrderedList;
 import org.apache.asterix.om.base.APoint;
 import org.apache.asterix.om.base.APoint3D;
@@ -66,6 +66,8 @@
     public IAObject deserialize(DataInput in) throws HyracksDataException {
         ATypeTag typeTag = SerializerDeserializerUtil.deserializeTag(in);
         switch (typeTag) {
+            case MISSING:
+                return AMissingSerializerDeserializer.INSTANCE.deserialize(in);
             case NULL:
                 return ANullSerializerDeserializer.INSTANCE.deserialize(in);
             case BOOLEAN:
@@ -133,8 +135,11 @@
             throw new HyracksDataException(e);
         }
         switch (tag) {
+            case MISSING:
+                AMissingSerializerDeserializer.INSTANCE.serialize((AMissing) instance, out);
+                break;
             case NULL:
-                ANullSerializerDeserializer.INSTANCE.serialize((ANull) instance, out);
+                ANullSerializerDeserializer.INSTANCE.serialize(instance, out);
                 break;
             case BOOLEAN:
                 ABooleanSerializerDeserializer.INSTANCE.serialize((ABoolean) instance, out);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
index d49ad29..0312ec0 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
@@ -72,14 +72,7 @@
                 IAType t = recordType.getFieldTypes()[i];
                 IAType t2;
                 if (t.getTypeTag() == ATypeTag.UNION) {
-                    if (((AUnionType) t).isNullableType()) {
-                        t2 = ((AUnionType) recordType.getFieldTypes()[i]).getNullableType();
-                        serializers[i] = AqlSerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(
-                                ((AUnionType) recordType.getFieldTypes()[i]).getNullableType());
-                    } else {
-                        // union .. the general case
-                        throw new NotImplementedException();
-                    }
+                    t2 = ((AUnionType) t).getActualType();
                 } else {
                     t2 = t;
                 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/base/IDataFormat.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/base/IDataFormat.java
index f87681f..3c31f00 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/base/IDataFormat.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/base/IDataFormat.java
@@ -41,7 +41,7 @@
 import org.apache.hyracks.algebricks.data.ISerializerDeserializerProvider;
 import org.apache.hyracks.algebricks.data.ITypeTraitProvider;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactoryProvider;
 
 public interface IDataFormat {
@@ -68,7 +68,7 @@
 
     public IPrinterFactoryProvider getCleanJSONPrinterFactoryProvider();
 
-    public INullWriterFactory getNullWriterFactory();
+    public IMissingWriterFactory getMissingWriterFactory();
 
     public Triple<IScalarEvaluatorFactory, ScalarFunctionCallExpression, IAType> partitioningEvaluatorFactory(
             ARecordType recType, List<String> fldName) throws AlgebricksException;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java
index c29e18f..d9db6de 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlADMPrinterFactoryProvider.java
@@ -54,7 +54,6 @@
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.AUnorderedListType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
 
@@ -79,6 +78,7 @@
                     return AInt32PrinterFactory.INSTANCE;
                 case INT64:
                     return AInt64PrinterFactory.INSTANCE;
+                case MISSING:
                 case NULL:
                     return ANullPrinterFactory.INSTANCE;
                 case BOOLEAN:
@@ -124,10 +124,11 @@
                 case UNORDEREDLIST:
                     return new AUnorderedlistPrinterFactory((AUnorderedListType) aqlType);
                 case UNION: {
-                    if (((AUnionType) aqlType).isNullableType())
+                    if (((AUnionType) aqlType).isUnknownableType()) {
                         return new ANullableFieldPrinterFactory((AUnionType) aqlType);
-                    else
+                    } else {
                         return new AUnionPrinterFactory((AUnionType) aqlType);
+                    }
                 }
                 case UUID: {
                     return AUUIDPrinterFactory.INSTANCE;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryBooleanInspectorImpl.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryBooleanInspectorImpl.java
index 247e6fd..6729a28 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryBooleanInspectorImpl.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryBooleanInspectorImpl.java
@@ -39,10 +39,13 @@
 
     @Override
     public boolean getBooleanValue(byte[] bytes, int offset, int length) {
-        if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG)
+        byte serializedTypeTag = bytes[offset];
+        if (serializedTypeTag == ATypeTag.SERIALIZED_MISSING_TYPE_TAG
+                || serializedTypeTag == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
             return false;
+        }
         /** check if the runtime type is boolean */
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serializedTypeTag);
         if (typeTag != ATypeTag.BOOLEAN) {
             throw new IllegalStateException("Runtime error: the select condition should be of the boolean type!");
         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryComparatorFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryComparatorFactoryProvider.java
index 44851e3..feb3228 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryComparatorFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlBinaryComparatorFactoryProvider.java
@@ -105,7 +105,8 @@
             case UNION: { // we could do smth better for nullable fields
                 return anyBinaryComparatorFactory(ascending);
             }
-            case NULL: {
+            case NULL:
+            case MISSING:
                 return new IBinaryComparatorFactory() {
 
                     private static final long serialVersionUID = 1L;
@@ -121,7 +122,6 @@
                         };
                     }
                 };
-            }
             case BOOLEAN: {
                 return addOffset(BooleanBinaryComparatorFactory.INSTANCE, ascending);
             }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java
index d57445b..d197e52 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCSVPrinterFactoryProvider.java
@@ -49,7 +49,6 @@
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
@@ -75,6 +74,7 @@
                     return AInt32PrinterFactory.INSTANCE;
                 case INT64:
                     return AInt64PrinterFactory.INSTANCE;
+                case MISSING:
                 case NULL:
                     return ANullPrinterFactory.INSTANCE;
                 case BOOLEAN:
@@ -118,10 +118,11 @@
                 case UNORDEREDLIST:
                     throw new NotImplementedException("'Unorderedlist' type unsupported for CSV output");
                 case UNION: {
-                    if (((AUnionType) aqlType).isNullableType())
+                    if (((AUnionType) aqlType).isUnknownableType()) {
                         return new ANullableFieldPrinterFactory((AUnionType) aqlType);
-                    else
+                    } else {
                         return new AUnionPrinterFactory((AUnionType) aqlType);
+                    }
                 }
                 case UUID: {
                     return AUUIDPrinterFactory.INSTANCE;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java
index c1eb434..6220dde 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlCleanJSONPrinterFactoryProvider.java
@@ -54,7 +54,6 @@
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.AUnorderedListType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
 
@@ -79,6 +78,7 @@
                     return AInt32PrinterFactory.INSTANCE;
                 case INT64:
                     return AInt64PrinterFactory.INSTANCE;
+                case MISSING:
                 case NULL:
                     return ANullPrinterFactory.INSTANCE;
                 case BOOLEAN:
@@ -124,10 +124,11 @@
                 case UNORDEREDLIST:
                     return new AUnorderedlistPrinterFactory((AUnorderedListType) aqlType);
                 case UNION: {
-                    if (((AUnionType) aqlType).isNullableType())
+                    if (((AUnionType) aqlType).isUnknownableType()) {
                         return new ANullableFieldPrinterFactory((AUnionType) aqlType);
-                    else
+                    } else {
                         return new AUnionPrinterFactory((AUnionType) aqlType);
+                    }
                 }
                 case UUID: {
                     return AUUIDPrinterFactory.INSTANCE;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java
index aad912c..1950685 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlLosslessJSONPrinterFactoryProvider.java
@@ -54,7 +54,6 @@
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.AUnorderedListType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.data.IPrinterFactory;
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
 
@@ -79,6 +78,7 @@
                     return AInt32PrinterFactory.INSTANCE;
                 case INT64:
                     return AInt64PrinterFactory.INSTANCE;
+                case MISSING:
                 case NULL:
                     return ANullPrinterFactory.INSTANCE;
                 case BOOLEAN:
@@ -124,10 +124,11 @@
                 case UNORDEREDLIST:
                     return new AUnorderedlistPrinterFactory((AUnorderedListType) aqlType);
                 case UNION: {
-                    if (((AUnionType) aqlType).isNullableType())
+                    if (((AUnionType) aqlType).isUnknownableType()) {
                         return new ANullableFieldPrinterFactory((AUnionType) aqlType);
-                    else
+                    } else {
                         return new AUnionPrinterFactory((AUnionType) aqlType);
+                    }
                 }
                 case UUID: {
                     return AUUIDPrinterFactory.INSTANCE;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPredicateEvaluatorFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPredicateEvaluatorFactoryProvider.java
index c6f7495..a30bada 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPredicateEvaluatorFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPredicateEvaluatorFactoryProvider.java
@@ -46,16 +46,17 @@
                 return new IPredicateEvaluator() {
 
                     @Override
-                    public boolean evaluate(IFrameTupleAccessor fta0, int tupId0, IFrameTupleAccessor fta1, int tupId1) {
+                    public boolean evaluate(IFrameTupleAccessor fta0, int tupId0, IFrameTupleAccessor fta1,
+                            int tupId1) {
 
                         int tStart0 = fta0.getTupleStartOffset(tupId0);
                         int fStartOffset0 = fta0.getFieldSlotsLength() + tStart0;
 
                         for (int k0 : keys0) {
                             int fieldStartIx = fta0.getFieldStartOffset(tupId0, k0);
-                            ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(fta0.getBuffer()
-                                    .array()[fieldStartIx + fStartOffset0]);
-                            if (typeTag == ATypeTag.NULL) {
+                            ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                                    .deserialize(fta0.getBuffer().array()[fieldStartIx + fStartOffset0]);
+                            if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
                                 return false;
                             }
                         }
@@ -65,9 +66,9 @@
 
                         for (int k1 : keys1) {
                             int fieldStartIx = fta1.getFieldStartOffset(tupId1, k1);
-                            ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(fta1.getBuffer()
-                                    .array()[fieldStartIx + fStartOffset1]);
-                            if (typeTag == ATypeTag.NULL) {
+                            ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                                    .deserialize(fta1.getBuffer().array()[fieldStartIx + fStartOffset1]);
+                            if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
                                 return false;
                             }
                         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java
index 5b41535..4f1f9a3 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java
@@ -38,6 +38,7 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AIntervalSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.ALineSerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.serde.AMissingSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.ANullSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AObjectSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
@@ -52,6 +53,7 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.AUnorderedListSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AYearMonthDurationSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.SerializerDeserializerUtil;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.IAObject;
 import org.apache.asterix.om.types.AOrderedListType;
@@ -136,6 +138,8 @@
             case LINE: {
                 return ALineSerializerDeserializer.INSTANCE;
             }
+            case MISSING:
+                return AMissingSerializerDeserializer.INSTANCE;
             case NULL: {
                 return ANullSerializerDeserializer.INSTANCE;
             }
@@ -203,8 +207,12 @@
             @Override
             public IAObject deserialize(DataInput in) throws HyracksDataException {
                 try {
+                    ATypeTag tag = SerializerDeserializerUtil.deserializeTag(in);
                     //deserialize the tag (move input cursor forward) and check if it's not NULL tag
-                    if (SerializerDeserializerUtil.deserializeTag(in) == ATypeTag.NULL) {
+                    if (tag == ATypeTag.MISSING) {
+                        return AMissing.MISSING;
+                    }
+                    if (tag == ATypeTag.NULL) {
                         return ANull.NULL;
                     }
                 } catch (IOException e) {
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
new file mode 100644
index 0000000..6c357e6
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
@@ -0,0 +1,69 @@
+/*
+ * 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.om.base;
+
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.asterix.om.visitors.IOMVisitor;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+// This class represents a MISSING object.
+public class AMissing implements IAObject {
+
+    private AMissing() {
+    }
+
+    public final static AMissing MISSING = new AMissing();
+
+    @Override
+    public void accept(IOMVisitor visitor) throws AsterixException {
+        visitor.visitAMissing(this);
+    }
+
+    @Override
+    public IAType getType() {
+        return BuiltinType.AMISSING;
+    }
+
+    @Override
+    public boolean deepEqual(IAObject obj) {
+        return obj == this;
+    }
+
+    @Override
+    public int hash() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return "missing";
+    }
+
+    @Override
+    public JSONObject toJSON() throws JSONException {
+        JSONObject json = new JSONObject();
+
+        json.put("AMissing", "missing");
+
+        return json;
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
index 9f5f83b..859ebb3 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
@@ -16,18 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.om.base;
 
-import org.json.JSONException;
-import org.json.JSONObject;
+package org.apache.asterix.om.base;
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.visitors.IOMVisitor;
+import org.json.JSONException;
+import org.json.JSONObject;
 
-// We should avoid representing nulls explicitly. This class is for cases when it is
-// harder not to.
 public class ANull implements IAObject {
 
     private ANull() {
@@ -63,9 +61,8 @@
     @Override
     public JSONObject toJSON() throws JSONException {
         JSONObject json = new JSONObject();
-
         json.put("ANull", "null");
-
         return json;
     }
+
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/constants/AsterixConstantValue.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/constants/AsterixConstantValue.java
index 6458384..fa0a74e 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/constants/AsterixConstantValue.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/constants/AsterixConstantValue.java
@@ -19,6 +19,7 @@
 package org.apache.asterix.om.constants;
 
 import org.apache.asterix.om.base.ABoolean;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.IAObject;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IAlgebricksConstantValue;
@@ -37,6 +38,11 @@
     }
 
     @Override
+    public boolean isMissing() {
+        return object == AMissing.MISSING;
+    }
+
+    @Override
     public boolean isNull() {
         return object == ANull.NULL;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
index d604f35..0b1eaca 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
@@ -29,68 +29,54 @@
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ABinaryTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ABooleanTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.ACircleTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ADateTimeTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ADateTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.ADayTimeDurationTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ADoubleTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.ADurationTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.AFloatTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.AInt16TypeComputer;
 import org.apache.asterix.om.typecomputer.impl.AInt32TypeComputer;
 import org.apache.asterix.om.typecomputer.impl.AInt64TypeComputer;
-import org.apache.asterix.om.typecomputer.impl.ANullTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.AInt8TypeComputer;
+import org.apache.asterix.om.typecomputer.impl.AIntervalTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.ALineTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.AMissingTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.APoint3DTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.APointTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.APolygonTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ARectangleTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.AStringTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.ATemporalInstanceTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ATimeTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.AUUIDTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.AYearMonthDurationTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.AnyTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.BinaryBooleanOrNullFunctionTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.BinaryStringBoolOrNullTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.BinaryStringStringOrNullTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.BooleanFunctionTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.BooleanOnlyTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.CastListResultTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.CastRecordResultTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ClosedRecordConstructorResultType;
+import org.apache.asterix.om.typecomputer.impl.CollectionMemberResultType;
 import org.apache.asterix.om.typecomputer.impl.CollectionToSequenceTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ConcatNonNullTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.FieldAccessByIndexResultType;
+import org.apache.asterix.om.typecomputer.impl.FieldAccessByNameResultType;
 import org.apache.asterix.om.typecomputer.impl.FieldAccessNestedResultType;
 import org.apache.asterix.om.typecomputer.impl.GetOverlappingInvervalTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.InjectFailureTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedCollectionMemberResultType;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedFieldAccessByNameResultType;
+import org.apache.asterix.om.typecomputer.impl.LocalAvgTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.MinMaxAggTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.NonTaggedGetItemResultType;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedLocalAvgTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedMinMaxAggTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedNumericAddSubMulDivTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedNumericAggTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedNumericRoundHalfToEven2TypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedNumericUnaryFunctionTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedSwitchCaseComputer;
-import org.apache.asterix.om.typecomputer.impl.NonTaggedUnaryMinusTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.NotNullTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.NotMissingTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.NullableDoubleTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.NumericAddSubMulDivTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.NumericAggTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.NumericRoundHalfToEven2TypeComputer;
+import org.apache.asterix.om.typecomputer.impl.NumericUnaryFunctionTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.OpenARecordTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.OpenRecordConstructorResultType;
-import org.apache.asterix.om.typecomputer.impl.OptionalABinaryTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalABooleanTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalACircleTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalADateTimeTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalADateTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalADayTimeDurationTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalADoubleTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalADurationTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAFloatTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAInt16TypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAInt32TypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAInt64TypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAInt8TypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAIntervalTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalALineTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAPoint3DTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAPointTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAPolygonTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalARectangleTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAStringTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalATemporalInstanceTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalATimeTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalAYearMonthDurationTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.OptionalOpenARecordTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.OrderedListConstructorResultType;
 import org.apache.asterix.om.typecomputer.impl.OrderedListOfAInt32TypeComputer;
 import org.apache.asterix.om.typecomputer.impl.OrderedListOfAInt64TypeComputer;
@@ -98,20 +84,19 @@
 import org.apache.asterix.om.typecomputer.impl.OrderedListOfAPointTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.OrderedListOfAStringTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.OrderedListOfAnyTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.QuadStringStringOrNullTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.RecordAddFieldsTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.RecordMergeTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.RecordRemoveFieldsTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ScalarVersionOfAggregateResultType;
+import org.apache.asterix.om.typecomputer.impl.StringBooleanTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.StringStringTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.SubsetCollectionTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.Substring2TypeComputer;
 import org.apache.asterix.om.typecomputer.impl.SubstringTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.TripleStringBoolOrNullTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.TripleStringStringOrNullTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.UnaryBinaryInt64OrNullTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.UnaryBooleanOrNullFunctionTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.UnaryStringInt64OrNullTypeComputer;
-import org.apache.asterix.om.typecomputer.impl.UnaryStringOrNullTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.SwitchCaseComputer;
+import org.apache.asterix.om.typecomputer.impl.UnaryBinaryInt64TypeComputer;
+import org.apache.asterix.om.typecomputer.impl.UnaryMinusTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.UnaryStringInt64TypeComputer;
 import org.apache.asterix.om.typecomputer.impl.UnorderedListConstructorResultType;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.commons.lang3.mutable.Mutable;
@@ -154,8 +139,6 @@
             "get-handle", 2);
     public final static FunctionIdentifier GET_DATA = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-data",
             2);
-    public final static FunctionIdentifier EMBED_TYPE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
-            "embed-type", 1);
 
     public final static FunctionIdentifier GET_ITEM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-item",
             2);
@@ -712,12 +695,15 @@
     public static final FunctionIdentifier OR = AlgebricksBuiltinFunctions.OR;
     public static final FunctionIdentifier NOT = AlgebricksBuiltinFunctions.NOT;
     public static final FunctionIdentifier NUMERIC_ADD = AlgebricksBuiltinFunctions.NUMERIC_ADD;
+    public static final FunctionIdentifier IS_MISSING = AlgebricksBuiltinFunctions.IS_MISSING;
     public static final FunctionIdentifier IS_NULL = AlgebricksBuiltinFunctions.IS_NULL;
+    public static final FunctionIdentifier IS_UNKOWN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "is-unknown", 1);
 
     public static final FunctionIdentifier IS_SYSTEM_NULL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
             "is-system-null", 1);
-    public static final FunctionIdentifier NOT_NULL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "not-null",
-            1);
+    public static final FunctionIdentifier CHECK_UNKNOWN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "check-unknown", 1);
     public static final FunctionIdentifier COLLECTION_TO_SEQUENCE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
             "" + "collection-to-sequence", 1);
 
@@ -740,163 +726,147 @@
     static {
 
         // first, take care of Algebricks builtin functions
-        addFunction(IS_NULL, ABooleanTypeComputer.INSTANCE, true);
-        addFunction(IS_SYSTEM_NULL, ABooleanTypeComputer.INSTANCE, true);
-        addFunction(NOT, UnaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
+        addFunction(IS_MISSING, BooleanOnlyTypeComputer.INSTANCE, true);
+        addFunction(IS_NULL, BooleanOnlyTypeComputer.INSTANCE, true);
+        addFunction(IS_UNKOWN, BooleanOnlyTypeComputer.INSTANCE, true);
+        addFunction(IS_SYSTEM_NULL, BooleanOnlyTypeComputer.INSTANCE, true);
+        addFunction(NOT, BooleanFunctionTypeComputer.INSTANCE, true);
 
-        addPrivateFunction(EQ, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(LE, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(GE, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(LT, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(GT, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(AND, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(NEQ, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(OR, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(NUMERIC_ADD, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE, true);
+        addPrivateFunction(EQ, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(LE, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(GE, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(LT, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(GT, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(AND, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(NEQ, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(OR, BooleanFunctionTypeComputer.INSTANCE, true);
+        addPrivateFunction(NUMERIC_ADD, NumericAddSubMulDivTypeComputer.INSTANCE, true);
 
         // Deep equality
-        addFunction(DEEP_EQUAL, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
+        addFunction(DEEP_EQUAL, BooleanFunctionTypeComputer.INSTANCE, true);
 
         // and then, Asterix builtin functions
-        addPrivateFunction(NOT_NULL, NotNullTypeComputer.INSTANCE, true);
-        addPrivateFunction(ANY_COLLECTION_MEMBER, NonTaggedCollectionMemberResultType.INSTANCE, true);
-        addFunction(AVG, OptionalADoubleTypeComputer.INSTANCE, true);
-        addFunction(BOOLEAN_CONSTRUCTOR, UnaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
-        addPrivateFunction(CARET, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE, true);
-        addFunction(CIRCLE_CONSTRUCTOR, OptionalACircleTypeComputer.INSTANCE, true);
+        addPrivateFunction(CHECK_UNKNOWN, NotMissingTypeComputer.INSTANCE, true);
+        addPrivateFunction(ANY_COLLECTION_MEMBER, CollectionMemberResultType.INSTANCE, true);
+        addFunction(BOOLEAN_CONSTRUCTOR, StringBooleanTypeComputer.INSTANCE, true);
+        addPrivateFunction(CARET, NumericAddSubMulDivTypeComputer.INSTANCE, true);
+        addFunction(CIRCLE_CONSTRUCTOR, ACircleTypeComputer.INSTANCE, true);
         addPrivateFunction(CONCAT_NON_NULL, ConcatNonNullTypeComputer.INSTANCE, true);
 
-        addFunction(COUNT, AInt64TypeComputer.INSTANCE, true);
         addPrivateFunction(COUNTHASHED_GRAM_TOKENS, OrderedListOfAInt32TypeComputer.INSTANCE, true);
         addPrivateFunction(COUNTHASHED_WORD_TOKENS, OrderedListOfAInt32TypeComputer.INSTANCE, true);
-        addFunction(CREATE_CIRCLE, OptionalACircleTypeComputer.INSTANCE, true);
-        addFunction(CREATE_LINE, OptionalALineTypeComputer.INSTANCE, true);
-        addPrivateFunction(CREATE_MBR, OptionalADoubleTypeComputer.INSTANCE, true);
-        addFunction(CREATE_POINT, OptionalAPointTypeComputer.INSTANCE, true);
-        addFunction(CREATE_POLYGON, OptionalAPolygonTypeComputer.INSTANCE, true);
-        addFunction(CREATE_RECTANGLE, OptionalARectangleTypeComputer.INSTANCE, true);
+        addFunction(CREATE_CIRCLE, ACircleTypeComputer.INSTANCE, true);
+        addFunction(CREATE_LINE, ALineTypeComputer.INSTANCE, true);
+        addPrivateFunction(CREATE_MBR, ADoubleTypeComputer.INSTANCE, true);
+        addFunction(CREATE_POINT, APointTypeComputer.INSTANCE, true);
+        addFunction(CREATE_POLYGON, APolygonTypeComputer.INSTANCE, true);
+        addFunction(CREATE_RECTANGLE, ARectangleTypeComputer.INSTANCE, true);
         addFunction(CREATE_UUID, AUUIDTypeComputer.INSTANCE, false);
         addFunction(CREATE_QUERY_UID, ABinaryTypeComputer.INSTANCE, false);
         addFunction(UUID_CONSTRUCTOR, AUUIDTypeComputer.INSTANCE, true);
 
-        addFunction(DATE_CONSTRUCTOR, OptionalADateTypeComputer.INSTANCE, true);
-        addFunction(DATETIME_CONSTRUCTOR, OptionalADateTimeTypeComputer.INSTANCE, true);
-        addFunction(DOUBLE_CONSTRUCTOR, OptionalADoubleTypeComputer.INSTANCE, true);
-        addFunction(DURATION_CONSTRUCTOR, OptionalADurationTypeComputer.INSTANCE, true);
-        addFunction(YEAR_MONTH_DURATION_CONSTRUCTOR, OptionalAYearMonthDurationTypeComputer.INSTANCE, true);
-        addFunction(DAY_TIME_DURATION_CONSTRUCTOR, OptionalADayTimeDurationTypeComputer.INSTANCE, true);
+        addFunction(DATE_CONSTRUCTOR, ADateTypeComputer.INSTANCE, true);
+        addFunction(DATETIME_CONSTRUCTOR, ADateTimeTypeComputer.INSTANCE, true);
+        addFunction(DOUBLE_CONSTRUCTOR, ADoubleTypeComputer.INSTANCE, true);
+        addFunction(DURATION_CONSTRUCTOR, ADurationTypeComputer.INSTANCE, true);
+        addFunction(YEAR_MONTH_DURATION_CONSTRUCTOR, AYearMonthDurationTypeComputer.INSTANCE, true);
+        addFunction(DAY_TIME_DURATION_CONSTRUCTOR, ADayTimeDurationTypeComputer.INSTANCE, true);
         addFunction(EDIT_DISTANCE, AInt64TypeComputer.INSTANCE, true);
         addFunction(EDIT_DISTANCE_CHECK, OrderedListOfAnyTypeComputer.INSTANCE, true);
         addPrivateFunction(EDIT_DISTANCE_STRING_IS_FILTERABLE, ABooleanTypeComputer.INSTANCE, true);
         addPrivateFunction(EDIT_DISTANCE_LIST_IS_FILTERABLE, ABooleanTypeComputer.INSTANCE, true);
-        addPrivateFunction(EMBED_TYPE, AnyTypeComputer.INSTANCE, true);
         addPrivateFunction(EMPTY_STREAM, ABooleanTypeComputer.INSTANCE, true);
-        // add(FIELD_ACCESS, NonTaggedFieldAccessByNameResultType.INSTANCE);
 
-        addFunction(FLOAT_CONSTRUCTOR, OptionalAFloatTypeComputer.INSTANCE, true);
-        addPrivateFunction(FUZZY_EQ, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
+        addFunction(FLOAT_CONSTRUCTOR, AFloatTypeComputer.INSTANCE, true);
+        addPrivateFunction(FUZZY_EQ, BooleanFunctionTypeComputer.INSTANCE, true);
         addPrivateFunction(GET_HANDLE, null, true); // TODO
         addPrivateFunction(GET_ITEM, NonTaggedGetItemResultType.INSTANCE, true);
         addPrivateFunction(GET_DATA, null, true); // TODO
-        addPrivateFunction(GLOBAL_AVG, OptionalADoubleTypeComputer.INSTANCE, true);
         addPrivateFunction(GRAM_TOKENS, OrderedListOfAStringTypeComputer.INSTANCE, true);
         addPrivateFunction(HASHED_GRAM_TOKENS, OrderedListOfAInt32TypeComputer.INSTANCE, true);
         addPrivateFunction(HASHED_WORD_TOKENS, OrderedListOfAInt32TypeComputer.INSTANCE, true);
         addPrivateFunction(INDEX_SEARCH, AnyTypeComputer.INSTANCE, true);
-        addFunction(INT8_CONSTRUCTOR, OptionalAInt8TypeComputer.INSTANCE, true);
-        addFunction(INT16_CONSTRUCTOR, OptionalAInt16TypeComputer.INSTANCE, true);
-        addFunction(INT32_CONSTRUCTOR, OptionalAInt32TypeComputer.INSTANCE, true);
-        addFunction(INT64_CONSTRUCTOR, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(LEN, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(LINE_CONSTRUCTOR, OptionalALineTypeComputer.INSTANCE, true);
+        addFunction(INT8_CONSTRUCTOR, AInt8TypeComputer.INSTANCE, true);
+        addFunction(INT16_CONSTRUCTOR, AInt16TypeComputer.INSTANCE, true);
+        addFunction(INT32_CONSTRUCTOR, AInt32TypeComputer.INSTANCE, true);
+        addFunction(INT64_CONSTRUCTOR, AInt64TypeComputer.INSTANCE, true);
+        addFunction(LEN, AInt64TypeComputer.INSTANCE, true);
+        addFunction(LINE_CONSTRUCTOR, ALineTypeComputer.INSTANCE, true);
         addPrivateFunction(LISTIFY, OrderedListConstructorResultType.INSTANCE, true);
-        addPrivateFunction(LOCAL_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE, true);
         addPrivateFunction(MAKE_FIELD_INDEX_HANDLE, null, true); // TODO
         addPrivateFunction(MAKE_FIELD_NAME_HANDLE, null, true); // TODO
-        addFunction(MAX, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(LOCAL_MAX, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addFunction(MIN, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(LOCAL_MIN, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(NON_EMPTY_STREAM, ABooleanTypeComputer.INSTANCE, true);
-        addFunction(NULL_CONSTRUCTOR, ANullTypeComputer.INSTANCE, true);
+        addFunction(NULL_CONSTRUCTOR, AMissingTypeComputer.INSTANCE, true);
 
-        addPrivateFunction(NUMERIC_UNARY_MINUS, NonTaggedUnaryMinusTypeComputer.INSTANCE, true);
-        addPrivateFunction(NUMERIC_SUBTRACT, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE, true);
-        addPrivateFunction(NUMERIC_MULTIPLY, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE, true);
-        addPrivateFunction(NUMERIC_DIVIDE, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE, true);
-        addPrivateFunction(NUMERIC_MOD, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE, true);
+        addPrivateFunction(NUMERIC_UNARY_MINUS, UnaryMinusTypeComputer.INSTANCE, true);
+        addPrivateFunction(NUMERIC_SUBTRACT, NumericAddSubMulDivTypeComputer.INSTANCE, true);
+        addPrivateFunction(NUMERIC_MULTIPLY, NumericAddSubMulDivTypeComputer.INSTANCE, true);
+        addPrivateFunction(NUMERIC_DIVIDE, NumericAddSubMulDivTypeComputer.INSTANCE, true);
+        addPrivateFunction(NUMERIC_MOD, NumericAddSubMulDivTypeComputer.INSTANCE, true);
         addPrivateFunction(NUMERIC_IDIV, AInt64TypeComputer.INSTANCE, true);
-        addFunction(NUMERIC_ABS, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE, true);
-        addFunction(NUMERIC_CEILING, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE, true);
-        addFunction(NUMERIC_FLOOR, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE, true);
-        addFunction(NUMERIC_ROUND, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE, true);
-        addFunction(NUMERIC_ROUND_HALF_TO_EVEN, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE, true);
-        addFunction(NUMERIC_ROUND_HALF_TO_EVEN2, NonTaggedNumericRoundHalfToEven2TypeComputer.INSTANCE, true);
+        addFunction(NUMERIC_ABS, NumericUnaryFunctionTypeComputer.INSTANCE, true);
+        addFunction(NUMERIC_CEILING, NumericUnaryFunctionTypeComputer.INSTANCE, true);
+        addFunction(NUMERIC_FLOOR, NumericUnaryFunctionTypeComputer.INSTANCE, true);
+        addFunction(NUMERIC_ROUND, NumericUnaryFunctionTypeComputer.INSTANCE, true);
+        addFunction(NUMERIC_ROUND_HALF_TO_EVEN, NumericUnaryFunctionTypeComputer.INSTANCE, true);
+        addFunction(NUMERIC_ROUND_HALF_TO_EVEN2, NumericRoundHalfToEven2TypeComputer.INSTANCE, true);
 
-        addFunction(BINARY_LENGTH, UnaryBinaryInt64OrNullTypeComputer.INSTANCE, true);
-        addFunction(PARSE_BINARY, OptionalABinaryTypeComputer.INSTANCE, true);
-        addFunction(PRINT_BINARY, OptionalAStringTypeComputer.INSTANCE, true);
-        addFunction(BINARY_CONCAT, OptionalABinaryTypeComputer.INSTANCE, true);
-        addFunction(SUBBINARY_FROM, OptionalABinaryTypeComputer.INSTANCE, true);
-        addFunction(SUBBINARY_FROM_TO, OptionalABinaryTypeComputer.INSTANCE, true);
-        addFunction(FIND_BINARY, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(FIND_BINARY_FROM, OptionalAInt64TypeComputer.INSTANCE, true);
+        addFunction(BINARY_LENGTH, UnaryBinaryInt64TypeComputer.INSTANCE, true);
+        addFunction(PARSE_BINARY, ABinaryTypeComputer.INSTANCE, true);
+        addFunction(PRINT_BINARY, AStringTypeComputer.INSTANCE, true);
+        addFunction(BINARY_CONCAT, ABinaryTypeComputer.INSTANCE, true);
+        addFunction(SUBBINARY_FROM, ABinaryTypeComputer.INSTANCE, true);
+        addFunction(SUBBINARY_FROM_TO, ABinaryTypeComputer.INSTANCE, true);
+        addFunction(FIND_BINARY, AInt64TypeComputer.INSTANCE, true);
+        addFunction(FIND_BINARY_FROM, AInt64TypeComputer.INSTANCE, true);
 
-        addFunction(STRING_LIKE, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
+        addFunction(STRING_LIKE, BooleanFunctionTypeComputer.INSTANCE, true);
         addFunction(STRING_CONTAINS, ABooleanTypeComputer.INSTANCE, true);
         addFunction(STRING_TO_CODEPOINT, OrderedListOfAInt64TypeComputer.INSTANCE, true);
         addFunction(CODEPOINT_TO_STRING, AStringTypeComputer.INSTANCE, true);
-        addFunction(STRING_CONCAT, OptionalAStringTypeComputer.INSTANCE, true);
+        addFunction(STRING_CONCAT, AStringTypeComputer.INSTANCE, true);
         addFunction(SUBSTRING2, Substring2TypeComputer.INSTANCE, true);
-        addFunction(STRING_LENGTH, UnaryStringInt64OrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_LOWERCASE, UnaryStringOrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_UPPERCASE, UnaryStringOrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_STARTS_WITH, BinaryStringBoolOrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_ENDS_WITH, BinaryStringBoolOrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_MATCHES, BinaryStringBoolOrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_MATCHES_WITH_FLAG, TripleStringBoolOrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_REPLACE, TripleStringStringOrNullTypeComputer.INSTANCE, true);
-        addFunction(STRING_REPLACE_WITH_FLAG, QuadStringStringOrNullTypeComputer.INSTANCE, true);
-        addFunction(SUBSTRING_BEFORE, BinaryStringStringOrNullTypeComputer.INSTANCE, true);
-        addFunction(SUBSTRING_AFTER, BinaryStringStringOrNullTypeComputer.INSTANCE, true);
-        addPrivateFunction(STRING_EQUAL, BinaryStringBoolOrNullTypeComputer.INSTANCE, true);
+        addFunction(STRING_LENGTH, UnaryStringInt64TypeComputer.INSTANCE, true);
+        addFunction(STRING_LOWERCASE, StringStringTypeComputer.INSTANCE, true);
+        addFunction(STRING_UPPERCASE, StringStringTypeComputer.INSTANCE, true);
+        addFunction(STRING_STARTS_WITH, StringBooleanTypeComputer.INSTANCE, true);
+        addFunction(STRING_ENDS_WITH, StringBooleanTypeComputer.INSTANCE, true);
+        addFunction(STRING_MATCHES, StringBooleanTypeComputer.INSTANCE, true);
+        addFunction(STRING_MATCHES_WITH_FLAG, StringBooleanTypeComputer.INSTANCE, true);
+        addFunction(STRING_REPLACE, StringStringTypeComputer.INSTANCE, true);
+        addFunction(STRING_REPLACE_WITH_FLAG, StringStringTypeComputer.INSTANCE, true);
+        addFunction(SUBSTRING_BEFORE, StringStringTypeComputer.INSTANCE, true);
+        addFunction(SUBSTRING_AFTER, StringStringTypeComputer.INSTANCE, true);
+        addPrivateFunction(STRING_EQUAL, StringBooleanTypeComputer.INSTANCE, true);
         addFunction(STRING_JOIN, AStringTypeComputer.INSTANCE, true);
 
         addPrivateFunction(ORDERED_LIST_CONSTRUCTOR, OrderedListConstructorResultType.INSTANCE, true);
-        addFunction(POINT_CONSTRUCTOR, OptionalAPointTypeComputer.INSTANCE, true);
-        addFunction(POINT3D_CONSTRUCTOR, OptionalAPoint3DTypeComputer.INSTANCE, true);
-        addFunction(POLYGON_CONSTRUCTOR, OptionalAPolygonTypeComputer.INSTANCE, true);
+        addFunction(POINT_CONSTRUCTOR, APointTypeComputer.INSTANCE, true);
+        addFunction(POINT3D_CONSTRUCTOR, APoint3DTypeComputer.INSTANCE, true);
+        addFunction(POLYGON_CONSTRUCTOR, APolygonTypeComputer.INSTANCE, true);
         addPrivateFunction(PREFIX_LEN_JACCARD, AInt32TypeComputer.INSTANCE, true);
         addFunction(RANGE, AInt64TypeComputer.INSTANCE, true);
-        addFunction(RECTANGLE_CONSTRUCTOR, OptionalARectangleTypeComputer.INSTANCE, true);
+        addFunction(RECTANGLE_CONSTRUCTOR, ARectangleTypeComputer.INSTANCE, true);
 
-        // SQL Aggregate Functions
-        addFunction(SQL_AVG, OptionalADoubleTypeComputer.INSTANCE, true);
-        addFunction(SQL_COUNT, AInt64TypeComputer.INSTANCE, true);
-        addFunction(SQL_MAX, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(LOCAL_SQL_MAX, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addFunction(SQL_MIN, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(LOCAL_SQL_MIN, NonTaggedMinMaxAggTypeComputer.INSTANCE, true);
-        addFunction(SQL_SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(LOCAL_SQL_SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
-        addFunction(SCALAR_SQL_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
-        addFunction(SCALAR_SQL_COUNT, AInt64TypeComputer.INSTANCE, true);
-        addPrivateFunction(SCALAR_GLOBAL_SQL_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
-        addPrivateFunction(SCALAR_LOCAL_SQL_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
-        addFunction(SCALAR_SQL_MAX, ScalarVersionOfAggregateResultType.INSTANCE, true);
-        addFunction(SCALAR_SQL_MIN, ScalarVersionOfAggregateResultType.INSTANCE, true);
-        addFunction(SCALAR_SQL_SUM, ScalarVersionOfAggregateResultType.INSTANCE, true);
-        addPrivateFunction(SERIAL_SQL_AVG, OptionalADoubleTypeComputer.INSTANCE, true);
+        // Aggregate Functions
+        addFunction(MAX, MinMaxAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(LOCAL_MAX, MinMaxAggTypeComputer.INSTANCE, true);
+        addFunction(MIN, MinMaxAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(LOCAL_MIN, MinMaxAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(NON_EMPTY_STREAM, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(COUNT, AInt64TypeComputer.INSTANCE, true);
+        addPrivateFunction(LOCAL_AVG, LocalAvgTypeComputer.INSTANCE, true);
+        addFunction(AVG, NullableDoubleTypeComputer.INSTANCE, true);
+        addFunction(SUM, NumericAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(LOCAL_SUM, NumericAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(GLOBAL_AVG, NullableDoubleTypeComputer.INSTANCE, true);
+
+        addPrivateFunction(SERIAL_SQL_AVG, NullableDoubleTypeComputer.INSTANCE, true);
         addPrivateFunction(SERIAL_SQL_COUNT, AInt64TypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_GLOBAL_SQL_AVG, OptionalADoubleTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_LOCAL_SQL_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_INTERMEDIATE_SQL_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_SQL_SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_LOCAL_SQL_SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
-
-        addPrivateFunction(INTERMEDIATE_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE, true);
-        addPrivateFunction(INTERMEDIATE_SQL_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE, true);
-
+        addPrivateFunction(SERIAL_GLOBAL_SQL_AVG, NullableDoubleTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_LOCAL_SQL_AVG, LocalAvgTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_INTERMEDIATE_SQL_AVG, LocalAvgTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_SQL_SUM, NumericAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_LOCAL_SQL_SUM, NumericAggTypeComputer.INSTANCE, true);
         addFunction(SCALAR_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
         addFunction(SCALAR_COUNT, AInt64TypeComputer.INSTANCE, true);
         addPrivateFunction(SCALAR_GLOBAL_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
@@ -904,14 +874,34 @@
         addFunction(SCALAR_MAX, ScalarVersionOfAggregateResultType.INSTANCE, true);
         addFunction(SCALAR_MIN, ScalarVersionOfAggregateResultType.INSTANCE, true);
         addFunction(SCALAR_SUM, ScalarVersionOfAggregateResultType.INSTANCE, true);
-        addPrivateFunction(SCAN_COLLECTION, NonTaggedCollectionMemberResultType.INSTANCE, true);
-        addPrivateFunction(SERIAL_AVG, OptionalADoubleTypeComputer.INSTANCE, true);
+        addPrivateFunction(INTERMEDIATE_AVG, LocalAvgTypeComputer.INSTANCE, true);
+
+        addFunction(SQL_AVG, NullableDoubleTypeComputer.INSTANCE, true);
+        addFunction(SQL_COUNT, AInt64TypeComputer.INSTANCE, true);
+        addFunction(SQL_MAX, MinMaxAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(LOCAL_SQL_MAX, MinMaxAggTypeComputer.INSTANCE, true);
+        addFunction(SQL_MIN, MinMaxAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(LOCAL_SQL_MIN, MinMaxAggTypeComputer.INSTANCE, true);
+        addFunction(SQL_SUM, NumericAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(LOCAL_SQL_SUM, NumericAggTypeComputer.INSTANCE, true);
+        addFunction(SCALAR_SQL_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
+        addFunction(SCALAR_SQL_COUNT, AInt64TypeComputer.INSTANCE, true);
+        addPrivateFunction(SCALAR_GLOBAL_SQL_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
+        addPrivateFunction(SCALAR_LOCAL_SQL_AVG, ScalarVersionOfAggregateResultType.INSTANCE, true);
+        addFunction(SCALAR_SQL_MAX, ScalarVersionOfAggregateResultType.INSTANCE, true);
+        addFunction(SCALAR_SQL_MIN, ScalarVersionOfAggregateResultType.INSTANCE, true);
+        addFunction(SCALAR_SQL_SUM, ScalarVersionOfAggregateResultType.INSTANCE, true);
+        addPrivateFunction(INTERMEDIATE_SQL_AVG, LocalAvgTypeComputer.INSTANCE, true);
+
+        addPrivateFunction(SERIAL_AVG, ADoubleTypeComputer.INSTANCE, true);
         addPrivateFunction(SERIAL_COUNT, AInt64TypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_GLOBAL_AVG, OptionalADoubleTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_LOCAL_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_INTERMEDIATE_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(SERIAL_LOCAL_SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_GLOBAL_AVG, ADoubleTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_LOCAL_AVG, LocalAvgTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_INTERMEDIATE_AVG, LocalAvgTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_SUM, NumericAggTypeComputer.INSTANCE, true);
+        addPrivateFunction(SERIAL_LOCAL_SUM, NumericAggTypeComputer.INSTANCE, true);
+
+        // Similarity functions
         addFunction(EDIT_DISTANCE_CONTAINS, OrderedListOfAnyTypeComputer.INSTANCE, true);
         addFunction(SIMILARITY_JACCARD, AFloatTypeComputer.INSTANCE, true);
         addFunction(SIMILARITY_JACCARD_CHECK, OrderedListOfAnyTypeComputer.INSTANCE, true);
@@ -919,6 +909,8 @@
         addPrivateFunction(SIMILARITY_JACCARD_SORTED_CHECK, OrderedListOfAnyTypeComputer.INSTANCE, true);
         addPrivateFunction(SIMILARITY_JACCARD_PREFIX, AFloatTypeComputer.INSTANCE, true);
         addPrivateFunction(SIMILARITY_JACCARD_PREFIX_CHECK, OrderedListOfAnyTypeComputer.INSTANCE, true);
+
+        // Spatial functions
         addFunction(SPATIAL_AREA, ADoubleTypeComputer.INSTANCE, true);
         addFunction(SPATIAL_CELL, ARectangleTypeComputer.INSTANCE, true);
         addFunction(SPATIAL_DISTANCE, ADoubleTypeComputer.INSTANCE, true);
@@ -928,22 +920,22 @@
         addFunction(GET_CIRCLE_RADIUS_ACCESSOR, ADoubleTypeComputer.INSTANCE, true);
         addFunction(GET_CIRCLE_CENTER_ACCESSOR, APointTypeComputer.INSTANCE, true);
         addFunction(GET_POINTS_LINE_RECTANGLE_POLYGON_ACCESSOR, OrderedListOfAPointTypeComputer.INSTANCE, true);
-        addFunction(STRING_CONSTRUCTOR, OptionalAStringTypeComputer.INSTANCE, true);
-        addFunction(BINARY_HEX_CONSTRUCTOR, OptionalABinaryTypeComputer.INSTANCE, true);
-        addFunction(BINARY_BASE64_CONSTRUCTOR, OptionalABinaryTypeComputer.INSTANCE, true);
+        addFunction(STRING_CONSTRUCTOR, AStringTypeComputer.INSTANCE, true);
+
+        // Binary functions
+        addFunction(BINARY_HEX_CONSTRUCTOR, ABinaryTypeComputer.INSTANCE, true);
+        addFunction(BINARY_BASE64_CONSTRUCTOR, ABinaryTypeComputer.INSTANCE, true);
 
         addPrivateFunction(SUBSET_COLLECTION, SubsetCollectionTypeComputer.INSTANCE, true);
         addFunction(SUBSTRING, SubstringTypeComputer.INSTANCE, true);
-        addFunction(SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
-        addPrivateFunction(LOCAL_SUM, NonTaggedNumericAggTypeComputer.INSTANCE, true);
-        addFunction(SWITCH_CASE, NonTaggedSwitchCaseComputer.INSTANCE, true);
+        addFunction(SWITCH_CASE, SwitchCaseComputer.INSTANCE, true);
         addPrivateFunction(REG_EXP, ABooleanTypeComputer.INSTANCE, true);
         addPrivateFunction(INJECT_FAILURE, InjectFailureTypeComputer.INSTANCE, true);
         addPrivateFunction(CAST_RECORD, CastRecordResultTypeComputer.INSTANCE, true);
         addPrivateFunction(CAST_LIST, CastListResultTypeComputer.INSTANCE, true);
 
         addFunction(TID, AInt64TypeComputer.INSTANCE, true);
-        addFunction(TIME_CONSTRUCTOR, OptionalATimeTypeComputer.INSTANCE, true);
+        addFunction(TIME_CONSTRUCTOR, ATimeTypeComputer.INSTANCE, true);
         addPrivateFunction(TYPE_OF, null, true);
         addPrivateFunction(UNORDERED_LIST_CONSTRUCTOR, UnorderedListConstructorResultType.INSTANCE, true);
         addFunction(WORD_TOKENS, OrderedListOfAStringTypeComputer.INSTANCE, true);
@@ -956,86 +948,86 @@
         addPrivateFunction(OPEN_RECORD_CONSTRUCTOR, OpenRecordConstructorResultType.INSTANCE, true);
         addPrivateFunction(FIELD_ACCESS_BY_INDEX, FieldAccessByIndexResultType.INSTANCE, true);
         addPrivateFunction(FIELD_ACCESS_NESTED, FieldAccessNestedResultType.INSTANCE, true);
-        addPrivateFunction(FIELD_ACCESS_BY_NAME, NonTaggedFieldAccessByNameResultType.INSTANCE, true);
+        addPrivateFunction(FIELD_ACCESS_BY_NAME, FieldAccessByNameResultType.INSTANCE, true);
         addFunction(GET_RECORD_FIELDS, OrderedListOfAnyTypeComputer.INSTANCE, true);
         addFunction(GET_RECORD_FIELD_VALUE, FieldAccessNestedResultType.INSTANCE, true);
 
         // temporal type accessors
-        addFunction(ACCESSOR_TEMPORAL_YEAR, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_MONTH, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_DAY, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_HOUR, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_MIN, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_SEC, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_MILLISEC, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START, OptionalATemporalInstanceTypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END, OptionalATemporalInstanceTypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START_DATETIME, OptionalADateTimeTypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END_DATETIME, OptionalADateTimeTypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START_DATE, OptionalADateTypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END_DATE, OptionalADateTypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START_TIME, OptionalATimeTypeComputer.INSTANCE, true);
-        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END_TIME, OptionalATimeTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_YEAR, AInt64TypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_MONTH, AInt64TypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_DAY, AInt64TypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_HOUR, AInt64TypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_MIN, AInt64TypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_SEC, AInt64TypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_MILLISEC, AInt64TypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START, ATemporalInstanceTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END, ATemporalInstanceTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START_DATETIME, ADateTimeTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END_DATETIME, ADateTimeTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START_DATE, ADateTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END_DATE, ADateTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_START_TIME, ATimeTypeComputer.INSTANCE, true);
+        addFunction(ACCESSOR_TEMPORAL_INTERVAL_END_TIME, ATimeTypeComputer.INSTANCE, true);
 
         // temporal functions
-        addFunction(DATE_FROM_UNIX_TIME_IN_DAYS, OptionalADateTypeComputer.INSTANCE, true);
-        addFunction(DATE_FROM_DATETIME, OptionalADateTypeComputer.INSTANCE, true);
-        addFunction(TIME_FROM_UNIX_TIME_IN_MS, OptionalATimeTypeComputer.INSTANCE, true);
-        addFunction(TIME_FROM_DATETIME, OptionalATimeTypeComputer.INSTANCE, true);
-        addFunction(DATETIME_FROM_DATE_TIME, OptionalADateTimeTypeComputer.INSTANCE, true);
-        addFunction(DATETIME_FROM_UNIX_TIME_IN_MS, OptionalADateTimeTypeComputer.INSTANCE, true);
-        addFunction(DATETIME_FROM_UNIX_TIME_IN_SECS, OptionalADateTimeTypeComputer.INSTANCE, true);
-        addFunction(CALENDAR_DURATION_FROM_DATETIME, OptionalADurationTypeComputer.INSTANCE, true);
-        addFunction(CALENDAR_DURATION_FROM_DATE, OptionalADurationTypeComputer.INSTANCE, true);
-        addFunction(ADJUST_DATETIME_FOR_TIMEZONE, OptionalAStringTypeComputer.INSTANCE, true);
-        addFunction(ADJUST_TIME_FOR_TIMEZONE, OptionalAStringTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_BEFORE, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_AFTER, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_MEETS, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_MET_BY, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_OVERLAPS, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_OVERLAPPED_BY, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_OVERLAPPING, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_STARTS, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_STARTED_BY, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_COVERS, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_COVERED_BY, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_ENDS, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_ENDED_BY, OptionalABooleanTypeComputer.INSTANCE, true);
+        addFunction(DATE_FROM_UNIX_TIME_IN_DAYS, ADateTypeComputer.INSTANCE, true);
+        addFunction(DATE_FROM_DATETIME, ADateTypeComputer.INSTANCE, true);
+        addFunction(TIME_FROM_UNIX_TIME_IN_MS, ATimeTypeComputer.INSTANCE, true);
+        addFunction(TIME_FROM_DATETIME, ATimeTypeComputer.INSTANCE, true);
+        addFunction(DATETIME_FROM_DATE_TIME, ADateTimeTypeComputer.INSTANCE, true);
+        addFunction(DATETIME_FROM_UNIX_TIME_IN_MS, ADateTimeTypeComputer.INSTANCE, true);
+        addFunction(DATETIME_FROM_UNIX_TIME_IN_SECS, ADateTimeTypeComputer.INSTANCE, true);
+        addFunction(CALENDAR_DURATION_FROM_DATETIME, ADurationTypeComputer.INSTANCE, true);
+        addFunction(CALENDAR_DURATION_FROM_DATE, ADurationTypeComputer.INSTANCE, true);
+        addFunction(ADJUST_DATETIME_FOR_TIMEZONE, AStringTypeComputer.INSTANCE, true);
+        addFunction(ADJUST_TIME_FOR_TIMEZONE, AStringTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_BEFORE, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_AFTER, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_MEETS, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_MET_BY, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_OVERLAPS, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_OVERLAPPED_BY, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_OVERLAPPING, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_STARTS, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_STARTED_BY, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_COVERS, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_COVERED_BY, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_ENDS, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_ENDED_BY, ABooleanTypeComputer.INSTANCE, true);
         addFunction(CURRENT_DATE, ADateTypeComputer.INSTANCE, false);
         addFunction(CURRENT_TIME, ATimeTypeComputer.INSTANCE, false);
         addFunction(CURRENT_DATETIME, ADateTimeTypeComputer.INSTANCE, false);
-        addPrivateFunction(DAY_TIME_DURATION_GREATER_THAN, OptionalABooleanTypeComputer.INSTANCE, true);
-        addPrivateFunction(DAY_TIME_DURATION_LESS_THAN, OptionalABooleanTypeComputer.INSTANCE, true);
-        addPrivateFunction(YEAR_MONTH_DURATION_GREATER_THAN, OptionalABooleanTypeComputer.INSTANCE, true);
-        addPrivateFunction(YEAR_MONTH_DURATION_LESS_THAN, OptionalABooleanTypeComputer.INSTANCE, true);
-        addPrivateFunction(DURATION_EQUAL, OptionalABooleanTypeComputer.INSTANCE, true);
-        addFunction(DURATION_FROM_MONTHS, OptionalADurationTypeComputer.INSTANCE, true);
-        addFunction(DURATION_FROM_MILLISECONDS, OptionalADurationTypeComputer.INSTANCE, true);
-        addFunction(MONTHS_FROM_YEAR_MONTH_DURATION, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(MILLISECONDS_FROM_DAY_TIME_DURATION, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(GET_DAY_TIME_DURATION, OptionalADayTimeDurationTypeComputer.INSTANCE, true);
-        addFunction(GET_YEAR_MONTH_DURATION, OptionalAYearMonthDurationTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_BIN, OptionalAIntervalTypeComputer.INSTANCE, true);
-        addFunction(DAY_OF_WEEK, OptionalAInt64TypeComputer.INSTANCE, true);
-        addFunction(PARSE_DATE, OptionalADateTypeComputer.INSTANCE, true);
-        addFunction(PARSE_TIME, OptionalATimeTypeComputer.INSTANCE, true);
-        addFunction(PARSE_DATETIME, OptionalADateTimeTypeComputer.INSTANCE, true);
-        addFunction(PRINT_DATE, OptionalAStringTypeComputer.INSTANCE, true);
-        addFunction(PRINT_TIME, OptionalAStringTypeComputer.INSTANCE, true);
-        addFunction(PRINT_DATETIME, OptionalAStringTypeComputer.INSTANCE, true);
+        addPrivateFunction(DAY_TIME_DURATION_GREATER_THAN, ABooleanTypeComputer.INSTANCE, true);
+        addPrivateFunction(DAY_TIME_DURATION_LESS_THAN, ABooleanTypeComputer.INSTANCE, true);
+        addPrivateFunction(YEAR_MONTH_DURATION_GREATER_THAN, ABooleanTypeComputer.INSTANCE, true);
+        addPrivateFunction(YEAR_MONTH_DURATION_LESS_THAN, ABooleanTypeComputer.INSTANCE, true);
+        addPrivateFunction(DURATION_EQUAL, ABooleanTypeComputer.INSTANCE, true);
+        addFunction(DURATION_FROM_MONTHS, ADurationTypeComputer.INSTANCE, true);
+        addFunction(DURATION_FROM_MILLISECONDS, ADurationTypeComputer.INSTANCE, true);
+        addFunction(MONTHS_FROM_YEAR_MONTH_DURATION, AInt64TypeComputer.INSTANCE, true);
+        addFunction(MILLISECONDS_FROM_DAY_TIME_DURATION, AInt64TypeComputer.INSTANCE, true);
+        addFunction(GET_DAY_TIME_DURATION, ADayTimeDurationTypeComputer.INSTANCE, true);
+        addFunction(GET_YEAR_MONTH_DURATION, AYearMonthDurationTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_BIN, AIntervalTypeComputer.INSTANCE, true);
+        addFunction(DAY_OF_WEEK, AInt64TypeComputer.INSTANCE, true);
+        addFunction(PARSE_DATE, ADateTypeComputer.INSTANCE, true);
+        addFunction(PARSE_TIME, ATimeTypeComputer.INSTANCE, true);
+        addFunction(PARSE_DATETIME, ADateTimeTypeComputer.INSTANCE, true);
+        addFunction(PRINT_DATE, AStringTypeComputer.INSTANCE, true);
+        addFunction(PRINT_TIME, AStringTypeComputer.INSTANCE, true);
+        addFunction(PRINT_DATETIME, AStringTypeComputer.INSTANCE, true);
         addFunction(OVERLAP_BINS, OrderedListOfAIntervalTypeComputer.INSTANCE, true);
         addFunction(GET_OVERLAPPING_INTERVAL, GetOverlappingInvervalTypeComputer.INSTANCE, true);
-        addFunction(DURATION_FROM_INTERVAL, OptionalADayTimeDurationTypeComputer.INSTANCE, true);
+        addFunction(DURATION_FROM_INTERVAL, ADayTimeDurationTypeComputer.INSTANCE, true);
 
         // interval constructors
-        addFunction(INTERVAL_CONSTRUCTOR, OptionalAIntervalTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_CONSTRUCTOR_START_FROM_DATE, OptionalAIntervalTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_CONSTRUCTOR_START_FROM_DATETIME, OptionalAIntervalTypeComputer.INSTANCE, true);
-        addFunction(INTERVAL_CONSTRUCTOR_START_FROM_TIME, OptionalAIntervalTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_CONSTRUCTOR, AIntervalTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_CONSTRUCTOR_START_FROM_DATE, AIntervalTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_CONSTRUCTOR_START_FROM_DATETIME, AIntervalTypeComputer.INSTANCE, true);
+        addFunction(INTERVAL_CONSTRUCTOR_START_FROM_TIME, AIntervalTypeComputer.INSTANCE, true);
 
         // meta() function
-        addFunction(META, OptionalOpenARecordTypeComputer.INSTANCE, true);
+        addFunction(META, OpenARecordTypeComputer.INSTANCE, true);
         addPrivateFunction(META_KEY, AnyTypeComputer.INSTANCE, false);
 
         addPrivateFunction(COLLECTION_TO_SEQUENCE, CollectionToSequenceTypeComputer.INSTANCE, true);
@@ -1043,6 +1035,9 @@
         // external lookup
         addPrivateFunction(EXTERNAL_LOOKUP, AnyTypeComputer.INSTANCE, false);
 
+        // unnesting function
+        addPrivateFunction(SCAN_COLLECTION, CollectionMemberResultType.INSTANCE, true);
+
         String metadataFunctionLoaderClassName = "org.apache.asterix.metadata.functions.MetadataBuiltinFunctions";
         try {
             Class.forName(metadataFunctionLoaderClassName);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java
index 67b62d6..ca4a5be 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java
@@ -25,7 +25,6 @@
 import java.util.List;
 
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.dataflow.data.nontagged.AqlNullWriterFactory;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
 import org.apache.asterix.om.pointables.visitor.IVisitablePointableVisitor;
@@ -37,7 +36,6 @@
 import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.asterix.om.util.ResettableByteArrayOutputStream;
 import org.apache.asterix.om.util.container.IObjectFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
 import org.apache.hyracks.util.string.UTF8StringWriter;
 
 /**
@@ -101,9 +99,10 @@
             for (int i = 0; i < numberOfSchemaFields; i++) {
                 ATypeTag ftypeTag = fieldTypes[i].getTypeTag();
 
-                if (NonTaggedFormatUtil.isOptional(fieldTypes[i]))
+                if (NonTaggedFormatUtil.isOptional(fieldTypes[i])) {
                     // optional field: add the embedded non-null type tag
-                    ftypeTag = ((AUnionType) fieldTypes[i]).getNullableType().getTypeTag();
+                    ftypeTag = ((AUnionType) fieldTypes[i]).getActualType().getTypeTag();
+                }
 
                 // add type tag Reference
                 int tagStart = typeBos.size();
@@ -125,8 +124,7 @@
 
             // initialize a constant: null value bytes reference
             int nullFieldStart = typeBos.size();
-            INullWriter nullWriter = AqlNullWriterFactory.INSTANCE.createNullWriter();
-            nullWriter.writeNull(typeDos);
+            typeDos.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
             int nullFieldEnd = typeBos.size();
             nullReference.set(typeBos.getByteArray(), nullFieldStart, nullFieldEnd - nullFieldStart);
         } catch (IOException e) {
@@ -143,10 +141,12 @@
         allocator.reset();
 
         // clean up the returned containers
-        for (int i = fieldNames.size() - 1; i >= numberOfSchemaFields; i--)
+        for (int i = fieldNames.size() - 1; i >= numberOfSchemaFields; i--) {
             fieldNames.remove(i);
-        for (int i = fieldTypeTags.size() - 1; i >= numberOfSchemaFields; i--)
+        }
+        for (int i = fieldTypeTags.size() - 1; i >= numberOfSchemaFields; i--) {
             fieldTypeTags.remove(i);
+        }
         fieldValues.clear();
     }
 
@@ -208,8 +208,8 @@
 
                     IAType fieldType = fieldTypes[fieldNumber];
                     if (fieldTypes[fieldNumber].getTypeTag() == ATypeTag.UNION) {
-                        if (((AUnionType) fieldTypes[fieldNumber]).isNullableType()) {
-                            fieldType = ((AUnionType) fieldTypes[fieldNumber]).getNullableType();
+                        if (((AUnionType) fieldTypes[fieldNumber]).isUnknownableType()) {
+                            fieldType = ((AUnionType) fieldTypes[fieldNumber]).getActualType();
                             typeTag = fieldType.getTypeTag();
                             fieldValueLength = NonTaggedFormatUtil.getFieldValueLength(b, fieldOffsets[fieldNumber],
                                     typeTag, false);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
index 15f6c4a..960d7ea 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
@@ -30,7 +30,6 @@
 import org.apache.asterix.builders.RecordBuilder;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.exceptions.TypeException;
-import org.apache.asterix.dataflow.data.nontagged.AqlNullWriterFactory;
 import org.apache.asterix.om.pointables.ARecordVisitablePointable;
 import org.apache.asterix.om.pointables.PointableAllocator;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
@@ -39,6 +38,7 @@
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
@@ -47,7 +47,6 @@
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.common.utils.Triple;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.accessors.PointableBinaryComparatorFactory;
 import org.apache.hyracks.data.std.api.IValueReference;
@@ -74,6 +73,7 @@
     private final RecordBuilder recBuilder = new RecordBuilder();
     private final IVisitablePointable nullReference = allocator.allocateEmpty();
     private final IVisitablePointable nullTypeTag = allocator.allocateEmpty();
+    private final IVisitablePointable missingTypeTag = allocator.allocateEmpty();
 
     private final IBinaryComparator fieldNameComparator = PointableBinaryComparatorFactory
             .of(UTF8StringPointable.FACTORY).createBinaryComparator();
@@ -102,11 +102,14 @@
         try {
             bos.reset();
             int start = bos.size();
-            INullWriter nullWriter = AqlNullWriterFactory.INSTANCE.createNullWriter();
-            nullWriter.writeNull(dos);
+            dos.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
             int end = bos.size();
             nullReference.set(bos.getByteArray(), start, end - start);
             start = bos.size();
+            dos.write(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
+            end = bos.size();
+            missingTypeTag.set(bos.getByteArray(), start, end - start);
+            start = bos.size();
             dos.write(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
             end = bos.size();
             nullTypeTag.set(bos.getByteArray(), start, end - start);
@@ -142,12 +145,15 @@
     }
 
     private void reset() {
-        for (int i = 0; i < numInputFields; i++)
+        for (int i = 0; i < numInputFields; i++) {
             openFields[i] = true;
-        for (int i = 0; i < fieldPermutation.length; i++)
+        }
+        for (int i = 0; i < fieldPermutation.length; i++) {
             fieldPermutation[i] = -1;
-        for (int i = 0; i < numInputFields; i++)
+        }
+        for (int i = 0; i < numInputFields; i++) {
             fieldNamesSortedIndex[i] = i;
+        }
         outputBos.reset();
     }
 
@@ -161,8 +167,9 @@
         String[] fieldNames = reqType.getFieldNames();
         fieldPermutation = new int[numSchemaFields];
         optionalFields = new boolean[numSchemaFields];
-        for (int i = 0; i < optionalFields.length; i++)
+        for (int i = 0; i < optionalFields.length; i++) {
             optionalFields[i] = false;
+        }
 
         bos.reset(nullTypeTag.getStartOffset() + nullTypeTag.getLength());
         for (int i = 0; i < numSchemaFields; i++) {
@@ -172,7 +179,7 @@
             // add type tag pointable
             if (NonTaggedFormatUtil.isOptional(fieldTypes[i])) {
                 // optional field: add the embedded non-null type tag
-                ftypeTag = ((AUnionType) fieldTypes[i]).getNullableType().getTypeTag();
+                ftypeTag = ((AUnionType) fieldTypes[i]).getActualType().getTypeTag();
                 optionalFields[i] = true;
             }
             int tagStart = bos.size();
@@ -193,8 +200,9 @@
         }
 
         reqFieldNamesSortedIndex = new int[reqFieldNames.size()];
-        for (int i = 0; i < reqFieldNamesSortedIndex.length; i++)
+        for (int i = 0; i < reqFieldNamesSortedIndex.length; i++) {
             reqFieldNamesSortedIndex[i] = i;
+        }
         // sort the field name index
         quickSort(reqFieldNamesSortedIndex, reqFieldNames, 0, reqFieldNamesSortedIndex.length - 1);
     }
@@ -214,7 +222,8 @@
                 IVisitablePointable reqFieldTypeTag = reqFieldTypeTags.get(reqFnPos);
                 if (fieldTypeTag.equals(reqFieldTypeTag) || (
                 // match the null type of optional field
-                optionalFields[reqFnPos] && fieldTypeTag.equals(nullTypeTag))) {
+                optionalFields[reqFnPos] && (fieldTypeTag.equals(nullTypeTag))
+                        || fieldTypeTag.equals(missingTypeTag))) {
                     fieldPermutation[reqFnPos] = fnPos;
                     openFields[fnPos] = false;
                 } else {
@@ -233,10 +242,12 @@
                 fnStart++;
                 reqFnStart++;
             }
-            if (c > 0)
+            if (c > 0) {
                 reqFnStart++;
-            if (c < 0)
+            }
+            if (c < 0) {
                 fnStart++;
+            }
         }
 
         // check unmatched fields in the input type
@@ -282,7 +293,7 @@
 
     private void writeOutput(List<IVisitablePointable> fieldNames, List<IVisitablePointable> fieldTypeTags,
             List<IVisitablePointable> fieldValues, DataOutput output, ACastVisitor visitor)
-                    throws IOException, AsterixException {
+            throws IOException, AsterixException {
         // reset the states of the record builder
         recBuilder.reset(cachedReqType);
         recBuilder.init();
@@ -297,11 +308,12 @@
             // recursively casting, the result of casting can always be thought
             // as flat
             if (optionalFields[i]) {
-                if (pos == -1 || fieldTypeTags.get(pos) == null || fieldTypeTags.get(pos).equals(nullTypeTag)) {
+                if (pos == -1 || fieldTypeTags.get(pos) == null || fieldTypeTags.get(pos).equals(nullTypeTag)
+                        || fieldTypeTags.get(pos).equals(missingTypeTag)) {
                     //the field is optional in the input record
-                    nestedVisitorArg.second = ((AUnionType) fType).getUnionList().get(0);
+                    nestedVisitorArg.second = BuiltinType.ANULL;
                 } else {
-                    nestedVisitorArg.second = ((AUnionType) fType).getNullableType();
+                    nestedVisitorArg.second = ((AUnionType) fType).getActualType();
                 }
             }
             field.accept(visitor, nestedVisitorArg);
@@ -327,8 +339,9 @@
 
     private void quickSort(int[] index, List<IVisitablePointable> names, int start, int end)
             throws HyracksDataException {
-        if (end <= start)
+        if (end <= start) {
             return;
+        }
         int i = partition(index, names, start, end);
         quickSort(index, names, start, i - 1);
         quickSort(index, names, i + 1, end);
@@ -340,13 +353,18 @@
         int j = right;
         while (true) {
             // grow from the left
-            while (compare(names.get(index[++i]), names.get(index[right])) < 0);
+            while (compare(names.get(index[++i]), names.get(index[right])) < 0) {
+                ;
+            }
             // lower from the right
-            while (compare(names.get(index[right]), names.get(index[--j])) < 0)
-                if (j == left)
+            while (compare(names.get(index[right]), names.get(index[--j])) < 0) {
+                if (j == left) {
                     break;
-            if (i >= j)
+                }
+            }
+            if (i >= j) {
                 break;
+            }
             // swap i and j
             swap(index, i, j);
         }
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 e3e09d8..257914c 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
@@ -231,7 +231,7 @@
         IAType aType = recordType.getFieldTypes()[fieldId];
         if (NonTaggedFormatUtil.isOptional(aType)) {
             // optional field: add the embedded non-null type tag
-            aType = ((AUnionType) aType).getNullableType();
+            aType = ((AUnionType) aType).getActualType();
         }
         return aType;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java
index c5964b4..afa3fb7 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java
@@ -52,8 +52,8 @@
         }
     }
 
-    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
+    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor)
+            throws IOException, AsterixException {
         List<IVisitablePointable> itemTags = listAccessor.getItemTags();
         List<IVisitablePointable> items = listAccessor.getItems();
         itemVisitorArg.first = ps;
@@ -81,8 +81,8 @@
             int i) throws AsterixException {
         IVisitablePointable itemTypeTag = itemTags.get(i);
         IVisitablePointable item = items.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
         itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
         item.accept(visitor, itemVisitorArg);
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java
index 7e2b4b8..cd91c09 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java
@@ -19,6 +19,11 @@
 
 package org.apache.asterix.om.pointables.printer.adm;
 
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABinaryHexPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABooleanPrinter;
@@ -54,11 +59,6 @@
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * This class is a IVisitablePointableVisitor implementation which recursively
  * visit a given record, list or flat value of a given type, and print it to a
@@ -124,6 +124,7 @@
                     AInt64Printer.INSTANCE.print(b, s, l, ps);
                     break;
                 }
+                case MISSING:
                 case NULL: {
                     ANullPrinter.INSTANCE.print(b, s, l, ps);
                     break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java
index 4cbcf71..ef14e3e 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java
@@ -19,6 +19,10 @@
 
 package org.apache.asterix.om.pointables.printer.adm;
 
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.List;
+
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.pointables.ARecordVisitablePointable;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
@@ -26,10 +30,6 @@
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.List;
-
 /**
  * This class is to print the content of a record. It is ONLY visible to
  * APrintVisitor.
@@ -47,8 +47,8 @@
 
     }
 
-    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
+    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor)
+            throws IOException, AsterixException {
         List<IVisitablePointable> fieldNames = recordAccessor.getFieldNames();
         List<IVisitablePointable> fieldTags = recordAccessor.getFieldTypeTags();
         List<IVisitablePointable> fieldValues = recordAccessor.getFieldValues();
@@ -79,8 +79,8 @@
             List<IVisitablePointable> fieldTags, List<IVisitablePointable> fieldValues, int i) throws AsterixException {
         IVisitablePointable itemTypeTag = fieldTags.get(i);
         IVisitablePointable item = fieldValues.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
         itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
 
         // print field name
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java
index 0254ef6..306ed99 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java
@@ -19,6 +19,11 @@
 
 package org.apache.asterix.om.pointables.printer.csv;
 
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.printers.adm.ShortWithoutTypeInfoPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.csv.ABinaryHexPrinter;
@@ -53,11 +58,6 @@
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * This class is a IVisitablePointableVisitor implementation which recursively
  * visit a given record, list or flat value of a given type, and print it to a
@@ -120,6 +120,7 @@
                     AInt64Printer.INSTANCE.print(b, s, l, ps);
                     break;
                 }
+                case MISSING:
                 case NULL: {
                     ANullPrinter.INSTANCE.print(b, s, l, ps);
                     break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/ARecordPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/ARecordPrinter.java
index e6eb12c..5388837 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/ARecordPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/ARecordPrinter.java
@@ -45,8 +45,8 @@
 
     }
 
-    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
+    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor)
+            throws IOException, AsterixException {
         List<IVisitablePointable> fieldNames = recordAccessor.getFieldNames();
         List<IVisitablePointable> fieldTags = recordAccessor.getFieldTypeTags();
         List<IVisitablePointable> fieldValues = recordAccessor.getFieldValues();
@@ -71,8 +71,8 @@
             List<IVisitablePointable> fieldTags, List<IVisitablePointable> fieldValues, int i) throws AsterixException {
         IVisitablePointable itemTypeTag = fieldTags.get(i);
         IVisitablePointable item = fieldValues.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
         itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
 
         // print field value
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/AListPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/AListPrinter.java
index 892a8b68..826c465 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/AListPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/AListPrinter.java
@@ -44,8 +44,8 @@
     public AListPrinter(boolean ordered) {
     }
 
-    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
+    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor)
+            throws IOException, AsterixException {
         List<IVisitablePointable> itemTags = listAccessor.getItemTags();
         List<IVisitablePointable> items = listAccessor.getItems();
         itemVisitorArg.first = ps;
@@ -73,8 +73,8 @@
             int i) throws AsterixException {
         IVisitablePointable itemTypeTag = itemTags.get(i);
         IVisitablePointable item = items.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
         itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
         item.accept(visitor, itemVisitorArg);
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java
index ac0b73a..81677f1 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java
@@ -19,6 +19,11 @@
 
 package org.apache.asterix.om.pointables.printer.json.clean;
 
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.printers.adm.ShortWithoutTypeInfoPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.json.clean.ABinaryHexPrinter;
@@ -54,11 +59,6 @@
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * This class is a IVisitablePointableVisitor implementation which recursively
  * visit a given record, list or flat value of a given type, and print it to a
@@ -124,6 +124,7 @@
                     AInt64Printer.INSTANCE.print(b, s, l, ps);
                     break;
                 }
+                case MISSING:
                 case NULL: {
                     ANullPrinter.INSTANCE.print(b, s, l, ps);
                     break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/ARecordPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/ARecordPrinter.java
index 24815b0..6644f3a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/ARecordPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/ARecordPrinter.java
@@ -47,8 +47,8 @@
 
     }
 
-    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
+    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor)
+            throws IOException, AsterixException {
         List<IVisitablePointable> fieldNames = recordAccessor.getFieldNames();
         List<IVisitablePointable> fieldTags = recordAccessor.getFieldTypeTags();
         List<IVisitablePointable> fieldValues = recordAccessor.getFieldValues();
@@ -79,8 +79,8 @@
             List<IVisitablePointable> fieldTags, List<IVisitablePointable> fieldValues, int i) throws AsterixException {
         IVisitablePointable itemTypeTag = fieldTags.get(i);
         IVisitablePointable item = fieldValues.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
         itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
 
         // print field name
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/AListPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/AListPrinter.java
index 435a674..3b6310a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/AListPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/AListPrinter.java
@@ -49,8 +49,8 @@
         }
     }
 
-    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
+    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor)
+            throws IOException, AsterixException {
         List<IVisitablePointable> itemTags = listAccessor.getItemTags();
         List<IVisitablePointable> items = listAccessor.getItems();
         itemVisitorArg.first = ps;
@@ -78,8 +78,8 @@
             int i) throws AsterixException {
         IVisitablePointable itemTypeTag = itemTags.get(i);
         IVisitablePointable item = items.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
         itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
         item.accept(visitor, itemVisitorArg);
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/APrintVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/APrintVisitor.java
index 6a96fcd..c0f3d59 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/APrintVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/APrintVisitor.java
@@ -19,6 +19,11 @@
 
 package org.apache.asterix.om.pointables.printer.json.lossless;
 
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.printers.adm.ShortWithoutTypeInfoPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.json.lossless.ABinaryHexPrinter;
@@ -54,11 +59,6 @@
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * This class is a IVisitablePointableVisitor implementation which recursively
  * visit a given record, list or flat value of a given type, and print it to a
@@ -124,6 +124,7 @@
                     AInt64Printer.INSTANCE.print(b, s, l, ps);
                     break;
                 }
+                case MISSING:
                 case NULL: {
                     ANullPrinter.INSTANCE.print(b, s, l, ps);
                     break;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/ARecordPrinter.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/ARecordPrinter.java
index e111f76..fb7d6e1 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/ARecordPrinter.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/lossless/ARecordPrinter.java
@@ -47,8 +47,8 @@
 
     }
 
-    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
+    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor)
+            throws IOException, AsterixException {
         List<IVisitablePointable> fieldNames = recordAccessor.getFieldNames();
         List<IVisitablePointable> fieldTags = recordAccessor.getFieldTypeTags();
         List<IVisitablePointable> fieldValues = recordAccessor.getFieldValues();
@@ -79,8 +79,8 @@
             List<IVisitablePointable> fieldTags, List<IVisitablePointable> fieldValues, int i) throws AsterixException {
         IVisitablePointable itemTypeTag = fieldTags.get(i);
         IVisitablePointable item = fieldValues.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(itemTypeTag.getByteArray()[itemTypeTag.getStartOffset()]);
         itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
 
         // print field name
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/AbstractResultTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/AbstractResultTypeComputer.java
new file mode 100644
index 0000000..f3e0472
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/AbstractResultTypeComputer.java
@@ -0,0 +1,64 @@
+/*
+ * 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.om.typecomputer.base;
+
+import org.apache.asterix.om.typecomputer.impl.TypeComputeUtils;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
+import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
+
+/**
+ * This abstract class takes care of the handling of optional types.
+ * If a subclass follows the MISSING-in-MISSING-out and NULL-in-NULL-out semantics,
+ * then it only needs to think of non-optional types and this abstract class
+ * will strip the input types and wrap the output type.
+ */
+public abstract class AbstractResultTypeComputer implements IResultTypeComputer {
+
+    @Override
+    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
+            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+        return TypeComputeUtils.resolveResultType(expression, env, (index, type) -> checkArgType(index, type),
+                types -> getResultType(types), true);
+    }
+
+    /**
+     * Checks whether an input type violates the requirement.
+     *
+     * @param argIndex,
+     *            the index of the argument to consider.
+     * @param type,
+     *            the type of the input argument.
+     * @throws AlgebricksException
+     */
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+
+    }
+
+    /**
+     * Returns the result type without considering optional types.
+     *
+     * @param strippedInputTypes,
+     *            the stripped input types.
+     * @return the result type without considering optional types.
+     */
+    protected abstract IAType getResultType(IAType... strippedInputTypes);
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/TypeCastUtils.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/TypeCastUtils.java
new file mode 100644
index 0000000..04883e4
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/TypeCastUtils.java
@@ -0,0 +1,57 @@
+/*
+ * 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.om.typecomputer.base;
+
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+
+public class TypeCastUtils {
+
+    private TypeCastUtils() {
+    }
+
+    public static boolean setRequiredAndInputTypes(AbstractFunctionCallExpression expr, IAType requiredRecordType,
+            IAType inputRecordType) {
+        boolean changed = false;
+        Object[] opaqueParameters = expr.getOpaqueParameters();
+        if (opaqueParameters == null) {
+            opaqueParameters = new Object[2];
+            opaqueParameters[0] = requiredRecordType;
+            opaqueParameters[1] = inputRecordType;
+            expr.setOpaqueParameters(opaqueParameters);
+            changed = true;
+        }
+        return changed;
+    }
+
+    public static void resetRequiredAndInputTypes(AbstractFunctionCallExpression expr) {
+        expr.setOpaqueParameters(null);
+    }
+
+    public static IAType getRequiredType(AbstractFunctionCallExpression expr) {
+        Object[] type = expr.getOpaqueParameters();
+        if (type != null) {
+            IAType returnType = (IAType) type[0];
+            return returnType;
+        } else {
+            return null;
+        }
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/TypeComputerUtilities.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/TypeComputerUtilities.java
deleted file mode 100644
index a3d8003..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/base/TypeComputerUtilities.java
+++ /dev/null
@@ -1,124 +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.om.typecomputer.base;
-
-import java.util.List;
-
-import org.apache.commons.lang3.mutable.Mutable;
-
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AbstractCollectionType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression;
-
-public class TypeComputerUtilities {
-
-    public static boolean setRequiredAndInputTypes(AbstractFunctionCallExpression expr, IAType requiredRecordType,
-            IAType inputRecordType) {
-        boolean changed = false;
-        Object[] opaqueParameters = expr.getOpaqueParameters();
-        if (opaqueParameters == null) {
-            opaqueParameters = new Object[2];
-            opaqueParameters[0] = requiredRecordType;
-            opaqueParameters[1] = inputRecordType;
-            expr.setOpaqueParameters(opaqueParameters);
-            changed = true;
-        }
-        return changed;
-    }
-
-    public static void resetRequiredAndInputTypes(AbstractFunctionCallExpression expr) {
-        expr.setOpaqueParameters(null);
-    }
-
-    public static IAType getRequiredType(AbstractFunctionCallExpression expr) {
-        Object[] type = expr.getOpaqueParameters();
-        if (type != null) {
-            IAType returnType = (IAType) type[0];
-            return returnType;
-        } else
-            return null;
-    }
-
-    public static IAType getInputType(AbstractFunctionCallExpression expr) {
-        Object[] type = expr.getOpaqueParameters();
-        if (type != null) {
-            IAType returnType = (IAType) type[1];
-            return returnType;
-        } else
-            return null;
-    }
-
-    public static boolean inputInferednullableType(ILogicalExpression expression, IVariableTypeEnvironment env)
-            throws AlgebricksException {
-        AbstractFunctionCallExpression func = (AbstractFunctionCallExpression) expression;
-        if (!(func instanceof ScalarFunctionCallExpression)) {
-            return true;
-        }
-        List<Mutable<ILogicalExpression>> args = func.getArguments();
-        for (Mutable<ILogicalExpression> arg : args) {
-            IAType type = (IAType) env.getType(arg.getValue());
-            if (type.getTypeTag() == ATypeTag.UNION || type.getTypeTag() == ATypeTag.NULL
-                    || type.getTypeTag() == ATypeTag.ANY) {
-                return true;
-            }
-            if (type.getTypeTag() == ATypeTag.RECORD || type.getTypeTag() == ATypeTag.UNORDEREDLIST
-                    || type.getTypeTag() == ATypeTag.ORDEREDLIST) {
-                if (nullableCompositeType(type)) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    private static boolean nullableCompositeType(IAType type) {
-        if (type.getTypeTag() == ATypeTag.UNION || type.getTypeTag() == ATypeTag.NULL
-                || type.getTypeTag() == ATypeTag.ANY) {
-            return true;
-        } else if (type.getTypeTag() == ATypeTag.RECORD) {
-            ARecordType recordType = (ARecordType) type;
-            IAType[] fieldTypes = recordType.getFieldTypes();
-            for (IAType fieldType : fieldTypes) {
-                boolean nullable = nullableCompositeType(fieldType);
-                if (nullable) {
-                    return true;
-                }
-            }
-            return false;
-        } else if (type.getTypeTag() == ATypeTag.UNORDEREDLIST || type.getTypeTag() == ATypeTag.ORDEREDLIST) {
-            AbstractCollectionType collectionType = (AbstractCollectionType) type;
-            IAType itemType = collectionType.getItemType();
-            boolean nullable = nullableCompositeType(itemType);
-            if (nullable) {
-                return true;
-            } else {
-                return false;
-            }
-        } else {
-            return false;
-        }
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABinaryTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABinaryTypeComputer.java
index 311c54f..7f47961 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABinaryTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABinaryTypeComputer.java
@@ -19,23 +19,19 @@
 
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ABinaryTypeComputer implements IResultTypeComputer {
+public class ABinaryTypeComputer extends AbstractResultTypeComputer {
     public static final ABinaryTypeComputer INSTANCE = new ABinaryTypeComputer();
 
     private ABinaryTypeComputer() {
 
     }
 
-    @Override public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ABINARY;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABooleanTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABooleanTypeComputer.java
index a855fd2..89ffd4c 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABooleanTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ABooleanTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ABooleanTypeComputer implements IResultTypeComputer {
+public class ABooleanTypeComputer extends AbstractResultTypeComputer {
 
     public static final ABooleanTypeComputer INSTANCE = new ABooleanTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ABOOLEAN;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ACircleTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ACircleTypeComputer.java
index ab178df..e81d2f4 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ACircleTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ACircleTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ACircleTypeComputer implements IResultTypeComputer {
+public class ACircleTypeComputer extends AbstractResultTypeComputer {
 
     public static final ACircleTypeComputer INSTANCE = new ACircleTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ACIRCLE;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTimeTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTimeTypeComputer.java
index 319de99..2f4d0d1 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTimeTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTimeTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ADateTimeTypeComputer implements IResultTypeComputer {
+public class ADateTimeTypeComputer extends AbstractResultTypeComputer {
 
     public static final ADateTimeTypeComputer INSTANCE = new ADateTimeTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ADATETIME;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTypeComputer.java
index 8be058c..dd892cd 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADateTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ADateTypeComputer implements IResultTypeComputer {
+public class ADateTypeComputer extends AbstractResultTypeComputer {
 
     public static final ADateTypeComputer INSTANCE = new ADateTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ADATE;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADayTimeDurationTypeComputer.java
similarity index 64%
copy from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
copy to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADayTimeDurationTypeComputer.java
index 55df1e3..6139b0d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADayTimeDurationTypeComputer.java
@@ -18,26 +18,21 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 
-/**
- * @author Xiaoyu Ma
- */
-public class BinaryStringStringOrNullTypeComputer extends AbstractBinaryStringTypeComputer {
+public class ADayTimeDurationTypeComputer extends AbstractResultTypeComputer {
 
-    public static final BinaryStringStringOrNullTypeComputer INSTANCE = new BinaryStringStringOrNullTypeComputer();
+    public static final ADayTimeDurationTypeComputer INSTANCE = new ADayTimeDurationTypeComputer();
 
-    private BinaryStringStringOrNullTypeComputer() {
+    private ADayTimeDurationTypeComputer() {
+
     }
 
     @Override
-    public IAType getResultType(IAType t0, IAType t1, boolean nullable) {
-        if (nullable) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-        return BuiltinType.ASTRING;
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        return BuiltinType.ADAYTIMEDURATION;
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADoubleTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADoubleTypeComputer.java
index 9e468bd..eb3de27 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADoubleTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADoubleTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ADoubleTypeComputer implements IResultTypeComputer {
+public class ADoubleTypeComputer extends AbstractResultTypeComputer {
 
     public static final ADoubleTypeComputer INSTANCE = new ADoubleTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ADOUBLE;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADurationTypeComputer.java
similarity index 64%
copy from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
copy to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADurationTypeComputer.java
index 55df1e3..9021284 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ADurationTypeComputer.java
@@ -18,26 +18,20 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 
-/**
- * @author Xiaoyu Ma
- */
-public class BinaryStringStringOrNullTypeComputer extends AbstractBinaryStringTypeComputer {
+public class ADurationTypeComputer extends AbstractResultTypeComputer {
 
-    public static final BinaryStringStringOrNullTypeComputer INSTANCE = new BinaryStringStringOrNullTypeComputer();
+    public static final ADurationTypeComputer INSTANCE = new ADurationTypeComputer();
 
-    private BinaryStringStringOrNullTypeComputer() {
+    private ADurationTypeComputer() {
     }
 
     @Override
-    public IAType getResultType(IAType t0, IAType t1, boolean nullable) {
-        if (nullable) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-        return BuiltinType.ASTRING;
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        return BuiltinType.ADURATION;
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AFloatTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AFloatTypeComputer.java
index 052a5a9..d2fd672 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AFloatTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AFloatTypeComputer.java
@@ -18,14 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class AFloatTypeComputer implements IResultTypeComputer {
+public class AFloatTypeComputer extends AbstractResultTypeComputer {
 
     public static final AFloatTypeComputer INSTANCE = new AFloatTypeComputer();
 
@@ -33,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.AFLOAT;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt16TypeComputer.java
similarity index 64%
copy from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
copy to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt16TypeComputer.java
index 55df1e3..ed9d785 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt16TypeComputer.java
@@ -18,26 +18,20 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 
-/**
- * @author Xiaoyu Ma
- */
-public class BinaryStringStringOrNullTypeComputer extends AbstractBinaryStringTypeComputer {
+public class AInt16TypeComputer extends AbstractResultTypeComputer {
 
-    public static final BinaryStringStringOrNullTypeComputer INSTANCE = new BinaryStringStringOrNullTypeComputer();
+    public static final AInt16TypeComputer INSTANCE = new AInt16TypeComputer();
 
-    private BinaryStringStringOrNullTypeComputer() {
+    private AInt16TypeComputer() {
     }
 
     @Override
-    public IAType getResultType(IAType t0, IAType t1, boolean nullable) {
-        if (nullable) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-        return BuiltinType.ASTRING;
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        return BuiltinType.AINT16;
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt32TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt32TypeComputer.java
index 782e246..f0c8f89 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt32TypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt32TypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class AInt32TypeComputer implements IResultTypeComputer {
+public class AInt32TypeComputer extends AbstractResultTypeComputer {
 
     public static final AInt32TypeComputer INSTANCE = new AInt32TypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.AINT32;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt64TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt64TypeComputer.java
index c6468ca..7c43d67 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt64TypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt64TypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class AInt64TypeComputer implements IResultTypeComputer {
+public class AInt64TypeComputer extends AbstractResultTypeComputer {
 
     public static final AInt64TypeComputer INSTANCE = new AInt64TypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.AINT64;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt8TypeComputer.java
similarity index 64%
copy from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
copy to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt8TypeComputer.java
index 55df1e3..021e514 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AInt8TypeComputer.java
@@ -18,26 +18,20 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 
-/**
- * @author Xiaoyu Ma
- */
-public class BinaryStringStringOrNullTypeComputer extends AbstractBinaryStringTypeComputer {
+public class AInt8TypeComputer extends AbstractResultTypeComputer {
 
-    public static final BinaryStringStringOrNullTypeComputer INSTANCE = new BinaryStringStringOrNullTypeComputer();
+    public static final AInt8TypeComputer INSTANCE = new AInt8TypeComputer();
 
-    private BinaryStringStringOrNullTypeComputer() {
+    private AInt8TypeComputer() {
     }
 
     @Override
-    public IAType getResultType(IAType t0, IAType t1, boolean nullable) {
-        if (nullable) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-        return BuiltinType.ASTRING;
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        return BuiltinType.AINT8;
     }
 
 }
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 f6e3183..93d5a9a 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
@@ -18,27 +18,19 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class AIntervalTypeComputer implements IResultTypeComputer {
+public class AIntervalTypeComputer extends AbstractResultTypeComputer {
 
     public static final AIntervalTypeComputer INSTANCE = new AIntervalTypeComputer();
 
     private AIntervalTypeComputer() {
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.asterix.om.typecomputer.base.IResultTypeComputer#computeType(org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression, org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment, org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider)
-     */
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.AINTERVAL;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ALineTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ALineTypeComputer.java
index 4250c3a..6c93088 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ALineTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ALineTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ALineTypeComputer implements IResultTypeComputer {
+public class ALineTypeComputer extends AbstractResultTypeComputer {
 
     public static final ALineTypeComputer INSTANCE = new ALineTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ALINE;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AMissingTypeComputer.java
similarity index 87%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AMissingTypeComputer.java
index 7803760..bf262c3 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AMissingTypeComputer.java
@@ -26,17 +26,17 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ANullTypeComputer implements IResultTypeComputer {
+public class AMissingTypeComputer implements IResultTypeComputer {
 
-    public static final ANullTypeComputer INSTANCE = new ANullTypeComputer();
+    public static final AMissingTypeComputer INSTANCE = new AMissingTypeComputer();
 
-    private ANullTypeComputer() {
+    private AMissingTypeComputer() {
     }
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        return BuiltinType.ANULL;
+        return BuiltinType.AMISSING;
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APoint3DTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APoint3DTypeComputer.java
index cc7be44..74dc67b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APoint3DTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APoint3DTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class APoint3DTypeComputer implements IResultTypeComputer {
+public class APoint3DTypeComputer extends AbstractResultTypeComputer {
 
     public static final APoint3DTypeComputer INSTANCE = new APoint3DTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.APOINT3D;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APointTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APointTypeComputer.java
index 133c845..d6cd6f7 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APointTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APointTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class APointTypeComputer implements IResultTypeComputer {
+public class APointTypeComputer extends AbstractResultTypeComputer {
 
     public static final APointTypeComputer INSTANCE = new APointTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.APOINT;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APolygonTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APolygonTypeComputer.java
index 69a9640..3c7e383 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APolygonTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/APolygonTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class APolygonTypeComputer implements IResultTypeComputer {
+public class APolygonTypeComputer extends AbstractResultTypeComputer {
 
     public static final APolygonTypeComputer INSTANCE = new APolygonTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.APOLYGON;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ARectangleTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ARectangleTypeComputer.java
index 03c80b2..f308b81 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ARectangleTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ARectangleTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ARectangleTypeComputer implements IResultTypeComputer {
+public class ARectangleTypeComputer extends AbstractResultTypeComputer {
 
     public static final ARectangleTypeComputer INSTANCE = new ARectangleTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ARECTANGLE;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AStringTypeComputer.java
index 82c22b8..f900b77 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AStringTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AStringTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class AStringTypeComputer implements IResultTypeComputer {
+public class AStringTypeComputer extends AbstractResultTypeComputer {
 
     public static final AStringTypeComputer INSTANCE = new AStringTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ASTRING;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalATemporalInstanceTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ATemporalInstanceTypeComputer.java
similarity index 74%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalATemporalInstanceTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ATemporalInstanceTypeComputer.java
index 0414bb9..7d20bd3 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalATemporalInstanceTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ATemporalInstanceTypeComputer.java
@@ -30,24 +30,22 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OptionalATemporalInstanceTypeComputer implements IResultTypeComputer {
+public class ATemporalInstanceTypeComputer implements IResultTypeComputer {
 
-    public static final OptionalATemporalInstanceTypeComputer INSTANCE = new OptionalATemporalInstanceTypeComputer();
+    public static final ATemporalInstanceTypeComputer INSTANCE = new ATemporalInstanceTypeComputer();
 
-    private OptionalATemporalInstanceTypeComputer() {
+    private ATemporalInstanceTypeComputer() {
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.asterix.om.typecomputer.base.IResultTypeComputer#computeType(org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression, org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment, org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider)
-     */
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        List<IAType> unionList = new ArrayList<IAType>();
-        unionList.add(BuiltinType.ANULL);
+        List<IAType> unionList = new ArrayList<>();
         unionList.add(BuiltinType.ADATE);
         unionList.add(BuiltinType.ATIME);
         unionList.add(BuiltinType.ADATETIME);
+        unionList.add(BuiltinType.AMISSING);
+        unionList.add(BuiltinType.ANULL);
         return new AUnionType(unionList, "OptionalTemporalInstance");
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ATimeTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ATimeTypeComputer.java
index 1897244..a6950e1 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ATimeTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ATimeTypeComputer.java
@@ -18,15 +18,11 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ATimeTypeComputer implements IResultTypeComputer {
+public class ATimeTypeComputer extends AbstractResultTypeComputer {
 
     public static final ATimeTypeComputer INSTANCE = new ATimeTypeComputer();
 
@@ -34,8 +30,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.ATIME;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AUUIDTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AUUIDTypeComputer.java
index d5d324c..0a0c923 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AUUIDTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AUUIDTypeComputer.java
@@ -19,15 +19,11 @@
 
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class AUUIDTypeComputer implements IResultTypeComputer {
+public class AUUIDTypeComputer extends AbstractResultTypeComputer {
 
     public static final AUUIDTypeComputer INSTANCE = new AUUIDTypeComputer();
 
@@ -35,8 +31,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return BuiltinType.AUUID;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AYearMonthDurationTypeComputer.java
similarity index 64%
copy from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
copy to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AYearMonthDurationTypeComputer.java
index 55df1e3..6360f11 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AYearMonthDurationTypeComputer.java
@@ -18,26 +18,21 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 
-/**
- * @author Xiaoyu Ma
- */
-public class BinaryStringStringOrNullTypeComputer extends AbstractBinaryStringTypeComputer {
+public class AYearMonthDurationTypeComputer extends AbstractResultTypeComputer {
 
-    public static final BinaryStringStringOrNullTypeComputer INSTANCE = new BinaryStringStringOrNullTypeComputer();
+    public static final AYearMonthDurationTypeComputer INSTANCE = new AYearMonthDurationTypeComputer();
 
-    private BinaryStringStringOrNullTypeComputer() {
+    private AYearMonthDurationTypeComputer() {
+
     }
 
     @Override
-    public IAType getResultType(IAType t0, IAType t1, boolean nullable) {
-        if (nullable) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-        return BuiltinType.ASTRING;
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        return BuiltinType.AYEARMONTHDURATION;
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractBinaryStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractBinaryStringTypeComputer.java
deleted file mode 100644
index 522218e..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractBinaryStringTypeComputer.java
+++ /dev/null
@@ -1,90 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-/**
- * @author Xiaoyu Ma
- */
-abstract public class AbstractBinaryStringTypeComputer implements IResultTypeComputer {
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() < 2) {
-            throw new AlgebricksException("Wrong Argument Number.");
-        }
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg1 = fce.getArguments().get(1).getValue();
-        IAType t0 = (IAType) env.getType(arg0);
-        IAType t1 = (IAType) env.getType(arg1);
-
-        boolean nullable = false;
-        ATypeTag tag0, tag1;
-        if (NonTaggedFormatUtil.isOptional(t0)) {
-            tag0 = ((AUnionType) t0).getNullableType().getTypeTag();
-            nullable = true;
-        } else {
-            tag0 = t0.getTypeTag();
-        }
-
-        if (NonTaggedFormatUtil.isOptional(t1)) {
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
-            nullable = true;
-        } else {
-            tag1 = t1.getTypeTag();
-        }
-
-        if (tag0 == ATypeTag.NULL && tag1 == ATypeTag.NULL) {
-            return BuiltinType.ANULL;
-        }
-
-        if (tag0 == ATypeTag.NULL || tag1 == ATypeTag.NULL) {
-            nullable = true;
-        }
-
-        // Allow substring to work with ANY types, i.e., types that are unknown at compile time.
-        if (tag0 == ATypeTag.ANY || tag1 == ATypeTag.ANY) {
-            return BuiltinType.ANY;
-        }
-
-        if (tag0 != ATypeTag.NULL && tag0 != ATypeTag.STRING) {
-            throw new AlgebricksException("First argument should be String Type, but it is " + tag0);
-        }
-
-        if (tag1 != ATypeTag.NULL && tag1 != ATypeTag.STRING) {
-            throw new AlgebricksException("Second argument should be String Type, but it is " + tag1);
-        }
-        return getResultType(t0, t1, nullable);
-    }
-
-    public abstract IAType getResultType(IAType t0, IAType t1, boolean nullable);
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractQuadStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractQuadStringTypeComputer.java
deleted file mode 100644
index 2abdf08..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractQuadStringTypeComputer.java
+++ /dev/null
@@ -1,66 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-/**
- * @author Xiaoyu Ma
- */
-public abstract class AbstractQuadStringTypeComputer implements IResultTypeComputer {
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() < 4)
-            throw new AlgebricksException("Wrong Argument Number.");
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg1 = fce.getArguments().get(1).getValue();
-        ILogicalExpression arg2 = fce.getArguments().get(2).getValue();
-        ILogicalExpression arg3 = fce.getArguments().get(3).getValue();
-        IAType t0, t1, t2, t3;
-        try {
-            t0 = (IAType) env.getType(arg0);
-            t1 = (IAType) env.getType(arg1);
-            t2 = (IAType) env.getType(arg2);
-            t3 = (IAType) env.getType(arg3);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        if ((t0.getTypeTag() != ATypeTag.NULL && t0.getTypeTag() != ATypeTag.STRING)
-                || (t1.getTypeTag() != ATypeTag.NULL && t1.getTypeTag() != ATypeTag.STRING)
-                || (t2.getTypeTag() != ATypeTag.NULL && t2.getTypeTag() != ATypeTag.STRING)
-                || (t3.getTypeTag() != ATypeTag.NULL && t3.getTypeTag() != ATypeTag.STRING)) {
-            throw new NotImplementedException("Expects String Type.");
-        }
-
-        return getResultType(t0, t1, t2, t3);
-    }
-
-    public abstract IAType getResultType(IAType t0, IAType t1, IAType t2, IAType t3);
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractStringTypeComputer.java
new file mode 100644
index 0000000..e45c4cc
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractStringTypeComputer.java
@@ -0,0 +1,38 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+
+abstract public class AbstractStringTypeComputer extends AbstractResultTypeComputer {
+
+    @Override
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        if (type.getTypeTag() != ATypeTag.STRING) {
+            throw new AlgebricksException("The input type for input argument " + argIndex + "(" + type.getDisplayName()
+                    + ")" + " is not expected.");
+        }
+    }
+
+    @Override
+    protected abstract IAType getResultType(IAType... strippedInputTypes);
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractTripleStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractTripleStringTypeComputer.java
deleted file mode 100644
index a322ef9..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/AbstractTripleStringTypeComputer.java
+++ /dev/null
@@ -1,62 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-/**
- * @author Xiaoyu Ma
- */
-public abstract class AbstractTripleStringTypeComputer implements IResultTypeComputer {
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() < 3)
-            throw new AlgebricksException("Wrong Argument Number.");
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg1 = fce.getArguments().get(1).getValue();
-        ILogicalExpression arg2 = fce.getArguments().get(2).getValue();
-        IAType t0, t1, t2;
-        try {
-            t0 = (IAType) env.getType(arg0);
-            t1 = (IAType) env.getType(arg1);
-            t2 = (IAType) env.getType(arg2);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        if ((t0.getTypeTag() != ATypeTag.NULL && t0.getTypeTag() != ATypeTag.STRING)
-                || (t1.getTypeTag() != ATypeTag.NULL && t1.getTypeTag() != ATypeTag.STRING)
-                || (t2.getTypeTag() != ATypeTag.NULL && t2.getTypeTag() != ATypeTag.STRING)) {
-            throw new AlgebricksException("Expects String Type.");
-        }
-
-        return getResultType(t0, t1, t2);
-    }
-
-    public abstract IAType getResultType(IAType t0, IAType t1, IAType t2);
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BooleanFunctionTypeComputer.java
similarity index 68%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAStringTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BooleanFunctionTypeComputer.java
index 29be8c3..fa944c6 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAStringTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BooleanFunctionTypeComputer.java
@@ -18,9 +18,7 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -28,21 +26,23 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OptionalAStringTypeComputer implements IResultTypeComputer {
+public class BooleanFunctionTypeComputer extends AbstractResultTypeComputer {
 
-    public static final OptionalAStringTypeComputer INSTANCE = new OptionalAStringTypeComputer();
+    public static final BooleanFunctionTypeComputer INSTANCE = new BooleanFunctionTypeComputer();
 
-    private OptionalAStringTypeComputer() {
+    private BooleanFunctionTypeComputer() {
     }
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING, "OptionalString");
-        } else {
-            return BuiltinType.ASTRING;
-        }
+        // Boolean type computer doesn't follow the null/missing-in/out semantics.
+        return TypeComputeUtils.resolveResultType(expression, env, (index, type) -> checkArgType(index, type),
+                types -> getResultType(types), false);
     }
 
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        return BuiltinType.ABOOLEAN;
+    }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BooleanOnlyTypeComputer.java
similarity index 86%
copy from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java
copy to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BooleanOnlyTypeComputer.java
index 7803760..27bf16c 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BooleanOnlyTypeComputer.java
@@ -26,17 +26,17 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ANullTypeComputer implements IResultTypeComputer {
+public class BooleanOnlyTypeComputer implements IResultTypeComputer {
 
-    public static final ANullTypeComputer INSTANCE = new ANullTypeComputer();
+    public static final BooleanOnlyTypeComputer INSTANCE = new BooleanOnlyTypeComputer();
 
-    private ANullTypeComputer() {
+    private BooleanOnlyTypeComputer() {
     }
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        return BuiltinType.ANULL;
+        return BuiltinType.ABOOLEAN;
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastListResultTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastListResultTypeComputer.java
index 2a65d60..fc4242d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastListResultTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastListResultTypeComputer.java
@@ -20,7 +20,7 @@
 package org.apache.asterix.om.typecomputer.impl;
 
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.IAType;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
@@ -41,6 +41,6 @@
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
         ScalarFunctionCallExpression funcExpr = (ScalarFunctionCallExpression) expression;
-        return TypeComputerUtilities.getRequiredType(funcExpr);
+        return TypeCastUtils.getRequiredType(funcExpr);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastRecordResultTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastRecordResultTypeComputer.java
index 039b35f..e95571b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastRecordResultTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CastRecordResultTypeComputer.java
@@ -19,7 +19,7 @@
 package org.apache.asterix.om.typecomputer.impl;
 
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.IAType;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
@@ -35,6 +35,6 @@
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
         ScalarFunctionCallExpression funcExpr = (ScalarFunctionCallExpression) expression;
-        return TypeComputerUtilities.getRequiredType(funcExpr);
+        return TypeCastUtils.getRequiredType(funcExpr);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ClosedRecordConstructorResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ClosedRecordConstructorResultType.java
index a435f7a..cccc13f 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ClosedRecordConstructorResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ClosedRecordConstructorResultType.java
@@ -24,8 +24,11 @@
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.constants.AsterixConstantValue;
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.ARecordType;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -48,9 +51,10 @@
         /**
          * if type has been top-down propagated, use the enforced type
          */
-        ARecordType type = (ARecordType) TypeComputerUtilities.getRequiredType(f);
-        if (type != null)
+        ARecordType type = (ARecordType) TypeCastUtils.getRequiredType(f);
+        if (type != null) {
             return type;
+        }
 
         int n = f.getArguments().size() / 2;
         String[] fieldNames = new String[n];
@@ -59,6 +63,16 @@
         Iterator<Mutable<ILogicalExpression>> argIter = f.getArguments().iterator();
         while (argIter.hasNext()) {
             ILogicalExpression e1 = argIter.next().getValue();
+            ILogicalExpression e2 = argIter.next().getValue();
+            IAType e2Type = (IAType) env.getType(e2);
+            if (e2Type.getTypeTag() == ATypeTag.MISSING) {
+                // Converts missing to null for a closed field.
+                e2Type = BuiltinType.ANULL;
+            } else if (e2Type.getTypeTag() == ATypeTag.UNION) {
+                AUnionType unionType = (AUnionType) e2Type;
+                e2Type = AUnionType.createNullableType(unionType.getActualType());
+            }
+            fieldTypes[i] = e2Type;
             if (e1.getExpressionTag() == LogicalExpressionTag.CONSTANT) {
                 ConstantExpression nameExpr = (ConstantExpression) e1;
                 fieldNames[i] = ((AString) ((AsterixConstantValue) nameExpr.getValue()).getObject()).getStringValue();
@@ -66,8 +80,6 @@
                 throw new AlgebricksException(
                         "Field name " + i + "(" + e1 + ") in call to closed-record-constructor is not a constant.");
             }
-            ILogicalExpression e2 = argIter.next().getValue();
-            fieldTypes[i] = (IAType) env.getType(e2);
             i++;
         }
         return new ARecordType(null, fieldNames, fieldTypes, false);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionMemberResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionMemberResultType.java
new file mode 100644
index 0000000..ecdb1d0
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionMemberResultType.java
@@ -0,0 +1,54 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.AbstractCollectionType;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+
+public class CollectionMemberResultType extends AbstractResultTypeComputer {
+
+    public static final CollectionMemberResultType INSTANCE = new CollectionMemberResultType();
+
+    protected CollectionMemberResultType() {
+
+    }
+
+    @Override
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        if (type.getTypeTag() != ATypeTag.UNORDEREDLIST && type.getTypeTag() != ATypeTag.ORDEREDLIST) {
+            throw new AlgebricksException("The input type for input argument " + argIndex + "(" + type.getDisplayName()
+                    + ")" + " is not expected.");
+        }
+    }
+
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        IAType type = strippedInputTypes[0];
+        if (type.getTypeTag() == ATypeTag.ANY) {
+            return BuiltinType.ANY;
+        }
+        IAType itemType = ((AbstractCollectionType) type).getItemType();
+        return itemType;
+    }
+
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionToSequenceTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionToSequenceTypeComputer.java
index 753f9b7..9e93b71 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionToSequenceTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionToSequenceTypeComputer.java
@@ -18,16 +18,10 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AbstractCollectionType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
 /**
  * This function is to make a sequence of records and a singleton collection of records
@@ -35,26 +29,13 @@
  *
  * @author yingyib
  */
-public class CollectionToSequenceTypeComputer implements IResultTypeComputer {
+public class CollectionToSequenceTypeComputer extends AbstractResultTypeComputer {
 
     public static final CollectionToSequenceTypeComputer INSTANCE = new CollectionToSequenceTypeComputer();
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression func = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg = func.getArguments().get(0).getValue();
-
-        IAType argType = (IAType) env.getType(arg);
-        if (TypeHelper.canBeNull(argType)) {
-            IAType nonOptionalType = TypeHelper.getNonOptionalType(argType);
-            if (nonOptionalType.getTypeTag() == ATypeTag.ORDEREDLIST
-                    || nonOptionalType.getTypeTag() == ATypeTag.UNORDEREDLIST) {
-                /** if the collection is null, that corresponds to an empty sequence */
-                argType = nonOptionalType;
-            }
-        }
-
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        IAType argType = strippedInputTypes[0];
         ATypeTag argTypeTag = argType.getTypeTag();
         if (argTypeTag == ATypeTag.ORDEREDLIST || argTypeTag == ATypeTag.UNORDEREDLIST) {
             /** if the input is a singleton list, return it's item type if any */
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ConcatNonNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ConcatNonNullTypeComputer.java
index cd68827..d6fc75d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ConcatNonNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ConcatNonNullTypeComputer.java
@@ -19,14 +19,9 @@
 
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
 /**
  * The type computer for concat-not-null.
@@ -34,29 +29,21 @@
  *
  * @author yingyib
  */
-public class ConcatNonNullTypeComputer implements IResultTypeComputer {
+public class ConcatNonNullTypeComputer extends AbstractResultTypeComputer {
 
     public static final ConcatNonNullTypeComputer INSTANCE = new ConcatNonNullTypeComputer();
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
-        if (f.getArguments().size() < 1) {
-            return BuiltinType.ANULL;
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        boolean any = false;
+        IAType currentType = null;
+        for (IAType type : strippedInputTypes) {
+            if (currentType != null && !type.equals(currentType)) {
+                any = true;
+                break;
+            }
+            currentType = type;
         }
-
-        TypeCompatibilityChecker tcc = new TypeCompatibilityChecker();
-        for (int i = 0; i < f.getArguments().size(); i++) {
-            ILogicalExpression arg = f.getArguments().get(i).getValue();
-            IAType type = (IAType) env.getType(arg);
-            tcc.addPossibleType(type);
-        }
-
-        IAType result = tcc.getCompatibleType();
-        if (result == null) {
-            throw new AlgebricksException("The two branches of the if-else clause should return the same type.");
-        }
-        return result;
+        return any ? BuiltinType.ANY : currentType;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByIndexResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByIndexResultType.java
index 68bb4e1..0cdbb27 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByIndexResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByIndexResultType.java
@@ -55,7 +55,7 @@
             return null;
         }
         IAType type0 = (IAType) obj;
-        ARecordType t0 = NonTaggedFieldAccessByNameResultType.getRecordTypeFromType(type0, expression);
+        ARecordType t0 = FieldAccessByNameResultType.getRecordTypeFromType(type0, expression);
         if (t0 == null) {
             return BuiltinType.ANY;
         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedFieldAccessByNameResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java
similarity index 78%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedFieldAccessByNameResultType.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java
index bc3792f..2e43316 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedFieldAccessByNameResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java
@@ -36,11 +36,11 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class NonTaggedFieldAccessByNameResultType implements IResultTypeComputer {
+public class FieldAccessByNameResultType implements IResultTypeComputer {
 
-    public static final NonTaggedFieldAccessByNameResultType INSTANCE = new NonTaggedFieldAccessByNameResultType();
+    public static final FieldAccessByNameResultType INSTANCE = new FieldAccessByNameResultType();
 
-    private NonTaggedFieldAccessByNameResultType() {
+    private FieldAccessByNameResultType() {
     }
 
     @Override
@@ -60,7 +60,7 @@
 
         AbstractLogicalExpression arg1 = (AbstractLogicalExpression) f.getArguments().get(1).getValue();
         if (arg1.getExpressionTag() != LogicalExpressionTag.CONSTANT) {
-            return null; // BuiltinType.UNKNOWN;
+            return null;
         }
 
         ConstantExpression ce = (ConstantExpression) arg1;
@@ -75,28 +75,24 @@
 
     static ARecordType getRecordTypeFromType(IAType type0, ILogicalExpression expression) throws AlgebricksException {
         switch (type0.getTypeTag()) {
-            case RECORD: {
+            case RECORD:
                 return (ARecordType) type0;
-            }
-            case ANY: {
+            case ANY:
                 return DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
-            }
-            case UNION: {
+            case UNION:
                 AUnionType u = (AUnionType) type0;
-                if (u.isNullableType()) {
-                    IAType t1 = u.getNullableType();
-                    if (t1.getTypeTag() == ATypeTag.RECORD) {
-                        return (ARecordType) t1;
-                    }
-                    if (t1.getTypeTag() == ATypeTag.ANY) {
-                        return DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
-                    }
+                IAType t1 = u.getActualType();
+                if (t1.getTypeTag() == ATypeTag.RECORD) {
+                    return (ARecordType) t1;
+                } else if (t1.getTypeTag() == ATypeTag.ANY) {
+                    return DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
+                } else {
+                    throw new AlgebricksException(
+                            "Unsupported type " + type0 + " for field access expression: " + expression);
                 }
-            }
-            default: {
-                throw new AlgebricksException("Unsupported type " + type0 + " for field access expression: "
-                        + expression);
-            }
+            default:
+                throw new AlgebricksException(
+                        "Unsupported type " + type0 + " for field access expression: " + expression);
         }
 
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessNestedResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessNestedResultType.java
index d8164b7..6e7dca8 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessNestedResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessNestedResultType.java
@@ -54,7 +54,7 @@
             return null;
         }
         IAType type0 = (IAType) obj;
-        ARecordType t0 = NonTaggedFieldAccessByNameResultType.getRecordTypeFromType(type0, expression);
+        ARecordType t0 = FieldAccessByNameResultType.getRecordTypeFromType(type0, expression);
         if (t0 == null) {
             return BuiltinType.ANY;
         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
index fe0d1ab..27e8a3d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
@@ -20,7 +20,7 @@
 package org.apache.asterix.om.typecomputer.impl;
 
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.IAType;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
@@ -36,7 +36,7 @@
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
         ScalarFunctionCallExpression funcExpr = (ScalarFunctionCallExpression) expression;
-        IAType type = TypeComputerUtilities.getRequiredType(funcExpr);
+        IAType type = TypeCastUtils.getRequiredType(funcExpr);
         if (type == null) {
             type = (IAType) env.getType(funcExpr.getArguments().get(0).getValue());
         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/GetItemResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/GetItemResultType.java
deleted file mode 100644
index 97b8654..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/GetItemResultType.java
+++ /dev/null
@@ -1,54 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.AbstractCollectionType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class GetItemResultType implements IResultTypeComputer {
-
-    public static final GetItemResultType INSTANCE = new GetItemResultType();
-
-    private GetItemResultType() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
-        Object type0;
-        try {
-            type0 = env.getType(f.getArguments().get(0).getValue());
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        if (type0 == null) {
-            return null;
-        }
-        AbstractCollectionType t0 = (AbstractCollectionType) type0;
-        return t0.getItemType();
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/GetOverlappingInvervalTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/GetOverlappingInvervalTypeComputer.java
index 46cd97a..1f8c95d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/GetOverlappingInvervalTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/GetOverlappingInvervalTypeComputer.java
@@ -18,16 +18,12 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class GetOverlappingInvervalTypeComputer implements IResultTypeComputer {
+public class GetOverlappingInvervalTypeComputer extends AbstractResultTypeComputer {
 
     public static final GetOverlappingInvervalTypeComputer INSTANCE = new GetOverlappingInvervalTypeComputer();
 
@@ -35,8 +31,8 @@
 
     }
 
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return AUnionType.createNullableType(BuiltinType.AINTERVAL, "IntervalOrNullResult");
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/InjectFailureTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/InjectFailureTypeComputer.java
index 8293e18..5d14716 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/InjectFailureTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/InjectFailureTypeComputer.java
@@ -47,7 +47,7 @@
         IAType t1 = (IAType) env.getType(fce.getArguments().get(0).getValue());
         ATypeTag tag1 = t1.getTypeTag();
         if (NonTaggedFormatUtil.isOptional(t1))
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
+            tag1 = ((AUnionType) t1).getActualType().getTypeTag();
 
         if (tag1 != ATypeTag.BOOLEAN)
             throw new AlgebricksException(errMsg2);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedLocalAvgTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/LocalAvgTypeComputer.java
similarity index 91%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedLocalAvgTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/LocalAvgTypeComputer.java
index 5947b5f..a5858d7 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedLocalAvgTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/LocalAvgTypeComputer.java
@@ -29,9 +29,9 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class NonTaggedLocalAvgTypeComputer implements IResultTypeComputer {
+public class LocalAvgTypeComputer implements IResultTypeComputer {
 
-    public static final NonTaggedLocalAvgTypeComputer INSTANCE = new NonTaggedLocalAvgTypeComputer();
+    public static final LocalAvgTypeComputer INSTANCE = new LocalAvgTypeComputer();
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/MinMaxAggTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/MinMaxAggTypeComputer.java
new file mode 100644
index 0000000..e484cb4
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/MinMaxAggTypeComputer.java
@@ -0,0 +1,63 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+
+public class MinMaxAggTypeComputer extends AbstractResultTypeComputer {
+    private static final String ERR_MSG = "Aggregator is not implemented for ";
+
+    public static final MinMaxAggTypeComputer INSTANCE = new MinMaxAggTypeComputer();
+
+    private MinMaxAggTypeComputer() {
+    }
+
+    @Override
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        switch (tag) {
+            case DOUBLE:
+            case FLOAT:
+            case INT64:
+            case INT32:
+            case INT16:
+            case INT8:
+            case STRING:
+            case DATE:
+            case TIME:
+            case DATETIME:
+            case YEARMONTHDURATION:
+            case DAYTIMEDURATION:
+            case ANY:
+                return;
+            default:
+                throw new NotImplementedException(ERR_MSG + tag);
+        }
+    }
+
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        return AUnionType.createNullableType(strippedInputTypes[0]);
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedCollectionMemberResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedCollectionMemberResultType.java
deleted file mode 100644
index 9eeeafa..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedCollectionMemberResultType.java
+++ /dev/null
@@ -1,55 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.AbstractCollectionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NonTaggedCollectionMemberResultType implements IResultTypeComputer {
-
-    public static final NonTaggedCollectionMemberResultType INSTANCE = new NonTaggedCollectionMemberResultType();
-
-    private NonTaggedCollectionMemberResultType() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
-        IAType type = (IAType) env.getType(f.getArguments().get(0).getValue());
-        if (NonTaggedFormatUtil.isOptional(type)) {
-            type = ((AUnionType) type).getNullableType();
-        }
-        if (type.getTypeTag() == ATypeTag.ANY) {
-            return BuiltinType.ANY;
-        }
-        return ((AbstractCollectionType) type).getItemType();
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedGetItemResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedGetItemResultType.java
index 996ed9c..c2c1d1a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedGetItemResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedGetItemResultType.java
@@ -18,20 +18,16 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.AOrderedListType;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.AbstractCollectionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
+import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class NonTaggedGetItemResultType implements IResultTypeComputer {
+public class NonTaggedGetItemResultType extends AbstractResultTypeComputer {
 
     public static final NonTaggedGetItemResultType INSTANCE = new NonTaggedGetItemResultType();
 
@@ -39,19 +35,32 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
-        IAType type = (IAType) env.getType(f.getArguments().get(0).getValue());
-        if (NonTaggedFormatUtil.isOptional(type))
-            type = ((AUnionType) type).getNullableType();
-        if (type.getTypeTag() == ATypeTag.ANY)
-            return BuiltinType.ANY;
-        else {
-            if (((AOrderedListType) type).getItemType().getTypeTag() == ATypeTag.NULL)
-                return BuiltinType.ANULL;
-            return AUnionType.createNullableType(((AOrderedListType) type).getItemType(), "GetItemResult");
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        if (argIndex == 0) {
+            if (type.getTypeTag() != ATypeTag.UNORDEREDLIST && type.getTypeTag() != ATypeTag.ORDEREDLIST) {
+                throw new AlgebricksException("The input type for input argument " + argIndex + "("
+                        + type.getDisplayName() + ")" + " is not expected.");
+            }
+        } else {
+            if (!ATypeHierarchy.isCompatible(type.getTypeTag(), ATypeTag.INT32)) {
+                throw new AlgebricksException("The input type for input argument " + argIndex + "("
+                        + type.getDisplayName() + ")" + " is not expected.");
+            }
         }
     }
 
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        IAType type = strippedInputTypes[0];
+        if (type.getTypeTag() == ATypeTag.ANY) {
+            return BuiltinType.ANY;
+        }
+        IAType itemType = ((AbstractCollectionType) type).getItemType();
+        if (itemType.getTypeTag() == ATypeTag.ANY) {
+            return itemType;
+        }
+        // Could have out-of-bound access or null elements.
+        return AUnionType.createUnknownableType(itemType);
+    }
+
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedMinMaxAggTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedMinMaxAggTypeComputer.java
deleted file mode 100644
index 138bd8f..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedMinMaxAggTypeComputer.java
+++ /dev/null
@@ -1,106 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NonTaggedMinMaxAggTypeComputer implements IResultTypeComputer {
-    private static final String errMsg = "Aggregator is not implemented for ";
-
-    public static final NonTaggedMinMaxAggTypeComputer INSTANCE = new NonTaggedMinMaxAggTypeComputer();
-
-    private NonTaggedMinMaxAggTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-        IAType t1 = (IAType) env.getType(arg1);
-        if (t1 == null) {
-            return null;
-        }
-
-        ATypeTag tag1;
-        if (NonTaggedFormatUtil.isOptional(t1)) {
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
-        } else {
-            tag1 = t1.getTypeTag();
-        }
-
-        IAType type;
-
-        switch (tag1) {
-            case DOUBLE:
-                type = BuiltinType.ADOUBLE;
-                break;
-            case FLOAT:
-                type = BuiltinType.AFLOAT;
-                break;
-            case INT64:
-                type = BuiltinType.AINT64;
-                break;
-            case INT32:
-                type = BuiltinType.AINT32;
-                break;
-            case INT16:
-                type = BuiltinType.AINT16;
-                break;
-            case INT8:
-                type = BuiltinType.AINT8;
-                break;
-            case STRING:
-                type = BuiltinType.ASTRING;
-                break;
-            case DATE:
-                type = BuiltinType.ADATE;
-                break;
-            case TIME:
-                type = BuiltinType.ATIME;
-                break;
-            case DATETIME:
-                type = BuiltinType.ADATETIME;
-                break;
-            case YEARMONTHDURATION:
-                type = BuiltinType.AYEARMONTHDURATION;
-                break;
-            case DAYTIMEDURATION:
-                type = BuiltinType.ADAYTIMEDURATION;
-                break;
-            case ANY:
-                return BuiltinType.ANY;
-            default: {
-                throw new NotImplementedException(errMsg + tag1);
-            }
-        }
-        return AUnionType.createNullableType(type, "SumResult");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericAggTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericAggTypeComputer.java
deleted file mode 100644
index 1642293..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericAggTypeComputer.java
+++ /dev/null
@@ -1,88 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NonTaggedNumericAggTypeComputer implements IResultTypeComputer {
-
-    private static final String errMsg = "Aggregator is not implemented for ";
-
-    public static final NonTaggedNumericAggTypeComputer INSTANCE = new NonTaggedNumericAggTypeComputer();
-
-    private NonTaggedNumericAggTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-        IAType t1 = (IAType) env.getType(arg1);
-        if (t1 == null) {
-            return null;
-        }
-
-        ATypeTag tag1;
-        if (NonTaggedFormatUtil.isOptional(t1)) {
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
-        } else {
-            tag1 = t1.getTypeTag();
-        }
-
-        IAType type;
-        switch (tag1) {
-            case DOUBLE:
-                type = BuiltinType.ADOUBLE;
-                break;
-            case FLOAT:
-                type = BuiltinType.AFLOAT;
-                break;
-            case INT64:
-                type = BuiltinType.AINT64;
-                break;
-            case INT32:
-                type = BuiltinType.AINT32;
-                break;
-            case INT16:
-                type = BuiltinType.AINT16;
-                break;
-            case INT8:
-                type = BuiltinType.AINT8;
-                break;
-            case ANY:
-                return BuiltinType.ANY;
-            default: {
-                throw new NotImplementedException(errMsg + tag1);
-            }
-        }
-        return AUnionType.createNullableType(type, "SumResult");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericRoundHalfToEven2TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericRoundHalfToEven2TypeComputer.java
deleted file mode 100644
index aed28c9..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericRoundHalfToEven2TypeComputer.java
+++ /dev/null
@@ -1,115 +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.
- */
-/*
- * Numeric round half to even
- * Author : Xiaoyu Ma@UC Irvine
- * 01/30/2012
- */
-package org.apache.asterix.om.typecomputer.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NonTaggedNumericRoundHalfToEven2TypeComputer implements IResultTypeComputer {
-
-    public static final NonTaggedNumericRoundHalfToEven2TypeComputer INSTANCE = new NonTaggedNumericRoundHalfToEven2TypeComputer();
-
-    private NonTaggedNumericRoundHalfToEven2TypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() < 2)
-            throw new AlgebricksException("Argument number invalid.");
-
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg2 = fce.getArguments().get(1).getValue();
-
-        IAType t1 = (IAType) env.getType(arg1);
-        IAType t2 = (IAType) env.getType(arg2);
-
-        List<IAType> unionList = new ArrayList<IAType>();
-        unionList.add(BuiltinType.ANULL);
-
-        ATypeTag tag1, tag2;
-        if (NonTaggedFormatUtil.isOptional(t1))
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
-        else
-            tag1 = t1.getTypeTag();
-
-        if (NonTaggedFormatUtil.isOptional(t2))
-            tag2 = ((AUnionType) t2).getNullableType().getTypeTag();
-        else
-            tag2 = t2.getTypeTag();
-
-        switch (tag2) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
-                break;
-            default:
-                throw new AlgebricksException("Argument $precision cannot be type " + t2.getTypeName());
-        }
-
-        IAType type;
-        switch (tag1) {
-            case INT8:
-                type = BuiltinType.AINT8;
-                break;
-            case INT16:
-                type = BuiltinType.AINT16;
-                break;
-            case INT32:
-                type = BuiltinType.AINT32;
-                break;
-            case INT64:
-                type = BuiltinType.AINT64;
-                break;
-            case FLOAT:
-                type = BuiltinType.AFLOAT;
-                break;
-            case DOUBLE:
-                type = BuiltinType.ADOUBLE;
-                break;
-            case NULL:
-                return BuiltinType.ANULL;
-            default: {
-                throw new NotImplementedException("Arithmetic operations are not implemented for " + t1.getTypeName());
-            }
-        }
-
-        return AUnionType.createNullableType(type, "NumericFuncionsResult");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericUnaryFunctionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericUnaryFunctionTypeComputer.java
deleted file mode 100644
index 40e13ac..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericUnaryFunctionTypeComputer.java
+++ /dev/null
@@ -1,92 +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.
- */
-/*
- * Numeric Unary Functions like abs
- * Author : Xiaoyu Ma@UC Irvine
- * 01/30/2012
- */
-package org.apache.asterix.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NonTaggedNumericUnaryFunctionTypeComputer implements IResultTypeComputer {
-
-    private static final String errMsg = "Arithmetic operations are not implemented for ";
-    public static final NonTaggedNumericUnaryFunctionTypeComputer INSTANCE = new NonTaggedNumericUnaryFunctionTypeComputer();
-
-    private NonTaggedNumericUnaryFunctionTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().isEmpty())
-            throw new AlgebricksException("Wrong Argument Number.");
-
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-
-        IAType t = (IAType) env.getType(arg1);
-
-        if (NonTaggedFormatUtil.isOptional(t)) {
-            return (IAType) env.getType(arg1);
-        }
-
-        IAType type;
-        switch (t.getTypeTag()) {
-            case INT8:
-                type = BuiltinType.AINT8;
-                break;
-            case INT16:
-                type = BuiltinType.AINT16;
-                break;
-            case INT32:
-                type = BuiltinType.AINT32;
-                break;
-            case INT64:
-                type = BuiltinType.AINT64;
-                break;
-            case FLOAT:
-                type = BuiltinType.AFLOAT;
-                break;
-            case DOUBLE:
-                type = BuiltinType.ADOUBLE;
-                break;
-            case NULL:
-                return BuiltinType.ANULL;
-            case ANY:
-                return BuiltinType.ANY;
-            default: {
-                throw new NotImplementedException(errMsg + t.getTypeName());
-            }
-        }
-
-        return AUnionType.createNullableType(type, "NumericUnaryFuncionsResult");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedSwitchCaseComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedSwitchCaseComputer.java
deleted file mode 100644
index cef24c4..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedSwitchCaseComputer.java
+++ /dev/null
@@ -1,67 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NonTaggedSwitchCaseComputer implements IResultTypeComputer {
-
-    private static final String errMsg1 = "switch case should have at least 3 parameters ";
-    private static final String errMsg2 = "every case expression should have the same return type";
-    private static final String errMsg3 = "swith conditon type should be compatible with each case type";
-
-    public static IResultTypeComputer INSTANCE = new NonTaggedSwitchCaseComputer();
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() < 3)
-            throw new AlgebricksException(errMsg1);
-
-        TypeCompatibilityChecker tcc = new TypeCompatibilityChecker();
-        for (int i = 2; i < fce.getArguments().size(); i += 2) {
-            IAType ti = (IAType) env.getType(fce.getArguments().get(i).getValue());
-            tcc.addPossibleType(ti);
-        }
-        IAType valueType = tcc.getCompatibleType();
-        if (valueType == null) {
-            throw new AlgebricksException(errMsg2);
-        }
-
-        IAType switchType = (IAType) env.getType(fce.getArguments().get(0).getValue());
-        tcc.reset();
-        tcc.addPossibleType(switchType);
-        for (int i = 1; i < fce.getArguments().size(); i += 2) {
-            IAType ti = (IAType) env.getType(fce.getArguments().get(i).getValue());
-            tcc.addPossibleType(ti);
-        }
-        IAType caseType = tcc.getCompatibleType();
-        if (caseType == null) {
-            throw new AlgebricksException(errMsg3);
-        }
-        return valueType;
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedUnaryMinusTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedUnaryMinusTypeComputer.java
deleted file mode 100644
index 446953a..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedUnaryMinusTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NonTaggedUnaryMinusTypeComputer implements IResultTypeComputer {
-
-    public static final NonTaggedUnaryMinusTypeComputer INSTANCE = new NonTaggedUnaryMinusTypeComputer();
-
-    private NonTaggedUnaryMinusTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-        IAType envType = (IAType) env.getType(arg1);
-        if (NonTaggedFormatUtil.isOptional(envType))
-            return envType;
-        return AUnionType.createNullableType(envType, "UnaryMinusResult");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotMissingTypeComputer.java
similarity index 82%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotNullTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotMissingTypeComputer.java
index 0fd169c..68444c4 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotMissingTypeComputer.java
@@ -33,15 +33,16 @@
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
 /**
- * This class is the type computer for not-null function.
+ * This class is the type computer for not-missing function.
  * If the input type is not a union, we just return it.
  * If the input type is a union,
- * case 1: we return a new union without null if the new union still has more than one types;
- * case 2: we return the non-null item type in the original union if there are only null and it in the original union.
+ * case 1: we return a new union without missing if the new union still has more than one types;
+ * case 2: we return the non-missing item type in the original union if there are only missing
+ * and it in the original union.
  */
-public class NotNullTypeComputer implements IResultTypeComputer {
+public class NotMissingTypeComputer implements IResultTypeComputer {
 
-    public static final NotNullTypeComputer INSTANCE = new NotNullTypeComputer();
+    public static final NotMissingTypeComputer INSTANCE = new NotMissingTypeComputer();
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
@@ -54,14 +55,14 @@
         }
 
         AUnionType unionType = (AUnionType) type;
-        List<IAType> items = new ArrayList<IAType>();
+        List<IAType> items = new ArrayList<>();
         // copy the item types
         items.addAll(unionType.getUnionList());
 
-        // remove null
+        // remove missing
         for (int i = items.size() - 1; i >= 0; i--) {
             IAType itemType = items.get(i);
-            if (itemType.getTypeTag() == ATypeTag.NULL) {
+            if (itemType.getTypeTag() == ATypeTag.MISSING) {
                 items.remove(i);
             }
         }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NullableDoubleTypeComputer.java
similarity index 81%
copy from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java
copy to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NullableDoubleTypeComputer.java
index 7803760..94c75d2 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ANullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NullableDoubleTypeComputer.java
@@ -19,6 +19,7 @@
 package org.apache.asterix.om.typecomputer.impl;
 
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -26,17 +27,16 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ANullTypeComputer implements IResultTypeComputer {
+public class NullableDoubleTypeComputer implements IResultTypeComputer {
 
-    public static final ANullTypeComputer INSTANCE = new ANullTypeComputer();
+    public static final NullableDoubleTypeComputer INSTANCE = new NullableDoubleTypeComputer();
 
-    private ANullTypeComputer() {
+    private NullableDoubleTypeComputer() {
     }
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        return BuiltinType.ANULL;
+        return AUnionType.createMissableType(BuiltinType.ADOUBLE, "OptionalDouble");
     }
-
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericAddSubMulDivTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java
similarity index 61%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericAddSubMulDivTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java
index c0c595d..f9223e4 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedNumericAddSubMulDivTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java
@@ -18,65 +18,31 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class NonTaggedNumericAddSubMulDivTypeComputer implements IResultTypeComputer {
+public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer {
 
-    private static final String errMsg = "Arithmetic operations are not implemented for ";
+    private static final String ERR_MSG = "Arithmetic operations are not implemented for ";
 
-    public static final NonTaggedNumericAddSubMulDivTypeComputer INSTANCE = new NonTaggedNumericAddSubMulDivTypeComputer();
+    public static final NumericAddSubMulDivTypeComputer INSTANCE = new NumericAddSubMulDivTypeComputer();
 
-    private NonTaggedNumericAddSubMulDivTypeComputer() {
+    private NumericAddSubMulDivTypeComputer() {
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg2 = fce.getArguments().get(1).getValue();
-        IAType t1;
-        IAType t2;
-        try {
-            t1 = (IAType) env.getType(arg1);
-            t2 = (IAType) env.getType(arg2);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        if (t1 == null || t2 == null) {
-            return null;
-        }
-
-        ATypeTag tag1, tag2;
-        if (NonTaggedFormatUtil.isOptional(t1))
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
-        else
-            tag1 = t1.getTypeTag();
-
-        if (NonTaggedFormatUtil.isOptional(t2))
-            tag2 = ((AUnionType) t2).getNullableType().getTypeTag();
-        else
-            tag2 = t2.getTypeTag();
-
-        if (tag1 == ATypeTag.NULL || tag2 == ATypeTag.NULL) {
-            return BuiltinType.ANULL;
-        }
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        IAType t1 = strippedInputTypes[0];
+        IAType t2 = strippedInputTypes[1];
+        ATypeTag tag1 = t1.getTypeTag();
+        ATypeTag tag2 = t2.getTypeTag();
 
         IAType type;
-
         switch (tag1) {
-            case DOUBLE: {
+            case DOUBLE:
                 switch (tag2) {
                     case INT8:
                     case INT16:
@@ -87,14 +53,13 @@
                         type = BuiltinType.ADOUBLE;
                         break;
                     case ANY:
-                        return BuiltinType.ANY;
-                    default: {
-                        throw new NotImplementedException(errMsg + t2.getTypeName());
-                    }
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + t2.getTypeName());
                 }
                 break;
-            }
-            case FLOAT: {
+            case FLOAT:
                 switch (tag2) {
                     case INT8:
                     case INT16:
@@ -107,14 +72,13 @@
                         type = BuiltinType.ADOUBLE;
                         break;
                     case ANY:
-                        return BuiltinType.ANY;
-                    default: {
-                        throw new NotImplementedException(errMsg + t2.getTypeName());
-                    }
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + t2.getTypeName());
                 }
                 break;
-            }
-            case INT64: {
+            case INT64:
                 switch (tag2) {
                     case INT8:
                     case INT16:
@@ -129,14 +93,13 @@
                         type = BuiltinType.ADOUBLE;
                         break;
                     case ANY:
-                        return BuiltinType.ANY;
-                    default: {
-                        throw new NotImplementedException(errMsg + t2.getTypeName());
-                    }
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + t2.getTypeName());
                 }
                 break;
-            }
-            case INT32: {
+            case INT32:
                 switch (tag2) {
                     case INT8:
                     case INT16:
@@ -153,14 +116,13 @@
                         type = BuiltinType.ADOUBLE;
                         break;
                     case ANY:
-                        return BuiltinType.ANY;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case INT16: {
+            case INT16:
                 switch (tag2) {
                     case INT8:
                     case INT16:
@@ -179,14 +141,13 @@
                         type = BuiltinType.ADOUBLE;
                         break;
                     case ANY:
-                        return BuiltinType.ANY;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case INT8: {
+            case INT8:
                 switch (tag2) {
                     case INT8:
                         type = BuiltinType.AINT8;
@@ -207,14 +168,13 @@
                         type = BuiltinType.ADOUBLE;
                         break;
                     case ANY:
-                        return BuiltinType.ANY;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case ANY: {
+            case ANY:
                 switch (tag2) {
                     case INT8:
                     case INT16:
@@ -223,13 +183,13 @@
                     case FLOAT:
                     case ANY:
                     case DOUBLE:
-                        return BuiltinType.ANY;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
-            }
-            case DATE: {
+                break;
+            case DATE:
                 switch (tag2) {
                     case DATE:
                         type = BuiltinType.ADURATION;
@@ -239,13 +199,14 @@
                     case DURATION:
                         type = BuiltinType.ADATE;
                         break;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                    case ANY:
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case TIME: {
+            case TIME:
                 switch (tag2) {
                     case TIME:
                         type = BuiltinType.ADURATION;
@@ -255,13 +216,14 @@
                     case DURATION:
                         type = BuiltinType.ATIME;
                         break;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                    case ANY:
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case DATETIME: {
+            case DATETIME:
                 switch (tag2) {
                     case DATETIME:
                         type = BuiltinType.ADURATION;
@@ -271,13 +233,11 @@
                     case DURATION:
                         type = BuiltinType.ADATETIME;
                         break;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case DURATION: {
+            case DURATION:
                 switch (tag2) {
                     case DATE:
                         type = BuiltinType.ADATE;
@@ -288,13 +248,14 @@
                     case DATETIME:
                         type = BuiltinType.ADATETIME;
                         break;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                    case ANY:
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case YEARMONTHDURATION: {
+            case YEARMONTHDURATION:
                 switch (tag2) {
                     case DATE:
                         type = BuiltinType.ADATE;
@@ -308,13 +269,14 @@
                     case YEARMONTHDURATION:
                         type = BuiltinType.AYEARMONTHDURATION;
                         break;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                    case ANY:
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            case DAYTIMEDURATION: {
+            case DAYTIMEDURATION:
                 switch (tag2) {
                     case DATE:
                         type = BuiltinType.ADATE;
@@ -328,16 +290,16 @@
                     case DAYTIMEDURATION:
                         type = BuiltinType.ADAYTIMEDURATION;
                         break;
-                    default: {
-                        throw new NotImplementedException(errMsg + tag2);
-                    }
+                    case ANY:
+                        type = BuiltinType.ANY;
+                        break;
+                    default:
+                        throw new NotImplementedException(ERR_MSG + tag2);
                 }
                 break;
-            }
-            default: {
-                throw new NotImplementedException(errMsg + tag1);
-            }
+            default:
+                throw new NotImplementedException(ERR_MSG + tag1);
         }
-        return AUnionType.createNullableType(type, "ArithemitcResult");
+        return type;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulTypeDescriptor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulTypeDescriptor.java
deleted file mode 100644
index 2796022..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulTypeDescriptor.java
+++ /dev/null
@@ -1,83 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class NumericAddSubMulTypeDescriptor implements IResultTypeComputer {
-
-    private static final String errMsg = "Arithmetic operations are only implemented for AINT32 and ADOUBLE.";
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg2 = fce.getArguments().get(1).getValue();
-        IAType t1;
-        IAType t2;
-        try {
-            t1 = (IAType) env.getType(arg1);
-            t2 = (IAType) env.getType(arg2);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        if (t1 == null || t2 == null) {
-            return null;
-        }
-        switch (t1.getTypeTag()) {
-            case INT32: {
-                switch (t2.getTypeTag()) {
-                    case INT32: {
-                        return BuiltinType.AINT32;
-                    }
-                    case DOUBLE: {
-                        return BuiltinType.ADOUBLE;
-                    }
-                    default: {
-                        throw new NotImplementedException(errMsg);
-                    }
-                }
-            }
-            case DOUBLE: {
-                switch (t2.getTypeTag()) {
-                    case INT32:
-                    case DOUBLE: {
-                        return BuiltinType.ADOUBLE;
-                    }
-                    default: {
-                        throw new NotImplementedException(errMsg);
-                    }
-                }
-            }
-            default: {
-                throw new NotImplementedException(errMsg);
-            }
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAggTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAggTypeComputer.java
new file mode 100644
index 0000000..691ee7a
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAggTypeComputer.java
@@ -0,0 +1,73 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+
+public class NumericAggTypeComputer extends AbstractResultTypeComputer {
+
+    private static final String ERR_MSG = "Aggregator is not implemented for ";
+
+    public static final NumericAggTypeComputer INSTANCE = new NumericAggTypeComputer();
+
+    private NumericAggTypeComputer() {
+    }
+
+    @Override
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        switch (tag) {
+            case DOUBLE:
+            case FLOAT:
+            case INT64:
+            case INT32:
+            case INT16:
+            case INT8:
+            case ANY:
+                break;
+            default:
+                throw new NotImplementedException(ERR_MSG + tag);
+        }
+    }
+
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        ATypeTag tag = strippedInputTypes[0].getTypeTag();
+        IAType type;
+        switch (tag) {
+            case DOUBLE:
+            case FLOAT:
+            case INT64:
+            case INT32:
+            case INT16:
+            case INT8:
+            case ANY:
+                type = strippedInputTypes[0];
+                break;
+            default:
+                throw new NotImplementedException(ERR_MSG + tag);
+        }
+        return AUnionType.createNullableType(type, "AggResult");
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRoundHalfToEven2TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRoundHalfToEven2TypeComputer.java
new file mode 100644
index 0000000..675d1f0
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRoundHalfToEven2TypeComputer.java
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+/*
+ * Numeric round half to even
+ * Author : Xiaoyu Ma@UC Irvine
+ * 01/30/2012
+ */
+package org.apache.asterix.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+
+public class NumericRoundHalfToEven2TypeComputer extends AbstractResultTypeComputer {
+
+    public static final NumericRoundHalfToEven2TypeComputer INSTANCE = new NumericRoundHalfToEven2TypeComputer();
+
+    private NumericRoundHalfToEven2TypeComputer() {
+
+    }
+
+    @Override
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        if (argIndex == 0) {
+            switch (tag) {
+                case INT8:
+                case INT16:
+                case INT32:
+                case INT64:
+                case FLOAT:
+                case DOUBLE:
+                    break;
+                default:
+                    throw new NotImplementedException(
+                            "Arithmetic operations are not implemented for " + type.getDisplayName());
+            }
+        }
+        if (argIndex == 1) {
+            switch (tag) {
+                case INT8:
+                case INT16:
+                case INT32:
+                case INT64:
+                    break;
+                default:
+                    throw new AlgebricksException("Argument $precision cannot be type " + type.getDisplayName());
+            }
+        }
+    }
+
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        ATypeTag tag = strippedInputTypes[0].getTypeTag();
+        switch (tag) {
+            case INT8:
+            case INT16:
+            case INT32:
+            case INT64:
+            case FLOAT:
+            case DOUBLE:
+            case ANY:
+                return strippedInputTypes[0];
+            default:
+                return null;
+        }
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericUnaryFunctionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericUnaryFunctionTypeComputer.java
new file mode 100644
index 0000000..017e178
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericUnaryFunctionTypeComputer.java
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+/*
+ * Numeric Unary Functions like abs
+ * Author : Xiaoyu Ma@UC Irvine
+ * 01/30/2012
+ */
+package org.apache.asterix.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+
+public class NumericUnaryFunctionTypeComputer extends AbstractResultTypeComputer {
+
+    private static final String ERR_MSG = "Arithmetic operations are not implemented for ";
+    public static final NumericUnaryFunctionTypeComputer INSTANCE = new NumericUnaryFunctionTypeComputer();
+
+    private NumericUnaryFunctionTypeComputer() {
+    }
+
+    @Override
+    protected void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        switch (tag) {
+            case INT8:
+            case INT16:
+            case INT32:
+            case INT64:
+            case FLOAT:
+            case DOUBLE:
+            case ANY:
+                break;
+            default:
+                throw new AlgebricksException(ERR_MSG + type.getDisplayName());
+        }
+    }
+
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        ATypeTag tag = strippedInputTypes[0].getTypeTag();
+        switch (tag) {
+            case INT8:
+            case INT16:
+            case INT32:
+            case INT64:
+            case FLOAT:
+            case DOUBLE:
+            case ANY:
+                return strippedInputTypes[0];
+            default:
+                return null;
+        }
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalOpenARecordTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OpenARecordTypeComputer.java
similarity index 82%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalOpenARecordTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OpenARecordTypeComputer.java
index b630f44..4a041d4 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalOpenARecordTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OpenARecordTypeComputer.java
@@ -27,17 +27,17 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OptionalOpenARecordTypeComputer implements IResultTypeComputer {
+public class OpenARecordTypeComputer implements IResultTypeComputer {
 
-    public static final OptionalOpenARecordTypeComputer INSTANCE = new OptionalOpenARecordTypeComputer();
+    public static final OpenARecordTypeComputer INSTANCE = new OpenARecordTypeComputer();
 
-    private OptionalOpenARecordTypeComputer() {
+    private OpenARecordTypeComputer() {
     }
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        return AUnionType.createNullableType(DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE, "OptionalOpenRecord");
+        return AUnionType.createUnknownableType(DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE, "UnknownableOpenRecord");
     }
 
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OpenRecordConstructorResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OpenRecordConstructorResultType.java
index 862d1cd..3e1955d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OpenRecordConstructorResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OpenRecordConstructorResultType.java
@@ -26,7 +26,7 @@
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.constants.AsterixConstantValue;
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.types.TypeHelper;
@@ -51,7 +51,7 @@
         /**
          * if type has been top-down propagated, use the enforced type
          */
-        ARecordType type = (ARecordType) TypeComputerUtilities.getRequiredType(f);
+        ARecordType type = (ARecordType) TypeCastUtils.getRequiredType(f);
         if (type != null)
             return type;
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalABinaryTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalABinaryTypeComputer.java
deleted file mode 100644
index 9831665..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalABinaryTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalABinaryTypeComputer implements IResultTypeComputer {
-    public static final OptionalABinaryTypeComputer INSTANCE = new OptionalABinaryTypeComputer();
-
-    private OptionalABinaryTypeComputer() {
-
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ABINARY, "OptionalBinary");
-        } else {
-            return BuiltinType.ABINARY;
-        }
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalABooleanTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalABooleanTypeComputer.java
deleted file mode 100644
index 3e91d23..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalABooleanTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalABooleanTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalABooleanTypeComputer INSTANCE = new OptionalABooleanTypeComputer();
-
-    private OptionalABooleanTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ABOOLEAN, "OptionalBoolean");
-        } else {
-            return BuiltinType.ABOOLEAN;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalACircleTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalACircleTypeComputer.java
deleted file mode 100644
index 244156d..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalACircleTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalACircleTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalACircleTypeComputer INSTANCE = new OptionalACircleTypeComputer();
-
-    private OptionalACircleTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ACIRCLE, "OptionalCircle");
-        } else {
-            return BuiltinType.ACIRCLE;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADateTimeTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADateTimeTypeComputer.java
deleted file mode 100644
index 04729bf..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADateTimeTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalADateTimeTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalADateTimeTypeComputer INSTANCE = new OptionalADateTimeTypeComputer();
-
-    private OptionalADateTimeTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ADATETIME, "OptionalDatetime");
-        } else {
-            return BuiltinType.ADATETIME;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADateTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADateTypeComputer.java
deleted file mode 100644
index 1d2fb77..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADateTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalADateTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalADateTypeComputer INSTANCE = new OptionalADateTypeComputer();
-
-    private OptionalADateTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ADATE, "OptionalDate");
-        } else {
-            return BuiltinType.ADATE;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADayTimeDurationTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADayTimeDurationTypeComputer.java
deleted file mode 100644
index c6a2790..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADayTimeDurationTypeComputer.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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalADayTimeDurationTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalADayTimeDurationTypeComputer INSTANCE = new OptionalADayTimeDurationTypeComputer();
-
-    private OptionalADayTimeDurationTypeComputer() {
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.asterix.om.typecomputer.base.IResultTypeComputer#computeType(org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression, org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment, org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider)
-     */
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ADAYTIMEDURATION, "OptionalDayTimeDuration");
-        } else {
-            return BuiltinType.ADAYTIMEDURATION;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADoubleTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADoubleTypeComputer.java
deleted file mode 100644
index c6a1c6d..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADoubleTypeComputer.java
+++ /dev/null
@@ -1,47 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalADoubleTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalADoubleTypeComputer INSTANCE = new OptionalADoubleTypeComputer();
-
-    private OptionalADoubleTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ADOUBLE, "OptionalDouble");
-        } else {
-            return BuiltinType.ADOUBLE;
-        }
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADurationTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADurationTypeComputer.java
deleted file mode 100644
index eb24b80..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalADurationTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalADurationTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalADurationTypeComputer INSTANCE = new OptionalADurationTypeComputer();
-
-    private OptionalADurationTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ADURATION, "OptionalDuration");
-        } else {
-            return BuiltinType.ADURATION;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAFloatTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAFloatTypeComputer.java
deleted file mode 100644
index 0bdd280..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAFloatTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAFloatTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAFloatTypeComputer INSTANCE = new OptionalAFloatTypeComputer();
-
-    private OptionalAFloatTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.AFLOAT, "OptionalFloat");
-        } else {
-            return BuiltinType.AFLOAT;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt16TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt16TypeComputer.java
deleted file mode 100644
index feeb1ce..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt16TypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAInt16TypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAInt16TypeComputer INSTANCE = new OptionalAInt16TypeComputer();
-
-    private OptionalAInt16TypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.AINT16, "OptionalInt16");
-        } else {
-            return BuiltinType.AINT16;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt32TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt32TypeComputer.java
deleted file mode 100644
index cdb3cd0..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt32TypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAInt32TypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAInt32TypeComputer INSTANCE = new OptionalAInt32TypeComputer();
-
-    private OptionalAInt32TypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.AINT32, "OptionalInt32");
-        } else {
-            return BuiltinType.AINT32;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt64TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt64TypeComputer.java
deleted file mode 100644
index 07ca80e..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt64TypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAInt64TypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAInt64TypeComputer INSTANCE = new OptionalAInt64TypeComputer();
-
-    private OptionalAInt64TypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.AINT64, "OptionalInt64");
-        } else {
-            return BuiltinType.AINT64;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt8TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt8TypeComputer.java
deleted file mode 100644
index 0adf222..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAInt8TypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAInt8TypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAInt8TypeComputer INSTANCE = new OptionalAInt8TypeComputer();
-
-    private OptionalAInt8TypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.AINT8, "OptionalInt8");
-        } else {
-            return BuiltinType.AINT8;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAIntervalTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAIntervalTypeComputer.java
deleted file mode 100644
index 8cb8ca4..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAIntervalTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAIntervalTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAIntervalTypeComputer INSTANCE = new OptionalAIntervalTypeComputer();
-
-    private OptionalAIntervalTypeComputer() {
-
-    }
-
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.AINTERVAL, "OptionalInterval");
-        } else {
-            return BuiltinType.AINTERVAL;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalALineTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalALineTypeComputer.java
deleted file mode 100644
index 7d6aa4c..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalALineTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalALineTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalALineTypeComputer INSTANCE = new OptionalALineTypeComputer();
-
-    private OptionalALineTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ALINE, "OptionalLine");
-        } else {
-            return BuiltinType.ALINE;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPoint3DTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPoint3DTypeComputer.java
deleted file mode 100644
index 40c5ae8..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPoint3DTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAPoint3DTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAPoint3DTypeComputer INSTANCE = new OptionalAPoint3DTypeComputer();
-
-    private OptionalAPoint3DTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.APOINT3D, "OptionalPoint3d");
-        } else {
-            return BuiltinType.APOINT3D;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPointTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPointTypeComputer.java
deleted file mode 100644
index 4bcccd9..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPointTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAPointTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAPointTypeComputer INSTANCE = new OptionalAPointTypeComputer();
-
-    private OptionalAPointTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.APOINT, "OptionalPoint");
-        } else {
-            return BuiltinType.APOINT;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPolygonTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPolygonTypeComputer.java
deleted file mode 100644
index 7fb16cd..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAPolygonTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAPolygonTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAPolygonTypeComputer INSTANCE = new OptionalAPolygonTypeComputer();
-
-    private OptionalAPolygonTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.APOLYGON, "OptionalPolygon");
-        } else {
-            return BuiltinType.APOLYGON;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalARectangleTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalARectangleTypeComputer.java
deleted file mode 100644
index a5f954f..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalARectangleTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalARectangleTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalARectangleTypeComputer INSTANCE = new OptionalARectangleTypeComputer();
-
-    private OptionalARectangleTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ARECTANGLE, "OptionalRectangle");
-        } else {
-            return BuiltinType.ARECTANGLE;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalATimeTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalATimeTypeComputer.java
deleted file mode 100644
index f8c175a..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalATimeTypeComputer.java
+++ /dev/null
@@ -1,48 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalATimeTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalATimeTypeComputer INSTANCE = new OptionalATimeTypeComputer();
-
-    private OptionalATimeTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.ATIME, "OptionalTime");
-        } else {
-            return BuiltinType.ATIME;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAYearMonthDurationTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAYearMonthDurationTypeComputer.java
deleted file mode 100644
index df0e46d..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OptionalAYearMonthDurationTypeComputer.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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class OptionalAYearMonthDurationTypeComputer implements IResultTypeComputer {
-
-    public static final OptionalAYearMonthDurationTypeComputer INSTANCE = new OptionalAYearMonthDurationTypeComputer();
-
-    private OptionalAYearMonthDurationTypeComputer() {
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.asterix.om.typecomputer.base.IResultTypeComputer#computeType(org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression, org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment, org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider)
-     */
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        if (TypeComputerUtilities.inputInferednullableType(expression, env)) {
-            return AUnionType.createNullableType(BuiltinType.AYEARMONTHDURATION, "OptionalYearMonthDuration");
-        } else {
-            return BuiltinType.AYEARMONTHDURATION;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListConstructorResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListConstructorResultType.java
index f8c0a2a..70a0ca5 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListConstructorResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListConstructorResultType.java
@@ -19,15 +19,13 @@
 
 package org.apache.asterix.om.typecomputer.impl;
 
-import java.util.ArrayList;
-
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.AOrderedListType;
+import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
@@ -46,23 +44,28 @@
         /**
          * if type has been top-down propagated, use the enforced type
          */
-        AOrderedListType reqType = (AOrderedListType) TypeComputerUtilities.getRequiredType(f);
-        if (reqType != null)
+        AOrderedListType reqType = (AOrderedListType) TypeCastUtils.getRequiredType(f);
+        if (reqType != null) {
             return reqType;
+        }
 
-        ArrayList<IAType> types = new ArrayList<IAType>();
+        IAType currentType = null;
+        boolean any = false;
         for (int k = 0; k < f.getArguments().size(); k++) {
             IAType type = (IAType) env.getType(f.getArguments().get(k).getValue());
-            if (NonTaggedFormatUtil.isOptional(type))
-                type = ((AUnionType) type).getNullableType();
-            if (types.indexOf(type) < 0) {
-                types.add(type);
+            if (type.getTypeTag() == ATypeTag.UNION) {
+                type = ((AUnionType) type).getActualType();
             }
+            if (currentType != null && !currentType.equals(type)) {
+                any = true;
+                break;
+            }
+            currentType = type;
         }
-        if (types.size() == 1) {
-            return new AOrderedListType(types.get(0), null);
-        } else {
+        if (any || currentType == null) {
             return new AOrderedListType(BuiltinType.ANY, null);
+        } else {
+            return new AOrderedListType(currentType, null);
         }
 
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt32TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt32TypeComputer.java
index 3297cca..a0ea2a5 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt32TypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt32TypeComputer.java
@@ -18,16 +18,12 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OrderedListOfAInt32TypeComputer implements IResultTypeComputer {
+public class OrderedListOfAInt32TypeComputer extends AbstractResultTypeComputer {
 
     public static final OrderedListOfAInt32TypeComputer INSTANCE = new OrderedListOfAInt32TypeComputer();
 
@@ -35,8 +31,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return new AOrderedListType(BuiltinType.AINT32, null);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt64TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt64TypeComputer.java
index c88336f..1aec3c7 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt64TypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAInt64TypeComputer.java
@@ -18,16 +18,12 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OrderedListOfAInt64TypeComputer implements IResultTypeComputer {
+public class OrderedListOfAInt64TypeComputer extends AbstractResultTypeComputer {
 
     public static final OrderedListOfAInt64TypeComputer INSTANCE = new OrderedListOfAInt64TypeComputer();
 
@@ -35,8 +31,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return new AOrderedListType(BuiltinType.AINT64, null);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAIntervalTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAIntervalTypeComputer.java
index d6474a1..f3892dd 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAIntervalTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAIntervalTypeComputer.java
@@ -18,16 +18,12 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OrderedListOfAIntervalTypeComputer implements IResultTypeComputer {
+public class OrderedListOfAIntervalTypeComputer extends AbstractResultTypeComputer {
 
     public static final OrderedListOfAIntervalTypeComputer INSTANCE = new OrderedListOfAIntervalTypeComputer();
 
@@ -35,8 +31,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return new AOrderedListType(BuiltinType.AINTERVAL, null);
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAPointTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAPointTypeComputer.java
index 36ec846..2d99a09 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAPointTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAPointTypeComputer.java
@@ -18,16 +18,12 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OrderedListOfAPointTypeComputer implements IResultTypeComputer {
+public class OrderedListOfAPointTypeComputer extends AbstractResultTypeComputer {
 
     public static final OrderedListOfAPointTypeComputer INSTANCE = new OrderedListOfAPointTypeComputer();
 
@@ -35,8 +31,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return new AOrderedListType(BuiltinType.APOINT, null);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAStringTypeComputer.java
index 3106171..977b7e4 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAStringTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAStringTypeComputer.java
@@ -18,16 +18,12 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OrderedListOfAStringTypeComputer implements IResultTypeComputer {
+public class OrderedListOfAStringTypeComputer extends AbstractResultTypeComputer {
 
     public static final OrderedListOfAStringTypeComputer INSTANCE = new OrderedListOfAStringTypeComputer();
 
@@ -35,8 +31,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return new AOrderedListType(BuiltinType.ASTRING, null);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAnyTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAnyTypeComputer.java
index 48bec4f..e88e80b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAnyTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/OrderedListOfAnyTypeComputer.java
@@ -18,16 +18,12 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class OrderedListOfAnyTypeComputer implements IResultTypeComputer {
+public class OrderedListOfAnyTypeComputer extends AbstractResultTypeComputer {
 
     public static final OrderedListOfAnyTypeComputer INSTANCE = new OrderedListOfAnyTypeComputer();
 
@@ -35,8 +31,7 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
+    protected IAType getResultType(IAType... strippedInputTypes) {
         return new AOrderedListType(BuiltinType.ANY, null);
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/QuadStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/QuadStringStringOrNullTypeComputer.java
deleted file mode 100644
index f238125..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/QuadStringStringOrNullTypeComputer.java
+++ /dev/null
@@ -1,44 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
-
-/**
- * @author Xiaoyu Ma
- */
-public class QuadStringStringOrNullTypeComputer extends AbstractQuadStringTypeComputer {
-    public static final QuadStringStringOrNullTypeComputer INSTANCE = new QuadStringStringOrNullTypeComputer();
-
-    private QuadStringStringOrNullTypeComputer() {
-    }
-
-    @Override
-    public IAType getResultType(IAType t0, IAType t1, IAType t2, IAType t3) {
-        if (TypeHelper.canBeNull(t0) || TypeHelper.canBeNull(t1) || TypeHelper.canBeNull(t2)
-                || TypeHelper.canBeNull(t3)) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-        return BuiltinType.ASTRING;
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java
index 05002a6..a77935e 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java
@@ -63,19 +63,19 @@
         AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expression;
         IAType type0 = (IAType) env.getType(funcExpr.getArguments().get(0).getValue());
 
-        ARecordType inputRecordType = TypeComputerUtils.extractRecordType(type0);
+        ARecordType inputRecordType = TypeComputeUtils.extractRecordType(type0);
         if (inputRecordType == null) {
             throw new AlgebricksException("Input record cannot be null");
         }
 
         AbstractLogicalExpression arg1 = (AbstractLogicalExpression) funcExpr.getArguments().get(1).getValue();
         IAType type1 = (IAType) env.getType(arg1);
-        AOrderedListType inputOrderedListType = TypeComputerUtils.extractOrderedListType(type1);
+        AOrderedListType inputOrderedListType = TypeComputeUtils.extractOrderedListType(type1);
         if (inputOrderedListType == null) {
             return inputRecordType;
         }
 
-        boolean nullable = TypeHelper.canBeNull(type0) || TypeHelper.canBeNull(type1);
+        boolean nullable = TypeHelper.canBeUnknown(type0) || TypeHelper.canBeUnknown(type1);
         Map<String, IAType> additionalFields = new HashMap<>();
         List<String> resultFieldNames = new ArrayList<>();
         List<IAType> resultFieldTypes = new ArrayList<>();
@@ -103,7 +103,7 @@
             // Iterating through the orderlist input
             for (Mutable<ILogicalExpression> arg : args) {
                 AbstractFunctionCallExpression recConsExpr = (AbstractFunctionCallExpression) arg.getValue();
-                ARecordType rtype = TypeComputerUtils.extractRecordType((IAType) env.getType(recConsExpr));
+                ARecordType rtype = TypeComputeUtils.extractRecordType((IAType) env.getType(recConsExpr));
                 if (rtype != null) {
                     String[] fn = rtype.getFieldNames();
                     IAType[] ft = rtype.getFieldTypes();
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
index a9c7968..1a977db 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
@@ -24,7 +24,7 @@
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.constants.AsterixConstantValue;
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.commons.lang3.mutable.Mutable;
@@ -51,7 +51,7 @@
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
         AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
-        IAType reqType = TypeComputerUtilities.getRequiredType(f);
+        IAType reqType = TypeCastUtils.getRequiredType(f);
         if (reqType != null)
             return reqType;
         int n = f.getArguments().size() / 2;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordMergeTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordMergeTypeComputer.java
index 9611b9c..4a55924 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordMergeTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordMergeTypeComputer.java
@@ -49,9 +49,9 @@
         AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
         IAType t0 = (IAType) env.getType(f.getArguments().get(0).getValue());
         IAType t1 = (IAType) env.getType(f.getArguments().get(1).getValue());
-        boolean nullable = TypeHelper.canBeNull(t0) || TypeHelper.canBeNull(t1);
-        ARecordType recType0 = TypeComputerUtils.extractRecordType(t0);
-        ARecordType recType1 = TypeComputerUtils.extractRecordType(t1);
+        boolean nullable = TypeHelper.canBeUnknown(t0) || TypeHelper.canBeUnknown(t1);
+        ARecordType recType0 = TypeComputeUtils.extractRecordType(t0);
+        ARecordType recType1 = TypeComputeUtils.extractRecordType(t1);
 
         if (recType0 == null || recType1 == null) {
             throw new AlgebricksException(
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordRemoveFieldsTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordRemoveFieldsTypeComputer.java
index ea84c95..2323f95 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordRemoveFieldsTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordRemoveFieldsTypeComputer.java
@@ -154,14 +154,14 @@
         Set<String> fieldNameSet = new HashSet<>();
         Deque<String> fieldPathStack = new ArrayDeque<>();
 
-        ARecordType inputRecordType = NonTaggedFieldAccessByNameResultType.getRecordTypeFromType(type0, expression);
+        ARecordType inputRecordType = FieldAccessByNameResultType.getRecordTypeFromType(type0, expression);
         if (inputRecordType == null) {
             return BuiltinType.ANY;
         }
 
         AbstractLogicalExpression arg1 = (AbstractLogicalExpression) funcExpr.getArguments().get(1).getValue();
         IAType inputListType = (IAType) env.getType(arg1);
-        AOrderedListType inputOrderedListType = TypeComputerUtils.extractOrderedListType(inputListType);
+        AOrderedListType inputOrderedListType = TypeComputeUtils.extractOrderedListType(inputListType);
         if (inputOrderedListType == null) {
             throw new AlgebricksException(
                     "The function 'remove-fields' expects an ordered list as the second argument, but got "
@@ -209,7 +209,6 @@
 
     private IAType buildOutputType(Deque<String> fieldPathStack, ARecordType inputRecordType, Set<String> fieldNameSet,
             List<List<String>> pathList) throws AlgebricksException {
-        IAType resultType;
         List<String> resultFieldNames = new ArrayList<>();
         List<IAType> resultFieldTypes = new ArrayList<>();
 
@@ -247,11 +246,13 @@
      * Note: l2 uses a LIFO insert and removal.
      */
     private <E> boolean isEqualPaths(List<E> l1, Deque<E> l2) {
-        if ((l1 == null) || (l2 == null))
+        if ((l1 == null) || (l2 == null)) {
             return false;
+        }
 
-        if (l1.size() != l2.size())
+        if (l1.size() != l2.size()) {
             return false;
+        }
 
         Iterator<E> it2 = l2.iterator();
 
@@ -259,8 +260,9 @@
         for (int i = len - 1; i >= 0; i--) {
             E o1 = l1.get(i);
             E o2 = it2.next();
-            if (!o1.equals(o2))
+            if (!o1.equals(o2)) {
                 return false;
+            }
         }
         return true;
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ScalarVersionOfAggregateResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ScalarVersionOfAggregateResultType.java
index 69d4beb..3fecfd9 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ScalarVersionOfAggregateResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ScalarVersionOfAggregateResultType.java
@@ -18,19 +18,15 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.AbstractCollectionType;
+import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class ScalarVersionOfAggregateResultType implements IResultTypeComputer {
+public class ScalarVersionOfAggregateResultType extends AbstractResultTypeComputer {
 
     public static final ScalarVersionOfAggregateResultType INSTANCE = new ScalarVersionOfAggregateResultType();
 
@@ -38,24 +34,22 @@
     }
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg1 = fce.getArguments().get(0).getValue();
-        IAType t1 = (IAType) env.getType(arg1);
-        IAType nonOpt = TypeHelper.getNonOptionalType(t1);
-        ATypeTag tag1 = nonOpt.getTypeTag();
-        if (tag1 != ATypeTag.ORDEREDLIST && tag1 != ATypeTag.UNORDEREDLIST) {
-            throw new AlgebricksException("Type of argument in " + expression
-                    + " should be a collection type instead of " + t1);
-        }
-        AbstractCollectionType act = (AbstractCollectionType) nonOpt;
-        IAType t = act.getItemType();
-        if (TypeHelper.canBeNull(t)) {
-            return t;
-        } else {
-            return AUnionType.createNullableType(t);
+    public void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        if (tag != ATypeTag.ANY && tag != ATypeTag.ORDEREDLIST && tag != ATypeTag.UNORDEREDLIST) {
+            throw new AlgebricksException(
+                    "Type of argument in aggregation should be a collection type instead of " + type.getDisplayName());
         }
     }
 
+    @Override
+    protected IAType getResultType(IAType... strippedInputTypes) {
+        AbstractCollectionType act = (AbstractCollectionType) strippedInputTypes[0];
+        ATypeTag tag = act.getTypeTag();
+        if (tag == ATypeTag.ANY) {
+            return BuiltinType.ANY;
+        }
+        IAType t = act.getItemType();
+        return AUnionType.createNullableType(t);
+    }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringBoolOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringBooleanTypeComputer.java
similarity index 66%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringBoolOrNullTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringBooleanTypeComputer.java
index 6d46533..10b6888 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringBoolOrNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringBooleanTypeComputer.java
@@ -18,24 +18,17 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 
-/**
- * @author Xiaoyu Ma
- */
-public class BinaryStringBoolOrNullTypeComputer extends AbstractBinaryStringTypeComputer {
-    public static final BinaryStringBoolOrNullTypeComputer INSTANCE = new BinaryStringBoolOrNullTypeComputer();
+public class StringBooleanTypeComputer extends AbstractStringTypeComputer {
+    public static final StringBooleanTypeComputer INSTANCE = new StringBooleanTypeComputer();
 
-    private BinaryStringBoolOrNullTypeComputer() {
+    private StringBooleanTypeComputer() {
     }
 
     @Override
-    public IAType getResultType(IAType t0, IAType t1, boolean nullable) {
-        if (nullable) {
-            return AUnionType.createNullableType(BuiltinType.ABOOLEAN);
-        }
+    public IAType getResultType(IAType... types) {
         return BuiltinType.ABOOLEAN;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringStringTypeComputer.java
similarity index 66%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringStringTypeComputer.java
index 55df1e3..bce0cef 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryStringStringOrNullTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringStringTypeComputer.java
@@ -18,25 +18,17 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 
-/**
- * @author Xiaoyu Ma
- */
-public class BinaryStringStringOrNullTypeComputer extends AbstractBinaryStringTypeComputer {
+public class StringStringTypeComputer extends AbstractStringTypeComputer {
+    public static final StringStringTypeComputer INSTANCE = new StringStringTypeComputer();
 
-    public static final BinaryStringStringOrNullTypeComputer INSTANCE = new BinaryStringStringOrNullTypeComputer();
-
-    private BinaryStringStringOrNullTypeComputer() {
+    private StringStringTypeComputer() {
     }
 
     @Override
-    public IAType getResultType(IAType t0, IAType t1, boolean nullable) {
-        if (nullable) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
+    public IAType getResultType(IAType... inputTypes) {
         return BuiltinType.ASTRING;
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java
index 4ceec49..40c57a4 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java
@@ -54,10 +54,10 @@
             }
             case UNION: {
                 AUnionType ut = (AUnionType) t;
-                if (!ut.isNullableType()) {
+                if (!ut.isUnknownableType()) {
                     throw new AlgebricksException("Expecting collection type. Found " + t);
                 }
-                IAType t2 = ut.getUnionList().get(1);
+                IAType t2 = ut.getActualType();
                 ATypeTag tag2 = t2.getTypeTag();
                 if (tag2 == ATypeTag.UNORDEREDLIST || tag2 == ATypeTag.ORDEREDLIST) {
                     AbstractCollectionType act = (AbstractCollectionType) t2;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/Substring2TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/Substring2TypeComputer.java
index 6cc2f6d..f1000b9 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/Substring2TypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/Substring2TypeComputer.java
@@ -18,65 +18,36 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class Substring2TypeComputer implements IResultTypeComputer {
+public class Substring2TypeComputer extends AbstractResultTypeComputer {
     public static final Substring2TypeComputer INSTANCE = new Substring2TypeComputer();
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() < 2) {
-            throw new AlgebricksException("Wrong Argument Number.");
+    public void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        if (argIndex == 0 && tag != ATypeTag.STRING) {
+            throw new AlgebricksException("First argument should be string Type.");
         }
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg1 = fce.getArguments().get(1).getValue();
-        IAType t0, t1;
-        try {
-            t0 = (IAType) env.getType(arg0);
-            t1 = (IAType) env.getType(arg1);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
+        if (argIndex == 1) {
+            switch (tag) {
+                case INT8:
+                case INT16:
+                case INT32:
+                case INT64:
+                    break;
+                default:
+                    throw new AlgebricksException("Second argument should be integer Type.");
+            }
         }
+    }
 
-        ATypeTag tag0, tag1;
-        if (NonTaggedFormatUtil.isOptional(t0)) {
-            tag0 = ((AUnionType) t0).getNullableType().getTypeTag();
-        } else {
-            tag0 = t0.getTypeTag();
-        }
-
-        if (NonTaggedFormatUtil.isOptional(t1)) {
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
-        } else {
-            tag1 = t1.getTypeTag();
-        }
-
-        // Allow substring to work with ANY types, i.e., types that are unknown at compile time.
-        if (tag0 == ATypeTag.ANY || tag1 == ATypeTag.ANY) {
-            return BuiltinType.ANY;
-        }
-
-        if (tag0 != ATypeTag.NULL && tag0 != ATypeTag.STRING) {
-            throw new AlgebricksException("First argument should be String Type.");
-        }
-
-        if (tag1 != ATypeTag.NULL && tag1 != ATypeTag.INT8 && tag1 != ATypeTag.INT16 && tag1 != ATypeTag.INT32
-                && tag1 != ATypeTag.INT64) {
-            throw new AlgebricksException("Second argument should be integer Type.");
-        }
-
+    @Override
+    public IAType getResultType(IAType... types) {
         return BuiltinType.ASTRING;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubstringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubstringTypeComputer.java
index b6c5394..537056a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubstringTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubstringTypeComputer.java
@@ -18,72 +18,36 @@
  */
 package org.apache.asterix.om.typecomputer.impl;
 
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class SubstringTypeComputer implements IResultTypeComputer {
+public class SubstringTypeComputer extends AbstractResultTypeComputer {
     public static final SubstringTypeComputer INSTANCE = new SubstringTypeComputer();
 
     @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() < 3)
-            throw new AlgebricksException("Wrong Argument Number.");
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg1 = fce.getArguments().get(1).getValue();
-        ILogicalExpression arg2 = fce.getArguments().get(2).getValue();
-        IAType t0, t1, t2;
-        try {
-            t0 = (IAType) env.getType(arg0);
-            t1 = (IAType) env.getType(arg1);
-            t2 = (IAType) env.getType(arg2);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
+    public void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        if (argIndex == 0 && tag != ATypeTag.STRING) {
+            throw new AlgebricksException("First argument should be string Type.");
         }
-
-        ATypeTag tag0, tag1, tag2;
-        if (NonTaggedFormatUtil.isOptional(t0))
-            tag0 = ((AUnionType) t0).getNullableType().getTypeTag();
-        else
-            tag0 = t0.getTypeTag();
-
-        if (NonTaggedFormatUtil.isOptional(t1))
-            tag1 = ((AUnionType) t1).getNullableType().getTypeTag();
-        else
-            tag1 = t1.getTypeTag();
-
-        if (NonTaggedFormatUtil.isOptional(t2))
-            tag2 = ((AUnionType) t2).getNullableType().getTypeTag();
-        else
-            tag2 = t2.getTypeTag();
-
-        if (tag0 == ATypeTag.ANY || tag1 == ATypeTag.ANY || tag2 == ATypeTag.ANY)
-            return BuiltinType.ANY;
-
-        if (tag0 != ATypeTag.NULL && tag0 != ATypeTag.STRING) {
-            throw new AlgebricksException("First argument should be String Type.");
+        if (argIndex > 0 && argIndex <= 2) {
+            switch (tag) {
+                case INT8:
+                case INT16:
+                case INT32:
+                case INT64:
+                    break;
+                default:
+                    throw new AlgebricksException("Second argument should be integer Type.");
+            }
         }
+    }
 
-        if (tag1 != ATypeTag.NULL && tag1 != ATypeTag.INT8 && tag1 != ATypeTag.INT16 && tag1 != ATypeTag.INT32
-                && tag1 != ATypeTag.INT64) {
-            throw new AlgebricksException("Second argument should be integer Type.");
-        }
-
-        if (tag2 != ATypeTag.NULL && tag2 != ATypeTag.INT8 && tag2 != ATypeTag.INT16 && tag2 != ATypeTag.INT32
-                && tag2 != ATypeTag.INT64) {
-            throw new AlgebricksException("Third argument should be integer Type.");
-        }
-
+    @Override
+    public IAType getResultType(IAType... types) {
         return BuiltinType.ASTRING;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryBooleanOrNullFunctionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
similarity index 63%
rename from asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryBooleanOrNullFunctionTypeComputer.java
rename to asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
index 3c5f1e7..167cb44 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BinaryBooleanOrNullFunctionTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
@@ -23,39 +23,44 @@
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
-public class BinaryBooleanOrNullFunctionTypeComputer implements IResultTypeComputer {
+public class SwitchCaseComputer implements IResultTypeComputer {
 
-    public static final BinaryBooleanOrNullFunctionTypeComputer INSTANCE = new BinaryBooleanOrNullFunctionTypeComputer();
+    private static final String ERR_MSG = "switch case should have at least 3 parameters";
 
-    private BinaryBooleanOrNullFunctionTypeComputer() {
+    public static final IResultTypeComputer INSTANCE = new SwitchCaseComputer();
+
+    private SwitchCaseComputer() {
     }
 
     @Override
     public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
         AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        ILogicalExpression arg1 = fce.getArguments().get(1).getValue();
-        IAType t0, t1;
-        try {
-            t0 = (IAType) env.getType(arg0);
-            t1 = (IAType) env.getType(arg1);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
+        if (fce.getArguments().size() < 3) {
+            throw new AlgebricksException(ERR_MSG);
         }
-        if (t0.getTypeTag() == ATypeTag.NULL && t1.getTypeTag() == ATypeTag.NULL) {
-            return BuiltinType.ANULL;
+
+        IAType currentType = null;
+        boolean any = false;
+        boolean missable = false;
+        for (int i = 2; i < fce.getArguments().size(); i += 2) {
+            IAType type = (IAType) env.getType(fce.getArguments().get(i).getValue());
+            if (type.getTypeTag() == ATypeTag.UNION) {
+                type = ((AUnionType) type).getActualType();
+                missable = true;
+            }
+            if (currentType != null && !type.equals(currentType)) {
+                any = true;
+                break;
+            }
+            currentType = type;
         }
-        if (TypeHelper.canBeNull(t0) || TypeHelper.canBeNull(t1)) {
-            return AUnionType.createNullableType(BuiltinType.ABOOLEAN);
-        }
-        return BuiltinType.ABOOLEAN;
+        return any ? BuiltinType.ANY : missable ? AUnionType.createMissableType(currentType) : currentType;
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TripleStringBoolOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TripleStringBoolOrNullTypeComputer.java
deleted file mode 100644
index 36c5d71..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TripleStringBoolOrNullTypeComputer.java
+++ /dev/null
@@ -1,43 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
-
-/**
- * @author Xiaoyu Ma
- */
-public class TripleStringBoolOrNullTypeComputer extends AbstractTripleStringTypeComputer {
-    public static final TripleStringBoolOrNullTypeComputer INSTANCE = new TripleStringBoolOrNullTypeComputer();
-
-    private TripleStringBoolOrNullTypeComputer() {
-    }
-
-    @Override
-    public IAType getResultType(IAType t0, IAType t1, IAType t2) {
-        if (TypeHelper.canBeNull(t0) || TypeHelper.canBeNull(t1) || TypeHelper.canBeNull(t2)) {
-            return AUnionType.createNullableType(BuiltinType.ABOOLEAN);
-        }
-        return BuiltinType.ABOOLEAN;
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TripleStringStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TripleStringStringOrNullTypeComputer.java
deleted file mode 100644
index b00d474..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TripleStringStringOrNullTypeComputer.java
+++ /dev/null
@@ -1,42 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
-
-/**
- * @author Xiaoyu Ma
- */
-public class TripleStringStringOrNullTypeComputer extends AbstractTripleStringTypeComputer {
-    public static final TripleStringStringOrNullTypeComputer INSTANCE = new TripleStringStringOrNullTypeComputer();
-
-    private TripleStringStringOrNullTypeComputer() {
-    }
-
-    @Override
-    public IAType getResultType(IAType t0, IAType t1, IAType t2) {
-        if (TypeHelper.canBeNull(t0) || TypeHelper.canBeNull(t1) || TypeHelper.canBeNull(t2)) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-        return BuiltinType.ASTRING;
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeCompatibilityChecker.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeCompatibilityChecker.java
deleted file mode 100644
index 565ed02..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeCompatibilityChecker.java
+++ /dev/null
@@ -1,81 +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.om.typecomputer.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-
-class TypeCompatibilityChecker {
-    private final List<IAType> possibleTypes;
-    private boolean nullEncountered;
-
-    public TypeCompatibilityChecker() {
-        possibleTypes = new ArrayList<IAType>();
-        nullEncountered = false;
-    }
-
-    public void reset() {
-        possibleTypes.clear();
-        nullEncountered = false;
-    }
-
-    public void addPossibleType(IAType type) {
-        if (type.getTypeTag() == ATypeTag.UNION) {
-            List<IAType> typeList = ((AUnionType) type).getUnionList();
-            for (IAType t : typeList) {
-                if (t.getTypeTag() != ATypeTag.NULL) {
-                    //CONCAT_NON_NULL cannot return null because it's only used for if-else construct
-                    if (!possibleTypes.contains(t)) {
-                        possibleTypes.add(t);
-                    }
-                } else {
-                    nullEncountered = true;
-                }
-            }
-        } else {
-            if (type.getTypeTag() != ATypeTag.NULL) {
-                if (!possibleTypes.contains(type)) {
-                    possibleTypes.add(type);
-                }
-            } else {
-                nullEncountered = true;
-            }
-        }
-    }
-
-    public IAType getCompatibleType() {
-        switch (possibleTypes.size()) {
-            case 0:
-                return BuiltinType.ANULL;
-            case 1:
-                if (nullEncountered) {
-                    return AUnionType.createNullableType(possibleTypes.get(0));
-                } else {
-                    return possibleTypes.get(0);
-                }
-        }
-        return BuiltinType.ANY;
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
new file mode 100644
index 0000000..f8cc9e6
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
@@ -0,0 +1,222 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.types.AOrderedListType;
+import org.apache.asterix.om.types.ARecordType;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.AUnorderedListType;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
+
+public class TypeComputeUtils {
+
+    private static final byte CERTAIN = 1;
+    private static final byte NULLABLE = 2;
+    private static final byte MISSABLE = 4;
+    private static final byte MISSING = 8;
+    private static final byte NULL = 16;
+
+    @FunctionalInterface
+    public static interface ArgTypeChecker {
+        public void checkArgTypes(int argIndex, IAType argType) throws AlgebricksException;
+    }
+
+    @FunctionalInterface
+    public static interface ResultTypeGenerator {
+        public IAType getResultType(IAType... knownInputTypes);
+    }
+
+    private TypeComputeUtils() {
+    }
+
+    /**
+     * Resolve the result type of an expression.
+     *
+     * @param expr,
+     *            the expression to consider.
+     * @param env,
+     *            the type environment.
+     * @param checker,
+     *            the argument type checker.
+     * @param resultTypeGenerator,
+     *            the result type generator.
+     * @param propagateNullAndMissing,
+     *            whether the expression follows MISSING/NULL-in-MISSING/NULL-out semantics.
+     * @return the resolved result type with considering optional types.
+     * @throws AlgebricksException
+     */
+    public static IAType resolveResultType(ILogicalExpression expr, IVariableTypeEnvironment env,
+            ArgTypeChecker checker, ResultTypeGenerator resultTypeGenerator, boolean propagateNullAndMissing)
+            throws AlgebricksException {
+        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expr;
+
+        IAType[] inputTypes = new IAType[fce.getArguments().size()];
+        int index = 0;
+        for (Mutable<ILogicalExpression> argRef : fce.getArguments()) {
+            ILogicalExpression arg = argRef.getValue();
+            inputTypes[index++] = (IAType) env.getType(arg);
+        }
+
+        // Checks input types and computes result types.
+        IAType[] knownInputTypes = TypeComputeUtils.getActualType(inputTypes);
+        boolean[] unknownable = TypeComputeUtils.isUnknownableType(inputTypes);
+        for (int argIndex = 0; argIndex < knownInputTypes.length; ++argIndex) {
+            ATypeTag argTypeTag = knownInputTypes[argIndex].getTypeTag();
+            if (unknownable[argIndex] || argTypeTag == ATypeTag.ANY || argTypeTag == ATypeTag.NULL
+                    || argTypeTag == ATypeTag.MISSING) {
+                continue;
+            }
+            checker.checkArgTypes(argIndex, knownInputTypes[argIndex]);
+        }
+
+        // Computes the result type.
+        byte category = TypeComputeUtils.resolveCateogry(inputTypes);
+        if (propagateNullAndMissing) {
+            if (category == MISSING) {
+                return BuiltinType.AMISSING;
+            }
+            if (category == NULL) {
+                return BuiltinType.ANULL;
+            }
+            return TypeComputeUtils.getResultType(resultTypeGenerator.getResultType(knownInputTypes), category);
+        } else {
+            return resultTypeGenerator.getResultType(knownInputTypes);
+        }
+    }
+
+    private static byte resolveCateogry(IAType... inputTypes) {
+        byte category = CERTAIN;
+        boolean meetNull = false;
+        for (IAType inputType : inputTypes) {
+            ATypeTag inputTypeTag = inputType.getTypeTag();
+            if (inputTypeTag == ATypeTag.UNION) {
+                AUnionType unionType = (AUnionType) inputType;
+                if (unionType.isNullableType()) {
+                    category |= NULLABLE;
+                }
+                if (unionType.isMissableType()) {
+                    category |= MISSABLE;
+                }
+            } else if (inputTypeTag == ATypeTag.MISSING) {
+                return MISSING;
+            } else if (inputTypeTag == ATypeTag.NULL) {
+                meetNull = true;
+            }
+        }
+        if (meetNull) {
+            return NULL;
+        }
+        return category;
+    }
+
+    private static IAType getResultType(IAType type, byte category) {
+        if (category == CERTAIN) {
+            return type;
+        }
+        IAType resultType = type;
+        if ((category & NULLABLE) != 0 || (category & NULL) != 0) {
+            resultType = AUnionType.createNullableType(resultType);
+        }
+        if ((category & MISSABLE) != 0 || (category & MISSING) != 0) {
+            resultType = AUnionType.createMissableType(resultType);
+        }
+        return resultType;
+    }
+
+    private static IAType[] getActualType(IAType... inputTypes) {
+        IAType[] actualTypes = new IAType[inputTypes.length];
+        int index = 0;
+        for (IAType inputType : inputTypes) {
+            actualTypes[index++] = getActualType(inputType);
+        }
+        return actualTypes;
+    }
+
+    private static boolean[] isUnknownableType(IAType... inputTypes) {
+        boolean[] unknownable = new boolean[inputTypes.length];
+        for (int index = 0; index < unknownable.length; ++index) {
+            IAType type = inputTypes[index];
+            unknownable[index] = false;
+            if (type.getTypeTag() != ATypeTag.UNION) {
+                continue;
+            } else {
+                AUnionType unionType = (AUnionType) type;
+                unknownable[index] = unionType.isUnknownableType();
+            }
+        }
+        return unknownable;
+    }
+
+    public static IAType getActualType(IAType inputType) {
+        return inputType.getTypeTag() == ATypeTag.UNION ? ((AUnionType) inputType).getActualType() : inputType;
+    }
+
+    public static ARecordType extractRecordType(IAType t) {
+        switch (t.getTypeTag()) {
+            case RECORD:
+                return (ARecordType) t;
+            case UNION:
+                IAType innerType = ((AUnionType) t).getActualType();
+                if (innerType.getTypeTag() == ATypeTag.RECORD) {
+                    return (ARecordType) innerType;
+                } else {
+                    return null;
+                }
+            default:
+                return null;
+        }
+    }
+
+    public static AOrderedListType extractOrderedListType(IAType t) {
+        if (t.getTypeTag() == ATypeTag.ORDEREDLIST) {
+            return (AOrderedListType) t;
+        }
+
+        if (t.getTypeTag() == ATypeTag.UNION) {
+            IAType innerType = ((AUnionType) t).getActualType();
+            if (innerType.getTypeTag() == ATypeTag.ORDEREDLIST) {
+                return (AOrderedListType) innerType;
+            }
+        }
+        return null;
+    }
+
+    public static AUnorderedListType extractUnorderedListType(IAType t) {
+        if (t.getTypeTag() == ATypeTag.UNORDEREDLIST) {
+            return (AUnorderedListType) t;
+        }
+        if (t.getTypeTag() == ATypeTag.UNION) {
+            AUnionType unionType = (AUnionType) t;
+            IAType innerType = unionType.getActualType();
+            if (innerType.getTypeTag() == ATypeTag.UNORDEREDLIST) {
+                return (AUnorderedListType) innerType;
+            }
+        }
+
+        return null;
+    }
+
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputerUtils.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputerUtils.java
deleted file mode 100644
index cba988b..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputerUtils.java
+++ /dev/null
@@ -1,75 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.types.AOrderedListType;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.AUnorderedListType;
-import org.apache.asterix.om.types.IAType;
-
-public class TypeComputerUtils {
-
-    public static ARecordType extractRecordType(IAType t) {
-        if (t.getTypeTag() == ATypeTag.RECORD) {
-            return (ARecordType) t;
-        }
-
-        if (t.getTypeTag() == ATypeTag.UNION) {
-            IAType innerType = ((AUnionType) t).getUnionList().get(1);
-            if (innerType.getTypeTag() == ATypeTag.RECORD) {
-                return (ARecordType) innerType;
-            }
-        }
-
-        return null;
-    }
-
-    public static AOrderedListType extractOrderedListType(IAType t) {
-        if (t.getTypeTag() == ATypeTag.ORDEREDLIST) {
-            return (AOrderedListType) t;
-        }
-
-        if (t.getTypeTag() == ATypeTag.UNION) {
-            IAType innerType = ((AUnionType) t).getUnionList().get(1);
-            if (innerType.getTypeTag() == ATypeTag.ORDEREDLIST) {
-                return (AOrderedListType) innerType;
-            }
-        }
-
-        return null;
-    }
-
-    public static AUnorderedListType extractUnorderedListType(IAType t) {
-        if (t.getTypeTag() == ATypeTag.UNORDEREDLIST) {
-            return (AUnorderedListType) t;
-        }
-
-        if (t.getTypeTag() == ATypeTag.UNION) {
-            IAType innerType = ((AUnionType) t).getUnionList().get(1);
-            if (innerType.getTypeTag() == ATypeTag.UNORDEREDLIST) {
-                return (AUnorderedListType) innerType;
-            }
-        }
-
-        return null;
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBinaryInt64OrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBinaryInt64OrNullTypeComputer.java
deleted file mode 100644
index ab94c4f..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBinaryInt64OrNullTypeComputer.java
+++ /dev/null
@@ -1,67 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class UnaryBinaryInt64OrNullTypeComputer implements IResultTypeComputer {
-    public static final UnaryBinaryInt64OrNullTypeComputer INSTANCE = new UnaryBinaryInt64OrNullTypeComputer();
-
-    private UnaryBinaryInt64OrNullTypeComputer() {
-
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().size() != 1) {
-            throw new AlgebricksException("Wrong Argument Number.");
-        }
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        IAType t0;
-        t0 = (IAType) env.getType(arg0);
-        if (t0.getTypeTag() != ATypeTag.NULL
-                && t0.getTypeTag() != ATypeTag.BINARY
-                && (t0.getTypeTag() == ATypeTag.UNION && !((AUnionType) t0).getUnionList()
-                        .contains(BuiltinType.ABINARY))) {
-            throw new NotImplementedException("Expects Binary Type.");
-        }
-
-        if (t0.getTypeTag() == ATypeTag.NULL) {
-            return BuiltinType.ANULL;
-        }
-
-        if (t0.getTypeTag() == ATypeTag.BINARY || t0.getTypeTag().equals(ATypeTag.UNION)) {
-            return AUnionType.createNullableType(BuiltinType.AINT64, "binary-length-Result");
-        }
-        throw new AlgebricksException("Cannot compute type");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBinaryInt64TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBinaryInt64TypeComputer.java
new file mode 100644
index 0000000..0105fe3
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBinaryInt64TypeComputer.java
@@ -0,0 +1,50 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+
+public class UnaryBinaryInt64TypeComputer extends AbstractResultTypeComputer {
+    public static final UnaryBinaryInt64TypeComputer INSTANCE = new UnaryBinaryInt64TypeComputer();
+
+    private UnaryBinaryInt64TypeComputer() {
+    }
+
+    @Override
+    public void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        if (argIndex == 0) {
+            if (tag != ATypeTag.BINARY) {
+                throw new AlgebricksException("The argument should be binary Type.");
+            }
+        } else {
+            throw new AlgebricksException("Wrong Argument Number.");
+        }
+    }
+
+    @Override
+    public IAType getResultType(IAType... types) {
+        return BuiltinType.AINT64;
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBooleanOrNullFunctionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBooleanOrNullFunctionTypeComputer.java
deleted file mode 100644
index 6c0b53c..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryBooleanOrNullFunctionTypeComputer.java
+++ /dev/null
@@ -1,60 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class UnaryBooleanOrNullFunctionTypeComputer implements IResultTypeComputer {
-
-    public static final UnaryBooleanOrNullFunctionTypeComputer INSTANCE = new UnaryBooleanOrNullFunctionTypeComputer();
-
-    private UnaryBooleanOrNullFunctionTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        IAType t0;
-        try {
-            t0 = (IAType) env.getType(arg0);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        if (t0.getTypeTag() == ATypeTag.NULL) {
-            return BuiltinType.ANULL;
-        }
-        if (TypeHelper.canBeNull(t0)) {
-            return AUnionType.createNullableType(BuiltinType.ABOOLEAN, "OptionalBoolean");
-        }
-        return BuiltinType.ABOOLEAN;
-    }
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryMinusTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryMinusTypeComputer.java
new file mode 100644
index 0000000..31e559e
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryMinusTypeComputer.java
@@ -0,0 +1,66 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+
+public class UnaryMinusTypeComputer extends AbstractResultTypeComputer {
+
+    public static final UnaryMinusTypeComputer INSTANCE = new UnaryMinusTypeComputer();
+
+    private UnaryMinusTypeComputer() {
+    }
+
+    @Override
+    public void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        switch (tag) {
+            case INT8:
+            case INT16:
+            case INT32:
+            case INT64:
+            case FLOAT:
+            case DOUBLE:
+                break;
+            default:
+                throw new NotImplementedException(
+                        "Negative operations are not implemented for " + type.getDisplayName());
+        }
+    }
+
+    @Override
+    public IAType getResultType(IAType... knownTypes) {
+        ATypeTag tag = knownTypes[0].getTypeTag();
+        switch (tag) {
+            case INT8:
+            case INT16:
+            case INT32:
+            case INT64:
+            case FLOAT:
+            case DOUBLE:
+                return knownTypes[0];
+            default:
+                return null;
+        }
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringInt64OrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringInt64OrNullTypeComputer.java
deleted file mode 100644
index f41a719..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringInt64OrNullTypeComputer.java
+++ /dev/null
@@ -1,81 +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.om.typecomputer.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-/**
- * @author Xiaoyu Ma
- */
-public class UnaryStringInt64OrNullTypeComputer implements IResultTypeComputer {
-
-    public static final UnaryStringInt64OrNullTypeComputer INSTANCE = new UnaryStringInt64OrNullTypeComputer();
-
-    private UnaryStringInt64OrNullTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().isEmpty()) {
-            throw new AlgebricksException("Wrong Argument Number.");
-        }
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        IAType t0;
-        try {
-            t0 = (IAType) env.getType(arg0);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        if (t0.getTypeTag() == ATypeTag.ANY) {
-            return BuiltinType.ANY;
-        }
-
-        if (t0.getTypeTag() != ATypeTag.NULL && t0.getTypeTag() != ATypeTag.STRING && (t0.getTypeTag() == ATypeTag.UNION
-                && !((AUnionType) t0).getUnionList().contains(BuiltinType.ASTRING))) {
-            throw new NotImplementedException("Expects String Type.");
-        }
-
-        List<IAType> unionList = new ArrayList<IAType>();
-        unionList.add(BuiltinType.ANULL);
-        if (t0.getTypeTag() == ATypeTag.NULL) {
-            return BuiltinType.ANULL;
-        }
-
-        if (t0.getTypeTag() == ATypeTag.STRING || t0.getTypeTag().equals(ATypeTag.UNION)) {
-            return AUnionType.createNullableType(BuiltinType.AINT64, "String-length-Result");
-        }
-
-        throw new AlgebricksException("Cannot compute type");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringInt64TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringInt64TypeComputer.java
new file mode 100644
index 0000000..7208243
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringInt64TypeComputer.java
@@ -0,0 +1,50 @@
+/*
+ * 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.om.typecomputer.impl;
+
+import org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+
+public class UnaryStringInt64TypeComputer extends AbstractResultTypeComputer {
+
+    public static final UnaryStringInt64TypeComputer INSTANCE = new UnaryStringInt64TypeComputer();
+
+    private UnaryStringInt64TypeComputer() {
+    }
+
+    @Override
+    public void checkArgType(int argIndex, IAType type) throws AlgebricksException {
+        ATypeTag tag = type.getTypeTag();
+        if (argIndex == 0) {
+            if (tag != ATypeTag.STRING) {
+                throw new AlgebricksException("Second argument should be string Type.");
+            }
+        } else {
+            throw new AlgebricksException("Wrong Argument Number.");
+        }
+    }
+
+    @Override
+    public IAType getResultType(IAType... types) {
+        return BuiltinType.AINT64;
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringOrNullTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringOrNullTypeComputer.java
deleted file mode 100644
index 4c11c8e..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryStringOrNullTypeComputer.java
+++ /dev/null
@@ -1,69 +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.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeHelper;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-/**
- * @author Xiaoyu Ma
- */
-public class UnaryStringOrNullTypeComputer implements IResultTypeComputer {
-
-    public static final UnaryStringOrNullTypeComputer INSTANCE = new UnaryStringOrNullTypeComputer();
-
-    private UnaryStringOrNullTypeComputer() {
-    }
-
-    @Override
-    public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
-            IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        AbstractFunctionCallExpression fce = (AbstractFunctionCallExpression) expression;
-        if (fce.getArguments().isEmpty())
-            throw new AlgebricksException("Wrong Argument Number.");
-        ILogicalExpression arg0 = fce.getArguments().get(0).getValue();
-        IAType t0;
-        try {
-            t0 = (IAType) env.getType(arg0);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-
-        if (TypeHelper.canBeNull(t0)) {
-            return AUnionType.createNullableType(BuiltinType.ASTRING);
-        }
-
-        if (t0.getTypeTag() == ATypeTag.NULL)
-            return BuiltinType.ANULL;
-
-        if (t0.getTypeTag() == ATypeTag.STRING)
-            return BuiltinType.ASTRING;
-
-        throw new AlgebricksException("Expects String Type.");
-    }
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnorderedListConstructorResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnorderedListConstructorResultType.java
index 67b3c69..1e1d753 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnorderedListConstructorResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnorderedListConstructorResultType.java
@@ -19,15 +19,13 @@
 
 package org.apache.asterix.om.typecomputer.impl;
 
-import java.util.ArrayList;
-
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
+import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
 import org.apache.asterix.om.types.AUnorderedListType;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
@@ -46,24 +44,28 @@
         /**
          * if type has been top-down propagated, use the enforced type
          */
-        AUnorderedListType reqType = (AUnorderedListType) TypeComputerUtilities.getRequiredType(f);
-        if (reqType != null)
+        AUnorderedListType reqType = (AUnorderedListType) TypeCastUtils.getRequiredType(f);
+        if (reqType != null) {
             return reqType;
+        }
 
-        ArrayList<IAType> types = new ArrayList<IAType>();
+        IAType currentType = null;
+        boolean any = false;
         for (int k = 0; k < f.getArguments().size(); k++) {
             IAType type = (IAType) env.getType(f.getArguments().get(k).getValue());
-            if (NonTaggedFormatUtil.isOptional(type))
-                type = ((AUnionType) type).getNullableType();
-            if (types.indexOf(type) < 0) {
-                types.add(type);
+            if (type.getTypeTag() == ATypeTag.UNION) {
+                type = ((AUnionType) type).getActualType();
             }
+            if (currentType != null && !currentType.equals(type)) {
+                any = true;
+                break;
+            }
+            currentType = type;
         }
-        if (types.size() == 1) {
-            return new AUnorderedListType(types.get(0), null);
-        } else {
+        if (any || currentType == null) {
             return new AUnorderedListType(BuiltinType.ANY, null);
+        } else {
+            return new AUnorderedListType(currentType, null);
         }
-
     }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
index 6147276..163421d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
@@ -168,7 +168,7 @@
             }
             if (subRecordType.getTypeTag().equals(ATypeTag.UNION)) {
                 //enforced SubType
-                subRecordType = ((AUnionType) subRecordType).getNullableType();
+                subRecordType = ((AUnionType) subRecordType).getActualType();
                 if (subRecordType.getTypeTag() != ATypeTag.RECORD) {
                     throw new AsterixException(
                             "Field accessor is not defined for values of type " + subRecordType.getTypeTag());
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ATypeTag.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ATypeTag.java
index 3dc2caa..4d6a96c 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ATypeTag.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ATypeTag.java
@@ -40,7 +40,7 @@
     FLOAT(11),
     DOUBLE(12),
     STRING(13),
-    NULL(14),
+    MISSING(14),
     BOOLEAN(15),
     DATETIME(16),
     DATE(17),
@@ -65,12 +65,14 @@
     YEARMONTHDURATION(36),
     DAYTIMEDURATION(37),
     UUID(38),
-    SHORTWITHOUTTYPEINFO(40);
+    SHORTWITHOUTTYPEINFO(40),
+    NULL(41);
 
     /*
      * Serialized Tags begin
      */
     public static final byte SERIALIZED_STRING_TYPE_TAG = STRING.serialize();
+    public static final byte SERIALIZED_MISSING_TYPE_TAG = MISSING.serialize();
     public static final byte SERIALIZED_NULL_TYPE_TAG = NULL.serialize();
     public static final byte SERIALIZED_DOUBLE_TYPE_TAG = DOUBLE.serialize();
     public static final byte SERIALIZED_RECORD_TYPE_TAG = RECORD.serialize();
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
index 65f0098..3c29e7f 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
@@ -32,7 +32,7 @@
 public class AUnionType extends AbstractComplexType {
 
     private static final long serialVersionUID = 1L;
-    public static final int OPTIONAL_TYPE_INDEX_IN_UNION_LIST = 1;
+    private static final int OPTIONAL_TYPE_INDEX_IN_UNION_LIST = 0;
     private final List<IAType> unionList;
 
     public AUnionType(List<IAType> unionList, String typeName) {
@@ -44,18 +44,98 @@
         return unionList;
     }
 
-    public void setTypeAtIndex(IAType type, int index) {
-        unionList.set(index, type);
+    public boolean isMissableType() {
+        return containsType(BuiltinType.AMISSING);
     }
 
     public boolean isNullableType() {
-        return unionList.size() == 2 && unionList.get(0).equals(BuiltinType.ANULL);
+        return containsType(BuiltinType.ANULL);
     }
 
-    public IAType getNullableType() {
+    public boolean isUnknownableType() {
+        return isMissableType() || isNullableType();
+    }
+
+    private boolean containsType(IAType t) {
+        for (int index = 0; index < unionList.size(); ++index) {
+            if (unionList.get(index) != null && unionList.get(index).equals(t)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public IAType getActualType() {
         return unionList.get(AUnionType.OPTIONAL_TYPE_INDEX_IN_UNION_LIST);
     }
 
+    public void setActualType(IAType type) {
+        if (AUnionType.OPTIONAL_TYPE_INDEX_IN_UNION_LIST < unionList.size()) {
+            unionList.set(AUnionType.OPTIONAL_TYPE_INDEX_IN_UNION_LIST, type);
+        } else {
+            unionList.add(type);
+        }
+    }
+
+    public static IAType createMissableType(IAType type, String typeName) {
+        if (type != null && type.getTypeTag() == ATypeTag.MISSING) {
+            return type;
+        }
+        List<IAType> unionList = new ArrayList<>();
+        if (type != null && type.getTypeTag() == ATypeTag.UNION) {
+            AUnionType unionType = (AUnionType) type;
+            unionList.addAll(unionType.getUnionList());
+        } else {
+            unionList.add(type);
+        }
+        unionList.add(BuiltinType.AMISSING);
+        return new AUnionType(unionList, typeName);
+    }
+
+    public static IAType createMissableType(IAType t) {
+        if (t != null && t.getTypeTag() == ATypeTag.MISSING) {
+            return t;
+        }
+        String s = t != null ? t.getTypeName() : null;
+        return createMissableType(t, s == null ? null : s + "?");
+    }
+
+    public static IAType createNullableType(IAType type, String typeName) {
+        if (type != null && type.getTypeTag() == ATypeTag.NULL) {
+            return type;
+        }
+        List<IAType> unionList = new ArrayList<>();
+        if (type != null && type.getTypeTag() == ATypeTag.UNION) {
+            AUnionType unionType = (AUnionType) type;
+            unionList.addAll(unionType.getUnionList());
+        } else {
+            unionList.add(type);
+        }
+        unionList.add(BuiltinType.ANULL);
+        return new AUnionType(unionList, typeName);
+    }
+
+    public static IAType createNullableType(IAType t) {
+        if (t != null && t.getTypeTag() == ATypeTag.NULL) {
+            return t;
+        }
+        String s = t != null ? t.getTypeName() : null;
+        return createNullableType(t, s == null ? null : s + "?");
+    }
+
+    public static IAType createUnknownableType(IAType type, String typeName) {
+        List<IAType> unionList = new ArrayList<>();
+        unionList.add(type);
+        unionList.add(BuiltinType.ANULL);
+        unionList.add(BuiltinType.AMISSING);
+        return new AUnionType(unionList, typeName);
+    }
+
+    public static IAType createUnknownableType(IAType t) {
+        String s = t != null ? t.getTypeName() : null;
+        return createUnknownableType(t, s == null ? null : s + "?");
+    }
+
     @Override
     public String getDisplayName() {
         return "AUnion";
@@ -92,22 +172,10 @@
         return BuiltinType.ASTERIX_TYPE;
     }
 
-    public static AUnionType createNullableType(IAType type, String typeName) {
-        List<IAType> unionList = new ArrayList<IAType>();
-        unionList.add(BuiltinType.ANULL);
-        unionList.add(type);
-        return new AUnionType(unionList, typeName);
-    }
-
-    public static AUnionType createNullableType(IAType t) {
-        String s = t != null ? t.getTypeName() : null;
-        return createNullableType(t, s == null ? null : s + "?");
-    }
-
     @Override
     public void generateNestedDerivedTypeNames() {
-        if (isNullableType()) {
-            IAType nullableType = getNullableType();
+        if (isUnknownableType()) {
+            IAType nullableType = getActualType();
             if (nullableType.getTypeTag().isDerivedType() && nullableType.getTypeName() == null) {
                 AbstractComplexType derivedType = (AbstractComplexType) nullableType;
                 derivedType.setTypeName(getTypeName());
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
index 620b9ae..f556de5 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
@@ -286,6 +286,33 @@
         }
     };
 
+    public final static BuiltinType AMISSING = new LowerCaseConstructorType() {
+
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        public String getDisplayName() {
+            return "Missing";
+        }
+
+        @Override
+        public ATypeTag getTypeTag() {
+            return ATypeTag.MISSING;
+        }
+
+        @Override
+        public String getTypeName() {
+            return "missing";
+        }
+
+        @Override
+        public JSONObject toJSON() throws JSONException {
+            JSONObject type = new JSONObject();
+            type.put("type", "AMISSING");
+            return type;
+        }
+    };
+
     public final static BuiltinType ANULL = new LowerCaseConstructorType() {
 
         private static final long serialVersionUID = 1L;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHelper.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHelper.java
index 5c556d6..4839c41 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHelper.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHelper.java
@@ -18,69 +18,44 @@
  */
 package org.apache.asterix.om.types;
 
-import java.util.ArrayList;
-import java.util.List;
-
 public class TypeHelper {
 
-    public static boolean canBeNull(IAType t) {
+    public static boolean canBeMissing(IAType t) {
         switch (t.getTypeTag()) {
-            case NULL: {
+            case MISSING:
                 return true;
-            }
-            case UNION: {
-                AUnionType ut = (AUnionType) t;
-                for (IAType t2 : ut.getUnionList()) {
-                    if (canBeNull(t2)) {
-                        return true;
-                    }
-                }
-                return false;
-            }
+            case UNION:
+                return ((AUnionType) t).isMissableType();
             default: {
                 return false;
             }
         }
     }
 
-    public static IAType getNonOptionalType(IAType t) {
-        if (t.getTypeTag() != ATypeTag.UNION) {
-            return t;
+    public static boolean canBeUnknown(IAType t) {
+        switch (t.getTypeTag()) {
+            case MISSING:
+            case NULL:
+                return true;
+            case UNION:
+                return ((AUnionType) t).isUnknownableType();
+            default:
+                return false;
         }
-        AUnionType ut = (AUnionType) t;
-        List<IAType> x = new ArrayList<IAType>();
-        for (IAType t1 : ut.getUnionList()) {
-            IAType y = getNonOptionalType(t1);
-            if (y != BuiltinType.ANULL) {
-                x.add(y);
-            }
-        }
-        if (x.isEmpty()) {
-            return BuiltinType.ANULL;
-        }
-        if (x.size() == 1) {
-            return x.get(0);
-        }
-        return new AUnionType(x, null);
     }
 
     public static boolean isClosed(IAType t) {
         switch (t.getTypeTag()) {
-            case ANY: {
+            case MISSING:
+            case ANY:
                 return false;
-            }
-            case UNION: {
-                AUnionType ut = (AUnionType) t;
-                for (IAType t1 : ut.getUnionList()) {
-                    if (!isClosed(t1)) {
-                        return false;
-                    }
+            case UNION:
+                if (!isClosed(((AUnionType) t).getActualType())) {
+                    return false;
                 }
                 return true;
-            }
-            default: {
+            default:
                 return true;
-            }
         }
     }
 
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeTagUtil.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeTagUtil.java
index a73ff73..2a50506 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeTagUtil.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeTagUtil.java
@@ -42,6 +42,8 @@
                 return BuiltinType.ADOUBLE;
             case STRING:
                 return BuiltinType.ASTRING;
+            case MISSING:
+                return BuiltinType.AMISSING;
             case NULL:
                 return BuiltinType.ANULL;
             case BOOLEAN:
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/NonTaggedFormatUtil.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/NonTaggedFormatUtil.java
index c24ce45..1009fbb 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/NonTaggedFormatUtil.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/NonTaggedFormatUtil.java
@@ -18,8 +18,6 @@
  */
 package org.apache.asterix.om.util;
 
-import java.util.List;
-
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
@@ -50,10 +48,11 @@
     public static final boolean isFixedSizedCollection(IAType type) {
         switch (type.getTypeTag()) {
             case UNION:
-                if (!((AUnionType) type).isNullableType())
+                if (!((AUnionType) type).isUnknownableType()) {
                     return false;
-                else
-                    return isFixedSizedCollection(((AUnionType) type).getNullableType());
+                } else {
+                    return isFixedSizedCollection(((AUnionType) type).getActualType());
+                }
             default:
                 return isFixedSizedCollection(type.getTypeTag());
         }
@@ -76,19 +75,20 @@
     }
 
     public static final boolean hasNullableField(ARecordType recType) {
-        IAType type;
-        List<IAType> unionList;
         for (int i = 0; i < recType.getFieldTypes().length; i++) {
-            type = recType.getFieldTypes()[i];
+            IAType type = recType.getFieldTypes()[i];
             if (type != null) {
-                if (type.getTypeTag() == ATypeTag.NULL)
+                ATypeTag tag = type.getTypeTag();
+                if (tag == ATypeTag.NULL) {
                     return true;
-                if (type.getTypeTag() == ATypeTag.UNION) { // union
-                    unionList = ((AUnionType) type).getUnionList();
-                    for (int j = 0; j < unionList.size(); j++)
-                        if (unionList.get(j).getTypeTag() == ATypeTag.NULL)
-                            return true;
-
+                }
+                if (tag != ATypeTag.UNION) {
+                    continue;
+                }
+                // union
+                AUnionType unionType = (AUnionType) type;
+                if (unionType.isUnknownableType()) {
+                    return true;
                 }
             }
         }
@@ -102,7 +102,7 @@
      * @return true if it is optional; false otherwise
      */
     public static boolean isOptional(IAType type) {
-        return type.getTypeTag() == ATypeTag.UNION && ((AUnionType) type).isNullableType();
+        return type.getTypeTag() == ATypeTag.UNION && ((AUnionType) type).isUnknownableType();
     }
 
     public static int getFieldValueLength(byte[] serNonTaggedAObject, int offset, ATypeTag typeTag, boolean tagged)
@@ -114,6 +114,7 @@
                     throw new AsterixException("Field value has type tag ANY, but it should have a concrete type.");
                 }
                 return getFieldValueLength(serNonTaggedAObject, offset, tag, true) + 1;
+            case MISSING:
             case NULL:
                 return 0;
             case BOOLEAN:
@@ -139,10 +140,11 @@
             case UUID:
                 return 16;
             case INTERVAL:
-                if (tagged)
+                if (tagged) {
                     return AIntervalSerializerDeserializer.getIntervalLength(serNonTaggedAObject, offset + 1);
-                else
+                } else {
                     return AIntervalSerializerDeserializer.getIntervalLength(serNonTaggedAObject, offset);
+                }
             case POINT3D:
             case CIRCLE:
                 return 24;
@@ -150,10 +152,11 @@
             case RECTANGLE:
                 return 32;
             case POLYGON:
-                if (tagged)
+                if (tagged) {
                     return AInt16SerializerDeserializer.getShort(serNonTaggedAObject, offset + 1) * 16 + 2;
-                else
+                } else {
                     return AInt16SerializerDeserializer.getShort(serNonTaggedAObject, offset) * 16 + 2;
+                }
             case STRING:
                 if (tagged) {
                     int len = UTF8StringUtil.getUTFLength(serNonTaggedAObject, offset + 1);
@@ -171,21 +174,24 @@
                     return len + ByteArrayPointable.getNumberBytesToStoreMeta(len);
                 }
             case RECORD:
-                if (tagged)
+                if (tagged) {
                     return ARecordSerializerDeserializer.getRecordLength(serNonTaggedAObject, offset + 1) - 1;
-                else
+                } else {
                     return ARecordSerializerDeserializer.getRecordLength(serNonTaggedAObject, offset) - 1;
+                }
             case ORDEREDLIST:
-                if (tagged)
+                if (tagged) {
                     return AOrderedListSerializerDeserializer.getOrderedListLength(serNonTaggedAObject, offset + 1) - 1;
-                else
+                } else {
                     return AOrderedListSerializerDeserializer.getOrderedListLength(serNonTaggedAObject, offset) - 1;
+                }
             case UNORDEREDLIST:
-                if (tagged)
+                if (tagged) {
                     return AUnorderedListSerializerDeserializer.getUnorderedListLength(serNonTaggedAObject, offset + 1)
                             - 1;
-                else
+                } else {
                     return AUnorderedListSerializerDeserializer.getUnorderedListLength(serNonTaggedAObject, offset) - 1;
+                }
             default:
                 throw new NotImplementedException(
                         "No getLength implemented for a value of this type " + typeTag + " .");
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/IOMVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/IOMVisitor.java
index 2bc80af..6ef6a9d 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/IOMVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/IOMVisitor.java
@@ -35,6 +35,7 @@
 import org.apache.asterix.om.base.AInt8;
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.ALine;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AOrderedList;
 import org.apache.asterix.om.base.APoint;
@@ -91,6 +92,8 @@
 
     public void visitARecord(ARecord obj) throws AsterixException;
 
+    public void visitAMissing(AMissing obj) throws AsterixException;
+
     public void visitANull(ANull obj) throws AsterixException;
 
     public void visitAPoint(APoint obj) throws AsterixException;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/OMPrintToStringVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/OMPrintToStringVisitor.java
index da0e270..0752a84 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/OMPrintToStringVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/OMPrintToStringVisitor.java
@@ -36,6 +36,7 @@
 import org.apache.asterix.om.base.AInt8;
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.ALine;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AOrderedList;
 import org.apache.asterix.om.base.APoint;
@@ -150,6 +151,11 @@
     }
 
     @Override
+    public void visitAMissing(AMissing obj) throws AsterixException {
+        buffer.append("missing");
+    }
+
+    @Override
     public void visitANull(ANull obj) throws AsterixException {
         buffer.append("null");
     }
@@ -252,8 +258,8 @@
             }
             default: {
                 // TODO Auto-generated method stub
-                throw new NotImplementedException("Pretty-printing is not implemented for type " + obj.getTypeTag()
-                        + " .");
+                throw new NotImplementedException(
+                        "Pretty-printing is not implemented for type " + obj.getTypeTag() + " .");
             }
         }
 
diff --git a/asterixdb/asterix-runtime/pom.xml b/asterixdb/asterix-runtime/pom.xml
index eabe06e..3bfe55a 100644
--- a/asterixdb/asterix-runtime/pom.xml
+++ b/asterixdb/asterix-runtime/pom.xml
@@ -79,5 +79,10 @@
       <artifactId>asm-all</artifactId>
       <version>5.1</version>
     </dependency>
+    <dependency>
+      <groupId>com.e-movimento.tinytools</groupId>
+      <artifactId>privilegedaccessor</artifactId>
+      <version>1.2.2</version>
+    </dependency>
   </dependencies>
 </project>
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java
index c3b9b47..41a2d3f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java
@@ -46,9 +46,9 @@
 import org.apache.asterix.runtime.evaluators.common.ClosedRecordConstructorEvalFactory.ClosedRecordConstructorEval;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -128,7 +128,7 @@
         long count = BufferSerDeUtil.getLong(state, start + COUNT_OFFSET);
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
         ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
-        if (typeTag == ATypeTag.NULL) {
+        if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
             processNull(state, start);
             return;
         } else if (aggType == ATypeTag.SYSTEM_NULL) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableCountAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableCountAggregateFunction.java
index 6270e78..d11997c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableCountAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableCountAggregateFunction.java
@@ -29,9 +29,9 @@
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -77,7 +77,7 @@
         eval.evaluate(tuple, inputVal);
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
                 .deserialize(inputVal.getByteArray()[inputVal.getStartOffset()]);
-        if (typeTag == ATypeTag.NULL) {
+        if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
             processNull(state, start);
         } else {
             cnt++;
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java
index 03eb2d3..d742d83 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java
@@ -41,9 +41,9 @@
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.base.ISerializedAggregateEvaluator;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -92,7 +92,7 @@
         int offset = inputVal.getStartOffset();
 
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
-        if (typeTag == ATypeTag.NULL) {
+        if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
             processNull(state, start);
             return;
         } else if (aggType == ATypeTag.SYSTEM_NULL) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateFunction.java
index d8c7fe2..346fa76 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateFunction.java
@@ -57,7 +57,7 @@
     @Override
     protected boolean skipStep(byte[] state, int start) {
         ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateFunction.java
index 83a856c..3895911 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateFunction.java
@@ -58,7 +58,7 @@
     @Override
     protected boolean skipStep(byte[] state, int start) {
         ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java
index 3ea3d76..af2f663 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableIntermediateAvgAggregateFunction.java
@@ -58,7 +58,7 @@
     @Override
     protected boolean skipStep(byte[] state, int start) {
         ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java
index c15a937..aa9b385 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateFunction.java
@@ -58,7 +58,7 @@
     @Override
     protected boolean skipStep(byte[] state, int start) {
         ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java
index e5190ae..db3de24 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateFunction.java
@@ -47,7 +47,7 @@
     @Override
     protected boolean skipStep(byte[] state, int start) {
         ATypeTag aggType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(state[start + AGG_TYPE_OFFSET]);
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
     @Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java
index a57aacd..e403107 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java
@@ -127,7 +127,7 @@
         int offset = inputVal.getStartOffset();
 
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(data[offset]);
-        if (typeTag == ATypeTag.NULL) {
+        if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
             processNull();
             return;
         } else if (aggType == ATypeTag.SYSTEM_NULL) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java
index f93617d..ca44fa3 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractCountAggregateFunction.java
@@ -67,7 +67,7 @@
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
                 .deserialize(inputVal.getByteArray()[inputVal.getStartOffset()]);
         // Ignore SYSTEM_NULL.
-        if (typeTag == ATypeTag.NULL) {
+        if (typeTag == ATypeTag.NULL || typeTag == ATypeTag.MISSING) {
             processNull();
         } else if (typeTag != ATypeTag.SYSTEM_NULL) {
             cnt++;
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java
index c5a0104..5372cfb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractMinMaxAggregateFunction.java
@@ -64,15 +64,15 @@
 
     @Override
     public void step(IFrameTupleReference tuple) throws AlgebricksException {
+        if (skipStep()) {
+            return;
+        }
         eval.evaluate(tuple, inputVal);
-
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
                 .deserialize(inputVal.getByteArray()[inputVal.getStartOffset()]);
-        if (typeTag == ATypeTag.NULL) {
+        if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
             processNull();
             return;
-        } else if (aggType == ATypeTag.NULL) {
-            return;
         } else if (aggType == ATypeTag.SYSTEM_NULL) {
             if (typeTag == ATypeTag.SYSTEM_NULL) {
                 // Ignore.
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java
index 2948887..6938255 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java
@@ -86,7 +86,7 @@
         int offset = inputVal.getStartOffset();
 
         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(data[offset]);
-        if (typeTag == ATypeTag.NULL) {
+        if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
             processNull();
             return;
         } else if (aggType == ATypeTag.SYSTEM_NULL) {
@@ -131,9 +131,6 @@
                 sum += val;
                 break;
             }
-            case NULL: {
-                break;
-            }
             case SYSTEM_NULL: {
                 processSystemNull();
                 break;
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java
index fd52df3..b5fd5ed 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AvgAggregateFunction.java
@@ -55,7 +55,7 @@
 
     @Override
     protected boolean skipStep() {
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java
index db01fde..3555863 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/GlobalAvgAggregateFunction.java
@@ -55,7 +55,7 @@
 
     @Override
     protected boolean skipStep() {
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateFunction.java
index 1543f95..667ceda 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/IntermediateAvgAggregateFunction.java
@@ -55,7 +55,7 @@
 
     @Override
     protected boolean skipStep() {
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalAvgAggregateFunction.java
index 0b19900..018a2ca 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalAvgAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalAvgAggregateFunction.java
@@ -55,7 +55,7 @@
 
     @Override
     protected boolean skipStep() {
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/MinMaxAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/MinMaxAggregateFunction.java
index 65ecc32..894f332 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/MinMaxAggregateFunction.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/MinMaxAggregateFunction.java
@@ -41,7 +41,7 @@
 
     @Override
     protected boolean skipStep() {
-        return (aggType == ATypeTag.NULL);
+        return aggType == ATypeTag.NULL;
     }
 
     @Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
index d59380d..7e9b74c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
@@ -26,7 +26,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutablePoint;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.APoint;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -71,10 +70,6 @@
                     private final DataOutput out = resultStorage.getDataOutput();
                     private final IPointable argPtr = new VoidPointable();
                     private final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
-
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final AMutablePoint aPoint = new AMutablePoint(0, 0);
                     @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<APoint> pointSerde = AqlSerializerDeserializerProvider.INSTANCE
@@ -97,8 +92,6 @@
                                         + ACircleSerializerDeserializer.getCenterPointCoordinateOffset(Coordinate.Y));
                                 aPoint.setValue(cX, cY);
                                 pointSerde.serialize(aPoint, out);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException("get-center does not support the type: "
                                         + bytes[startOffset] + " It is only implemented for CIRCLE.");
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java
index 9771eaf..9ed2802 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java
@@ -26,7 +26,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADouble;
 import org.apache.asterix.om.base.AMutableDouble;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -69,10 +68,6 @@
                     private final DataOutput out = resultStorage.getDataOutput();
                     private final IPointable argPtr = new VoidPointable();
                     private final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
-
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final AMutableDouble aDouble = new AMutableDouble(0);
                     @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<ADouble> doubleSerde = AqlSerializerDeserializerProvider.INSTANCE
@@ -92,8 +87,6 @@
                                         startOffset + ACircleSerializerDeserializer.getRadiusOffset());
                                 aDouble.setValue(radius);
                                 doubleSerde.serialize(aDouble, out);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException("get-radius does not support the type: "
                                         + bytes[startOffset] + " It is only implemented for CIRCLE.");
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java
index 2439082..e5f74c4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java
@@ -30,7 +30,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ARectangleSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutablePoint;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.APoint;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -80,10 +79,6 @@
                     private final OrderedListBuilder listBuilder = new OrderedListBuilder();
                     private final ArrayBackedValueStorage inputVal = new ArrayBackedValueStorage();
                     private final AOrderedListType pointListType = new AOrderedListType(BuiltinType.APOINT, null);
-
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final AMutablePoint aPoint = new AMutablePoint(0, 0);
                     @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<APoint> pointSerde = AqlSerializerDeserializerProvider.INSTANCE
@@ -157,8 +152,6 @@
                                     listBuilder.addItem(inputVal);
                                 }
                                 listBuilder.write(out, true);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(
                                         "get-points does not support the type: " + bytes[startOffset]
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java
index cf00b12..878747b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADouble;
 import org.apache.asterix.om.base.AMutableDouble;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -70,10 +69,6 @@
                     private final DataOutput out = resultStorage.getDataOutput();
                     private final IPointable argPtr = new VoidPointable();
                     private final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
-
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final AMutableDouble aDouble = new AMutableDouble(0);
                     @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<ADouble> doubleSerde = AqlSerializerDeserializerProvider.INSTANCE
@@ -93,8 +88,6 @@
                                         startOffset + APointSerializerDeserializer.getCoordinateOffset(Coordinate.X));
                                 aDouble.setValue(x);
                                 doubleSerde.serialize(aDouble, out);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException("get-x does not support the type: " + bytes[startOffset]
                                         + " It is only implemented for POINT.");
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java
index c36a869..99e396c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADouble;
 import org.apache.asterix.om.base.AMutableDouble;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -73,10 +72,6 @@
                     private final DataOutput out = resultStorage.getDataOutput();
                     private final IPointable argPtr = new VoidPointable();
                     private final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
-
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final AMutableDouble aDouble = new AMutableDouble(0);
                     @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<ADouble> doubleSerde = AqlSerializerDeserializerProvider.INSTANCE
@@ -96,8 +91,6 @@
                                         startOffset + APointSerializerDeserializer.getCoordinateOffset(Coordinate.Y));
                                 aDouble.setValue(y);
                                 doubleSerde.serialize(aDouble, out);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException("get-y does not support the type: " + bytes[startOffset]
                                         + " It is only implemented for POINT.");
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalDayAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalDayAccessor.java
index 1dcb6c9..3732954 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalDayAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalDayAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -84,9 +83,6 @@
                     private final ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private final AMutableInt64 aMutableInt64 = new AMutableInt64(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -117,10 +113,6 @@
                                         * GregorianCalendarSystem.CHRONON_OF_DAY;
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 chrononTimeInMs = AInt64SerializerDeserializer.getLong(bytes, startOffset + 1);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
                             } else {
                                 throw new AlgebricksException("Inapplicable input type: " + bytes[startOffset]);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalHourAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalHourAccessor.java
index 969dfe9..dc10d71 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalHourAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalHourAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -85,9 +84,6 @@
                     private final ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private final AMutableInt64 aMutableInt64 = new AMutableInt64(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -117,10 +113,6 @@
                                 chrononTimeInMs = AInt32SerializerDeserializer.getInt(bytes, startOffset + 1);
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 chrononTimeInMs = AInt64SerializerDeserializer.getLong(bytes, startOffset + 1);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
                             } else {
                                 throw new AlgebricksException("Inapplicable input type: " + bytes[startOffset]);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndAccessor.java
index d8525dd..54ad490 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.om.base.AMutableDate;
 import org.apache.asterix.om.base.AMutableDateTime;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -88,9 +87,6 @@
                     private final ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
                     private final AMutableTime aTime = new AMutableTime(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -100,11 +96,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long endTime = AIntervalSerializerDeserializer.getIntervalEnd(bytes, startOffset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDateAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDateAccessor.java
index 3a9aa5a..ae7b7f1 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDateAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDateAccessor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADate;
 import org.apache.asterix.om.base.AMutableDate;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -76,10 +75,6 @@
                             .getSerializerDeserializer(BuiltinType.ADATE);
                     private final AMutableDate aDate = new AMutableDate(0);
 
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         eval.evaluate(tuple, argPtr);
@@ -88,11 +83,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long endTime = AIntervalSerializerDeserializer.getIntervalEnd(bytes, startOffset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDatetimeAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDatetimeAccessor.java
index 925d88d..0c28a6d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDatetimeAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndDatetimeAccessor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADateTime;
 import org.apache.asterix.om.base.AMutableDateTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -77,9 +76,6 @@
                     private final ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
                     private final AMutableDateTime aDateTime = new AMutableDateTime(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -89,11 +85,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long endTime = AIntervalSerializerDeserializer.getIntervalEnd(bytes, startOffset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndTimeAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndTimeAccessor.java
index a393846..1008d9b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndTimeAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalEndTimeAccessor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.AIntervalSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -75,9 +74,6 @@
                     private final ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
                     private final AMutableTime aTime = new AMutableTime(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -87,11 +83,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long endTime = AIntervalSerializerDeserializer.getIntervalEnd(bytes, startOffset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartAccessor.java
index ef391b2..7ab7f27 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.om.base.AMutableDate;
 import org.apache.asterix.om.base.AMutableDateTime;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -87,9 +86,6 @@
                     private final ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
                     private final AMutableTime aTime = new AMutableTime(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -99,11 +95,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long startTime = AIntervalSerializerDeserializer.getIntervalStart(bytes,
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDateAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDateAccessor.java
index e2d8883..35b17a2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDateAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDateAccessor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADate;
 import org.apache.asterix.om.base.AMutableDate;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -75,9 +74,6 @@
                     private final ISerializerDeserializer<ADate> dateSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATE);
                     private final AMutableDate aDate = new AMutableDate(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -87,11 +83,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long startTime = AIntervalSerializerDeserializer.getIntervalStart(bytes,
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDatetimeAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDatetimeAccessor.java
index b3a89c1..7a1376b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDatetimeAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartDatetimeAccessor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADateTime;
 import org.apache.asterix.om.base.AMutableDateTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -75,9 +74,6 @@
                     private final ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
                     private final AMutableDateTime aDateTime = new AMutableDateTime(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -87,11 +83,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long startTime = AIntervalSerializerDeserializer.getIntervalStart(bytes,
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartTimeAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartTimeAccessor.java
index 12ee1f0..ae4fb4d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartTimeAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalIntervalStartTimeAccessor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.AIntervalSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -75,9 +74,6 @@
                     private final ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
                     private final AMutableTime aTime = new AMutableTime(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -87,11 +83,7 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[startOffset] == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 byte timeType = AIntervalSerializerDeserializer.getIntervalTimeType(bytes,
                                         startOffset + 1);
                                 long startTime = AIntervalSerializerDeserializer.getIntervalStart(bytes,
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMillisecondAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMillisecondAccessor.java
index a0bef32..453aae0 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMillisecondAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMillisecondAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -84,9 +83,6 @@
                     private final ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private final AMutableInt64 aMutableInt64 = new AMutableInt64(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -116,10 +112,6 @@
                                 chrononTimeInMs = AInt32SerializerDeserializer.getInt(bytes, startOffset + 1);
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 chrononTimeInMs = AInt64SerializerDeserializer.getLong(bytes, startOffset + 1);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
                             } else {
                                 throw new AlgebricksException("Inapplicable input type: " + bytes[startOffset]);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMinuteAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMinuteAccessor.java
index cdd0f8a..6455c4f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMinuteAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMinuteAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -87,9 +86,6 @@
                     private final ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private final AMutableInt64 aMutableInt64 = new AMutableInt64(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -119,10 +115,6 @@
                                 chrononTimeInMs = AInt32SerializerDeserializer.getInt(bytes, startOffset + 1);
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 chrononTimeInMs = AInt64SerializerDeserializer.getLong(bytes, startOffset + 1);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
                             } else {
                                 throw new AlgebricksException("Inapplicable input type: " + bytes[startOffset]);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMonthAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMonthAccessor.java
index 4a27e82..e6fb01f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMonthAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalMonthAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -84,9 +83,6 @@
                     private final ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private final AMutableInt64 aMutableInt64 = new AMutableInt64(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -117,10 +113,6 @@
                                         * GregorianCalendarSystem.CHRONON_OF_DAY;
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 chrononTimeInMs = AInt64SerializerDeserializer.getLong(bytes, startOffset + 1);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
                             } else {
                                 throw new AlgebricksException("Inapplicable input type: " + bytes[startOffset]);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalSecondAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalSecondAccessor.java
index 6abe7a39..e14d08d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalSecondAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalSecondAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -84,9 +83,6 @@
                     private final ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private final AMutableInt64 aMutableInt64 = new AMutableInt64(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -117,10 +113,6 @@
                                 chrononTimeInMs = AInt32SerializerDeserializer.getInt(bytes, startOffset + 1);
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 chrononTimeInMs = AInt64SerializerDeserializer.getLong(bytes, startOffset + 1);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
                             } else {
                                 throw new AlgebricksException("Inapplicable input type: " + bytes[startOffset]);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalYearAccessor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalYearAccessor.java
index ccf54c6..41c123b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalYearAccessor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/TemporalYearAccessor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -85,9 +84,6 @@
                     private final ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private final AMutableInt64 aMutableInt64 = new AMutableInt64(0);
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -119,10 +115,6 @@
                                         * GregorianCalendarSystem.CHRONON_OF_DAY;
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 chrononTimeInMs = AInt64SerializerDeserializer.getLong(bytes, startOffset + 1);
-                            } else if (bytes[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
                             } else if (bytes[startOffset] == ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 int year;
                                 strExprPtr.set(bytes, startOffset + 1, len - 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractTypeCheckEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractTypeCheckEvaluator.java
new file mode 100644
index 0000000..800afd7
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/AbstractTypeCheckEvaluator.java
@@ -0,0 +1,62 @@
+/*
+ * 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.evaluators.common;
+
+import java.io.DataOutput;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AObjectSerializerDeserializer;
+import org.apache.asterix.om.base.ABoolean;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.data.std.primitive.VoidPointable;
+import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public abstract class AbstractTypeCheckEvaluator implements IScalarEvaluator {
+
+    private final ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
+    private final DataOutput out = resultStorage.getDataOutput();
+    private final IPointable argPtr = new VoidPointable();
+    private final IScalarEvaluator eval;
+    private static final AObjectSerializerDeserializer aObjSerDer = AObjectSerializerDeserializer.INSTANCE;
+
+    public AbstractTypeCheckEvaluator(IScalarEvaluator argEval) {
+        this.eval = argEval;
+    }
+
+    @Override
+    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
+        eval.evaluate(tuple, argPtr);
+        boolean match = isMatch(argPtr.getByteArray()[argPtr.getStartOffset()]);
+        ABoolean res = match ? ABoolean.TRUE : ABoolean.FALSE;
+        try {
+            resultStorage.reset();
+            aObjSerDer.serialize(res, out);
+            result.set(resultStorage);
+        } catch (HyracksDataException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
+    protected abstract boolean isMatch(byte typeTag);
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ClosedRecordConstructorEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ClosedRecordConstructorEvalFactory.java
index 6ebb684..5a95707 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ClosedRecordConstructorEvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/ClosedRecordConstructorEvalFactory.java
@@ -82,10 +82,13 @@
                 recBuilder.init();
                 for (int i = 0; i < evalFields.length; i++) {
                     evalFields[i].evaluate(tuple, fieldValuePointable);
-                    if (fieldValuePointable.getByteArray()[fieldValuePointable
-                            .getStartOffset()] != ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                        recBuilder.addField(i, fieldValuePointable);
+                    byte[] data = fieldValuePointable.getByteArray();
+                    int offset = fieldValuePointable.getStartOffset();
+                    if (data[offset] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                        // Turns MISSING into NULL for a closed field.
+                        data[offset] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
                     }
+                    recBuilder.addField(i, fieldValuePointable);
                 }
                 recBuilder.write(out, true);
                 result.set(resultStorage);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/CreateMBREvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/CreateMBREvalFactory.java
index c92daa2..0a4d258 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/CreateMBREvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/CreateMBREvalFactory.java
@@ -76,43 +76,58 @@
                 eval0.evaluate(tuple, inputArg0);
                 eval1.evaluate(tuple, inputArg1);
                 eval2.evaluate(tuple, inputArg2);
+                byte[] data0 = inputArg0.getByteArray();
+                byte[] data1 = inputArg1.getByteArray();
+                byte[] data2 = inputArg2.getByteArray();
                 int startOffset0 = inputArg0.getStartOffset();
                 int startOffset1 = inputArg1.getStartOffset();
                 int startOffset2 = inputArg2.getStartOffset();
 
-                resultStorage.reset();
-                // type-check: (Point/Line/Polygon/Circle/Rectangle/Null, Int32, Int32)
-                if (inputArg1.getByteArray()[startOffset1] != ATypeTag.SERIALIZED_INT32_TYPE_TAG
-                        || inputArg2.getByteArray()[startOffset2] != ATypeTag.SERIALIZED_INT32_TYPE_TAG) {
-                    throw new AlgebricksException(
-                            "Expects Types: (Point/Line/Polygon/Circle/Rectangle/Null, Int32, Int32).");
-                }
-
                 try {
-                    int dimension = AInt32SerializerDeserializer.getInt(inputArg1.getByteArray(), startOffset1 + 1);
+                    if (data0[startOffset0] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG
+                            || data1[startOffset1] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG
+                            || data2[startOffset2] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                        out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
+                        result.set(resultStorage);
+                        return;
+                    }
+                    if (data0[startOffset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
+                            || data1[startOffset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
+                            || data2[startOffset2] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
+                        out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                        result.set(resultStorage);
+                        return;
+                    }
+
+                    resultStorage.reset();
+                    // type-check: (Point/Line/Polygon/Circle/Rectangle/Null, Int32, Int32)
+                    if (data1[startOffset1] != ATypeTag.SERIALIZED_INT32_TYPE_TAG
+                            || data2[startOffset2] != ATypeTag.SERIALIZED_INT32_TYPE_TAG) {
+                        throw new AlgebricksException(
+                                "Expects Types: (Point/Line/Polygon/Circle/Rectangle/Null, Int32, Int32).");
+                    }
+
+                    int dimension = AInt32SerializerDeserializer.getInt(data1, startOffset1 + 1);
                     int coordinate = AInt32SerializerDeserializer.getInt(inputArg2.getByteArray(), startOffset2 + 1);
                     double value;
                     if (dimension == 2) {
-                        ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER
-                                .deserialize(inputArg0.getByteArray()[startOffset0]);
+                        ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(data0[startOffset0]);
                         switch (tag) {
                             case POINT:
                                 switch (coordinate) {
                                     case 0: // 0 is for min x, 1 is for min y, 2
-                                            // for
+                                                // for
                                             // max x, and 3 for max y
                                     case 2: {
-                                        double x = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
-                                                startOffset0 + APointSerializerDeserializer
-                                                        .getCoordinateOffset(Coordinate.X));
+                                        double x = ADoubleSerializerDeserializer.getDouble(data0, startOffset0
+                                                + APointSerializerDeserializer.getCoordinateOffset(Coordinate.X));
                                         value = x;
                                     }
                                         break;
                                     case 1:
                                     case 3: {
-                                        double y = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
-                                                startOffset0 + APointSerializerDeserializer
-                                                        .getCoordinateOffset(Coordinate.Y));
+                                        double y = ADoubleSerializerDeserializer.getDouble(data0, startOffset0
+                                                + APointSerializerDeserializer.getCoordinateOffset(Coordinate.Y));
 
                                         value = y;
                                     }
@@ -128,10 +143,10 @@
                                 switch (coordinate) {
                                     case 0: {
                                         value = Double.MAX_VALUE;
-                                        double startX = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(), startOffset0 + ALineSerializerDeserializer
+                                        double startX = ADoubleSerializerDeserializer.getDouble(data0,
+                                                startOffset0 + ALineSerializerDeserializer
                                                         .getStartPointCoordinateOffset(Coordinate.X));
-                                        double endX = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double endX = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ALineSerializerDeserializer
                                                         .getEndPointCoordinateOffset(Coordinate.X));
 
@@ -140,10 +155,10 @@
                                         break;
                                     case 1: {
                                         value = Double.MAX_VALUE;
-                                        double startY = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(), startOffset0 + ALineSerializerDeserializer
+                                        double startY = ADoubleSerializerDeserializer.getDouble(data0,
+                                                startOffset0 + ALineSerializerDeserializer
                                                         .getStartPointCoordinateOffset(Coordinate.Y));
-                                        double endY = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double endY = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ALineSerializerDeserializer
                                                         .getEndPointCoordinateOffset(Coordinate.Y));
 
@@ -152,10 +167,10 @@
                                         break;
                                     case 2: {
                                         value = Double.MIN_VALUE;
-                                        double startX = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(), startOffset0 + ALineSerializerDeserializer
+                                        double startX = ADoubleSerializerDeserializer.getDouble(data0,
+                                                startOffset0 + ALineSerializerDeserializer
                                                         .getStartPointCoordinateOffset(Coordinate.X));
-                                        double endX = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double endX = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ALineSerializerDeserializer
                                                         .getEndPointCoordinateOffset(Coordinate.X));
 
@@ -164,10 +179,10 @@
                                         break;
                                     case 3: {
                                         value = Double.MIN_VALUE;
-                                        double startY = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(), startOffset0 + ALineSerializerDeserializer
+                                        double startY = ADoubleSerializerDeserializer.getDouble(data0,
+                                                startOffset0 + ALineSerializerDeserializer
                                                         .getStartPointCoordinateOffset(Coordinate.Y));
-                                        double endY = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double endY = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ALineSerializerDeserializer
                                                         .getEndPointCoordinateOffset(Coordinate.Y));
 
@@ -181,13 +196,13 @@
                                 }
                                 break;
                             case POLYGON:
-                                int numOfPoints = AInt16SerializerDeserializer.getShort(inputArg0.getByteArray(),
+                                int numOfPoints = AInt16SerializerDeserializer.getShort(data0,
                                         startOffset0 + APolygonSerializerDeserializer.getNumberOfPointsOffset());
                                 switch (coordinate) {
                                     case 0: {
                                         value = Double.MAX_VALUE;
                                         for (int i = 0; i < numOfPoints; i++) {
-                                            double x = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                            double x = ADoubleSerializerDeserializer.getDouble(data0,
                                                     startOffset0 + APolygonSerializerDeserializer.getCoordinateOffset(i,
                                                             Coordinate.X));
                                             value = Math.min(x, value);
@@ -197,7 +212,7 @@
                                     case 1: {
                                         value = Double.MAX_VALUE;
                                         for (int i = 0; i < numOfPoints; i++) {
-                                            double y = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                            double y = ADoubleSerializerDeserializer.getDouble(data0,
                                                     startOffset0 + APolygonSerializerDeserializer.getCoordinateOffset(i,
                                                             Coordinate.Y));
                                             value = Math.min(y, value);
@@ -207,7 +222,7 @@
                                     case 2: {
                                         value = Double.MIN_VALUE;
                                         for (int i = 0; i < numOfPoints; i++) {
-                                            double x = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                            double x = ADoubleSerializerDeserializer.getDouble(data0,
                                                     startOffset0 + APolygonSerializerDeserializer.getCoordinateOffset(i,
                                                             Coordinate.X));
                                             value = Math.max(x, value);
@@ -217,7 +232,7 @@
                                     case 3: {
                                         value = Double.MIN_VALUE;
                                         for (int i = 0; i < numOfPoints; i++) {
-                                            double y = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                            double y = ADoubleSerializerDeserializer.getDouble(data0,
                                                     startOffset0 + APolygonSerializerDeserializer.getCoordinateOffset(i,
                                                             Coordinate.Y));
                                             value = Math.max(y, value);
@@ -233,43 +248,39 @@
                             case CIRCLE:
                                 switch (coordinate) {
                                     case 0: {
-                                        double x = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double x = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer
                                                         .getCenterPointCoordinateOffset(Coordinate.X));
-                                        double radius = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(),
+                                        double radius = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer.getRadiusOffset());
                                         value = x - radius;
                                     }
                                         break;
                                     case 1: {
-                                        double y = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double y = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer
                                                         .getCenterPointCoordinateOffset(Coordinate.Y));
-                                        double radius = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(),
+                                        double radius = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer.getRadiusOffset());
 
                                         value = y - radius;
                                     }
                                         break;
                                     case 2: {
-                                        double x = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double x = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer
                                                         .getCenterPointCoordinateOffset(Coordinate.X));
-                                        double radius = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(),
+                                        double radius = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer.getRadiusOffset());
 
                                         value = x + radius;
                                     }
                                         break;
                                     case 3: {
-                                        double y = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        double y = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer
                                                         .getCenterPointCoordinateOffset(Coordinate.Y));
-                                        double radius = ADoubleSerializerDeserializer.getDouble(
-                                                inputArg0.getByteArray(),
+                                        double radius = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ACircleSerializerDeserializer.getRadiusOffset());
 
                                         value = y + radius;
@@ -285,25 +296,25 @@
                                 value = Double.MAX_VALUE;
                                 switch (coordinate) {
                                     case 0: {
-                                        value = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        value = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ARectangleSerializerDeserializer
                                                         .getBottomLeftCoordinateOffset(Coordinate.X));
                                     }
                                         break;
                                     case 1: {
-                                        value = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        value = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ARectangleSerializerDeserializer
                                                         .getBottomLeftCoordinateOffset(Coordinate.Y));
                                     }
                                         break;
                                     case 2: {
-                                        value = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        value = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ARectangleSerializerDeserializer
                                                         .getUpperRightCoordinateOffset(Coordinate.X));
                                     }
                                         break;
                                     case 3: {
-                                        value = ADoubleSerializerDeserializer.getDouble(inputArg0.getByteArray(),
+                                        value = ADoubleSerializerDeserializer.getDouble(data0,
                                                 startOffset0 + ARectangleSerializerDeserializer
                                                         .getUpperRightCoordinateOffset(Coordinate.Y));
                                     }
@@ -314,11 +325,6 @@
                                     }
                                 }
                                 break;
-                            case NULL: {
-                                out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
-                                result.set(resultStorage);
-                                return;
-                            }
                             default:
                                 throw new NotImplementedException(
                                         "create-mbr is only implemented for POINT, LINE, POLYGON, CIRCLE and RECTANGLE. Encountered type: "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceCheckEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceCheckEvaluator.java
index 915ff53..3dca584 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceCheckEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceCheckEvaluator.java
@@ -27,6 +27,7 @@
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -59,14 +60,29 @@
     }
 
     @Override
-    protected void runArgEvals(IFrameTupleReference tuple) throws AlgebricksException {
-        super.runArgEvals(tuple);
+    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
+        resultStorage.reset();
+
+        firstStringEval.evaluate(tuple, argPtr1);
+        firstTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset()]);
+        secondStringEval.evaluate(tuple, argPtr2);
+        secondTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset()]);
         edThreshEval.evaluate(tuple, argPtrThreshold);
+
+        if (!checkArgTypes(firstTypeTag, secondTypeTag)) {
+            result.set(resultStorage);
+            return;
+        }
         try {
             edThresh = ATypeHierarchy.getIntegerValue(argPtrThreshold.getByteArray(), argPtrThreshold.getStartOffset());
-        } catch (HyracksDataException e) {
+            editDistance = computeResult(argPtr1, argPtr2, firstTypeTag);
+            writeResult(editDistance);
+        } catch (IOException e) {
             throw new AlgebricksException(e);
         }
+        result.set(resultStorage);
     }
 
     @Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceEvaluator.java
index f6345d6..d2adc1c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/EditDistanceEvaluator.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.fuzzyjoin.similarity.SimilarityMetricEditDistance;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -59,9 +58,6 @@
     @SuppressWarnings("unchecked")
     protected final ISerializerDeserializer<AInt64> int64Serde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.AINT64);
-    @SuppressWarnings("unchecked")
-    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
     protected ATypeTag itemTypeTag;
 
     protected ATypeTag firstTypeTag;
@@ -76,7 +72,14 @@
     @Override
     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
         resultStorage.reset();
-        runArgEvals(tuple);
+
+        firstStringEval.evaluate(tuple, argPtr1);
+        firstTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset()]);
+        secondStringEval.evaluate(tuple, argPtr2);
+        secondTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset()]);
+
         if (!checkArgTypes(firstTypeTag, secondTypeTag)) {
             result.set(resultStorage);
             return;
@@ -96,15 +99,6 @@
         result.set(resultStorage);
     }
 
-    protected void runArgEvals(IFrameTupleReference tuple) throws AlgebricksException {
-        firstStringEval.evaluate(tuple, argPtr1);
-        firstTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset()]);
-        secondStringEval.evaluate(tuple, argPtr2);
-        secondTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset()]);
-    }
-
     protected int computeResult(IPointable left, IPointable right, ATypeTag argType)
             throws AlgebricksException, HyracksDataException {
         byte[] leftBytes = left.getByteArray();
@@ -136,16 +130,6 @@
     }
 
     protected boolean checkArgTypes(ATypeTag typeTag1, ATypeTag typeTag2) throws AlgebricksException {
-        // edit distance between null and anything else is undefined
-        if (typeTag1 == ATypeTag.NULL || typeTag2 == ATypeTag.NULL) {
-            try {
-                nullSerde.serialize(ANull.NULL, out);
-            } catch (IOException e) {
-                throw new AlgebricksException(e);
-            }
-            return false;
-        }
-
         if (typeTag1 != typeTag2) {
             throw new AlgebricksException(
                     "Incompatible argument types given in edit distance: " + typeTag1 + " " + typeTag2);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardCheckEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardCheckEvaluator.java
index b2eca6d..f31b289 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardCheckEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardCheckEvaluator.java
@@ -26,6 +26,7 @@
 import org.apache.asterix.om.base.ABoolean;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.functions.BinaryHashMap.BinaryEntry;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
@@ -61,11 +62,41 @@
     }
 
     @Override
-    protected void runArgEvals(IFrameTupleReference tuple) throws AlgebricksException {
-        super.runArgEvals(tuple);
+    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
+        resultStorage.reset();
+
+        firstOrdListEval.evaluate(tuple, argPtr1);
+        secondOrdListEval.evaluate(tuple, argPtr2);
         jaccThreshEval.evaluate(tuple, jaccThreshPointable);
-        jaccThresh = (float) AFloatSerializerDeserializer.getFloat(jaccThreshPointable.getByteArray(),
+
+        firstTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset()]);
+        secondTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset()]);
+
+        firstItemTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset() + 1]);
+        secondItemTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset() + 1]);
+
+        jaccThresh = AFloatSerializerDeserializer.getFloat(jaccThreshPointable.getByteArray(),
                 jaccThreshPointable.getStartOffset() + TYPE_INDICATOR_SIZE);
+
+        if (!checkArgTypes(firstTypeTag, secondTypeTag)) {
+            result.set(resultStorage);
+            return;
+        }
+        if (prepareLists(argPtr1, argPtr2, firstTypeTag)) {
+            jaccSim = computeResult();
+        } else {
+            jaccSim = 0.0f;
+        }
+        try {
+            writeResult(jaccSim);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+        result.set(resultStorage);
     }
 
     @Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardEvaluator.java
index 92946c6..01c4b6b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/SimilarityJaccardEvaluator.java
@@ -100,7 +100,20 @@
     @Override
     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
         resultStorage.reset();
-        runArgEvals(tuple);
+
+        firstOrdListEval.evaluate(tuple, argPtr1);
+        secondOrdListEval.evaluate(tuple, argPtr2);
+
+        firstTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset()]);
+        secondTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset()]);
+
+        firstItemTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset() + 1]);
+        secondItemTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset() + 1]);
+
         if (!checkArgTypes(firstTypeTag, secondTypeTag)) {
             result.set(resultStorage);
             return;
@@ -118,28 +131,6 @@
         result.set(resultStorage);
     }
 
-    protected void runArgEvals(IFrameTupleReference tuple) throws AlgebricksException {
-        firstOrdListEval.evaluate(tuple, argPtr1);
-        secondOrdListEval.evaluate(tuple, argPtr2);
-
-        firstTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset()]);
-        secondTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset()]);
-
-        if (firstTypeTag == ATypeTag.NULL) {
-            return;
-        }
-        if (secondTypeTag == ATypeTag.NULL) {
-            return;
-        }
-
-        firstItemTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                .deserialize(argPtr1.getByteArray()[argPtr1.getStartOffset() + 1]);
-        secondItemTypeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                .deserialize(argPtr2.getByteArray()[argPtr2.getStartOffset() + 1]);
-    }
-
     protected boolean prepareLists(IPointable left, IPointable right, ATypeTag argType) throws AlgebricksException {
         try {
             firstListIter.reset(left.getByteArray(), left.getStartOffset());
@@ -249,15 +240,6 @@
     }
 
     protected boolean checkArgTypes(ATypeTag typeTag1, ATypeTag typeTag2) throws AlgebricksException {
-        // Jaccard between null and anything else is 0
-        if (typeTag1 == ATypeTag.NULL || typeTag2 == ATypeTag.NULL) {
-            try {
-                writeResult(0.0f);
-            } catch (IOException e) {
-                throw new AlgebricksException(e);
-            }
-            return false;
-        }
         switch (typeTag1) {
             case ORDEREDLIST: {
                 firstListIter = fstOrdListIter;
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 30f6562..ebf255f 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
@@ -20,18 +20,16 @@
 
 import java.io.DataOutput;
 
-import org.apache.asterix.dataflow.data.nontagged.comparators.ABinaryComparator;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.BinaryComparatorConstant.ComparableResultCode;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -42,13 +40,6 @@
 
 public abstract class AbstractComparisonEvaluator implements IScalarEvaluator {
 
-    protected enum ComparisonResult {
-        LESS_THAN,
-        EQUAL,
-        GREATER_THAN,
-        UNKNOWN
-    }
-
     protected ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
     protected DataOutput out = resultStorage.getDataOutput();
     protected TaggedValuePointable argLeft = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
@@ -62,9 +53,6 @@
     @SuppressWarnings("unchecked")
     protected ISerializerDeserializer<ABoolean> serde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
-    @SuppressWarnings("unchecked")
-    protected ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
 
     public AbstractComparisonEvaluator(IScalarEvaluatorFactory evalLeftFactory,
             IScalarEvaluatorFactory evalRightFactory, IHyracksTaskContext context) throws AlgebricksException {
@@ -75,7 +63,12 @@
     @Override
     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
         resultStorage.reset();
-        evalInputs(tuple);
+
+        // Evaluates input args.
+        evalLeft.evaluate(tuple, argLeft);
+        evalRight.evaluate(tuple, argRight);
+        argLeft.getValue(outLeft);
+        argRight.getValue(outRight);
 
         // checks whether we can apply >, >=, <, and <= to the given type since
         // these operations cannot be defined for certain types.
@@ -83,54 +76,27 @@
             checkTotallyOrderable();
         }
 
+        ABoolean b;
         // Checks whether two types are comparable
-        switch (comparabilityCheck()) {
-            case UNKNOWN:
-                // result:UNKNOWN - NULL value found
-                try {
-                    nullSerde.serialize(ANull.NULL, out);
-                    result.set(resultStorage);
-                    return;
-                } catch (HyracksDataException e) {
-                    throw new AlgebricksException(e);
-                }
-            case FALSE:
-                // result:FALSE - two types cannot be compared. Thus we return FALSE since this is equality comparison
-                ABoolean b = ABoolean.FALSE;
-                try {
-                    serde.serialize(b, out);
-                } catch (HyracksDataException e) {
-                    throw new AlgebricksException(e);
-                }
-                break;
-            case TRUE:
-                // Two types can be compared
-                ComparisonResult r = compareResults();
-                ABoolean b1 = getComparisonResult(r) ? ABoolean.TRUE : ABoolean.FALSE;
-                try {
-                    serde.serialize(b1, out);
-                } catch (HyracksDataException e) {
-                    throw new AlgebricksException(e);
-                }
-                break;
-            default:
-                throw new AlgebricksException(
-                        "Comparison cannot be processed. The return code from ComparabilityCheck is not correct.");
+        if (comparabilityCheck()) {
+            // Two types can be compared
+            int r = compareResults();
+            b = getComparisonResult(r) ? ABoolean.TRUE : ABoolean.FALSE;
+        } else {
+            // result:FALSE - two types cannot be compared. Thus we return FALSE since this is equality comparison
+            b = ABoolean.FALSE;
+        }
+        try {
+            serde.serialize(b, out);
+        } catch (HyracksDataException e) {
+            throw new AlgebricksException(e);
         }
         result.set(resultStorage);
     }
 
     protected abstract boolean isTotallyOrderable();
 
-    protected abstract boolean getComparisonResult(ComparisonResult r);
-
-    protected void evalInputs(IFrameTupleReference tuple) throws AlgebricksException {
-        evalLeft.evaluate(tuple, argLeft);
-        evalRight.evaluate(tuple, argRight);
-
-        argLeft.getValue(outLeft);
-        argRight.getValue(outRight);
-    }
+    protected abstract boolean getComparisonResult(int r);
 
     // checks whether we can apply >, >=, <, and <= operations to the given type since
     // these operations can not be defined for certain types.
@@ -155,46 +121,19 @@
     }
 
     // checks whether two types are comparable
-    protected ComparableResultCode comparabilityCheck() {
-        // just check TypeTags
-        return ABinaryComparator.isComparable(argLeft.getTag(), argRight.getTag());
+    protected boolean comparabilityCheck() {
+        // Checks whether two types are comparable or not
+        ATypeTag typeTag1 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argLeft.getTag());
+        ATypeTag typeTag2 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argRight.getTag());
+
+        // Are two types compatible, meaning that they can be compared? (e.g., compare between numeric types
+        return ATypeHierarchy.isCompatible(typeTag1, typeTag2);
     }
 
-    protected ComparisonResult compareResults() throws AlgebricksException {
-        boolean isLeftNull = false;
-        boolean isRightNull = false;
-        ATypeTag typeTag1 = null;
-        ATypeTag typeTag2 = null;
-
-        if (outLeft.getLength() == 0) {
-            isLeftNull = true;
-        } else {
-            typeTag1 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argLeft.getTag());
-            if (typeTag1 == ATypeTag.NULL) {
-                isLeftNull = true;
-            }
-        }
-        if (outRight.getLength() == 0) {
-            isRightNull = true;
-        } else {
-            typeTag2 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argRight.getTag());
-            if (typeTag2 == ATypeTag.NULL) {
-                isRightNull = true;
-            }
-        }
-
-        if (isLeftNull || isRightNull) {
-            return ComparisonResult.UNKNOWN;
-        }
-
-        int result = ch.compare(typeTag1, typeTag2, outLeft, outRight);
-        if (result == 0) {
-            return ComparisonResult.EQUAL;
-        } else if (result < 0) {
-            return ComparisonResult.LESS_THAN;
-        } else {
-            return ComparisonResult.GREATER_THAN;
-        }
+    protected int compareResults() throws AlgebricksException {
+        int result = ch.compare(EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argLeft.getTag()),
+                EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argRight.getTag()), outLeft, outRight);
+        return result;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonEvalFactory.java
deleted file mode 100644
index 649f262..0000000
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonEvalFactory.java
+++ /dev/null
@@ -1,171 +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.evaluators.comparisons;
-
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions.ComparisonKind;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-
-public class ComparisonEvalFactory implements IScalarEvaluatorFactory {
-    private static final long serialVersionUID = 1L;
-
-    private IScalarEvaluatorFactory evalLeftFactory;
-    private IScalarEvaluatorFactory evalRightFactory;
-    private ComparisonKind comparisonKind;
-
-    public ComparisonEvalFactory(IScalarEvaluatorFactory evalLeftFactory, IScalarEvaluatorFactory evalRightFactory,
-            ComparisonKind comparisonKind) {
-        this.evalLeftFactory = evalLeftFactory;
-        this.evalRightFactory = evalRightFactory;
-        this.comparisonKind = comparisonKind;
-    }
-
-    @Override
-    public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-        switch (comparisonKind) {
-            // Should we do any normalization?
-            case EQ: {
-                return new EqualityComparisonEvaluator(evalLeftFactory, evalRightFactory, ctx);
-            }
-            case GE: {
-                return new GreaterThanOrEqualComparisonEvaluator(evalLeftFactory, evalRightFactory, ctx);
-            }
-            case GT: {
-                return new GreaterThanComparisonEvaluator(evalLeftFactory, evalRightFactory, ctx);
-            }
-            case LE: {
-                return new LessThanOrEqualComparisonEvaluator(evalLeftFactory, evalRightFactory, ctx);
-            }
-            case LT: {
-                return new LessThanComparisonEvaluator(evalLeftFactory, evalRightFactory, ctx);
-            }
-            case NEQ: {
-                return new InequalityComparisonEvaluator(evalLeftFactory, evalRightFactory, ctx);
-            }
-            default: {
-                throw new IllegalStateException();
-            }
-        }
-    }
-
-    static class EqualityComparisonEvaluator extends AbstractComparisonEvaluator {
-        public EqualityComparisonEvaluator(IScalarEvaluatorFactory evalLeftFactory,
-                IScalarEvaluatorFactory evalRightFactory, IHyracksTaskContext context) throws AlgebricksException {
-            super(evalLeftFactory, evalRightFactory, context);
-        }
-
-        @Override
-        protected boolean getComparisonResult(ComparisonResult r) {
-            return (r == ComparisonResult.EQUAL);
-        }
-
-        @Override
-        protected boolean isTotallyOrderable() {
-            return false;
-        }
-    }
-
-    static class InequalityComparisonEvaluator extends AbstractComparisonEvaluator {
-        public InequalityComparisonEvaluator(IScalarEvaluatorFactory evalLeftFactory,
-                IScalarEvaluatorFactory evalRightFactory, IHyracksTaskContext context) throws AlgebricksException {
-            super(evalLeftFactory, evalRightFactory, context);
-        }
-
-        @Override
-        protected boolean getComparisonResult(ComparisonResult r) {
-            return (r != ComparisonResult.EQUAL);
-        }
-
-        @Override
-        protected boolean isTotallyOrderable() {
-            return false;
-        }
-    }
-
-    static class GreaterThanOrEqualComparisonEvaluator extends AbstractComparisonEvaluator {
-        public GreaterThanOrEqualComparisonEvaluator(IScalarEvaluatorFactory evalLeftFactory,
-                IScalarEvaluatorFactory evalRightFactory, IHyracksTaskContext context) throws AlgebricksException {
-            super(evalLeftFactory, evalRightFactory, context);
-        }
-
-        @Override
-        protected boolean getComparisonResult(ComparisonResult r) {
-            return (r == ComparisonResult.EQUAL || r == ComparisonResult.GREATER_THAN);
-        }
-
-        @Override
-        protected boolean isTotallyOrderable() {
-            return true;
-        }
-    }
-
-    static class GreaterThanComparisonEvaluator extends AbstractComparisonEvaluator {
-        public GreaterThanComparisonEvaluator(IScalarEvaluatorFactory evalLeftFactory,
-                IScalarEvaluatorFactory evalRightFactory, IHyracksTaskContext context) throws AlgebricksException {
-            super(evalLeftFactory, evalRightFactory, context);
-        }
-
-        @Override
-        protected boolean getComparisonResult(ComparisonResult r) {
-            return (r == ComparisonResult.GREATER_THAN);
-        }
-
-        @Override
-        protected boolean isTotallyOrderable() {
-            return true;
-        }
-    }
-
-    static class LessThanOrEqualComparisonEvaluator extends AbstractComparisonEvaluator {
-        public LessThanOrEqualComparisonEvaluator(IScalarEvaluatorFactory evalLeftFactory,
-                IScalarEvaluatorFactory evalRightFactory, IHyracksTaskContext context) throws AlgebricksException {
-            super(evalLeftFactory, evalRightFactory, context);
-        }
-
-        @Override
-        protected boolean getComparisonResult(ComparisonResult r) {
-            return (r == ComparisonResult.EQUAL || r == ComparisonResult.LESS_THAN);
-        }
-
-        @Override
-        protected boolean isTotallyOrderable() {
-            return true;
-        }
-    }
-
-    static class LessThanComparisonEvaluator extends AbstractComparisonEvaluator {
-        public LessThanComparisonEvaluator(IScalarEvaluatorFactory evalLeftFactory,
-                IScalarEvaluatorFactory evalRightFactory, IHyracksTaskContext context) throws AlgebricksException {
-            super(evalLeftFactory, evalRightFactory, context);
-        }
-
-        @Override
-        protected boolean getComparisonResult(ComparisonResult r) {
-            return (r == ComparisonResult.LESS_THAN);
-        }
-
-        @Override
-        protected boolean isTotallyOrderable() {
-            return true;
-        }
-    }
-
-}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/EqualsDescriptor.java
similarity index 69%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/EqualsDescriptor.java
index 0bfa5a8..122c1a2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/EqualsDescriptor.java
@@ -16,62 +16,55 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.runtime.evaluators.functions;
+
+package org.apache.asterix.runtime.evaluators.comparisons;
 
 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.types.IAType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class EqualsDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new EqualsDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
+    @Override
+    public FunctionIdentifier getIdentifier() {
+        return AsterixBuiltinFunctions.EQ;
     }
 
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(IScalarEvaluatorFactory[] args) throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+                return new AbstractComparisonEvaluator(args[0], args[1], ctx) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
+                    protected boolean getComparisonResult(int r) {
+                        return r == 0;
+                    }
 
+                    @Override
+                    protected boolean isTotallyOrderable() {
+                        return false;
                     }
                 };
             }
-        };
-    }
 
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        };
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/GreaterThanDescriptor.java
similarity index 69%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/GreaterThanDescriptor.java
index 0bfa5a8..1bc731a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/GreaterThanDescriptor.java
@@ -16,62 +16,55 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.runtime.evaluators.functions;
+
+package org.apache.asterix.runtime.evaluators.comparisons;
 
 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.types.IAType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class GreaterThanDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new GreaterThanDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
+    @Override
+    public FunctionIdentifier getIdentifier() {
+        return AsterixBuiltinFunctions.GT;
     }
 
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(IScalarEvaluatorFactory[] args) throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+                return new AbstractComparisonEvaluator(args[0], args[1], ctx) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
+                    protected boolean getComparisonResult(int r) {
+                        return r > 0;
+                    }
 
+                    @Override
+                    protected boolean isTotallyOrderable() {
+                        return true;
                     }
                 };
             }
-        };
-    }
 
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        };
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/GreaterThanOrEqualsDescriptor.java
similarity index 69%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/GreaterThanOrEqualsDescriptor.java
index 0bfa5a8..b6318ad 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/GreaterThanOrEqualsDescriptor.java
@@ -16,62 +16,55 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.runtime.evaluators.functions;
+
+package org.apache.asterix.runtime.evaluators.comparisons;
 
 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.types.IAType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class GreaterThanOrEqualsDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new GreaterThanOrEqualsDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
+    @Override
+    public FunctionIdentifier getIdentifier() {
+        return AsterixBuiltinFunctions.GE;
     }
 
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(IScalarEvaluatorFactory[] args) throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+                return new AbstractComparisonEvaluator(args[0], args[1], ctx) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
+                    protected boolean getComparisonResult(int r) {
+                        return r >= 0;
+                    }
 
+                    @Override
+                    protected boolean isTotallyOrderable() {
+                        return true;
                     }
                 };
             }
-        };
-    }
 
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        };
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/LessThanDescriptor.java
similarity index 69%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/LessThanDescriptor.java
index 0bfa5a8..d375a61 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/LessThanDescriptor.java
@@ -16,62 +16,53 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.runtime.evaluators.functions;
+
+package org.apache.asterix.runtime.evaluators.comparisons;
 
 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.types.IAType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class LessThanDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new LessThanDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
+    @Override
+    public FunctionIdentifier getIdentifier() {
+        return AsterixBuiltinFunctions.LT;
     }
 
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(IScalarEvaluatorFactory[] args) throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+                return new AbstractComparisonEvaluator(args[0], args[1], ctx) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
+                    protected boolean getComparisonResult(int r) {
+                        return r < 0;
+                    }
 
+                    @Override
+                    protected boolean isTotallyOrderable() {
+                        return true;
                     }
                 };
             }
         };
     }
-
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
-    }
-
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/LessThanOrEqualsDescriptor.java
similarity index 69%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/LessThanOrEqualsDescriptor.java
index 0bfa5a8..4bcaa5b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/LessThanOrEqualsDescriptor.java
@@ -16,62 +16,55 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.runtime.evaluators.functions;
+
+package org.apache.asterix.runtime.evaluators.comparisons;
 
 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.types.IAType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class LessThanOrEqualsDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new LessThanOrEqualsDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
+    @Override
+    public FunctionIdentifier getIdentifier() {
+        return AsterixBuiltinFunctions.LE;
     }
 
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(IScalarEvaluatorFactory[] args) throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+                return new AbstractComparisonEvaluator(args[0], args[1], ctx) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
+                    protected boolean getComparisonResult(int r) {
+                        return r <= 0;
+                    }
 
+                    @Override
+                    protected boolean isTotallyOrderable() {
+                        return true;
                     }
                 };
             }
-        };
-    }
 
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        };
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/NotEqualsDescriptor.java
similarity index 70%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/NotEqualsDescriptor.java
index 0bfa5a8..11ee60f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/NotEqualsDescriptor.java
@@ -16,62 +16,55 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.runtime.evaluators.functions;
+
+package org.apache.asterix.runtime.evaluators.comparisons;
 
 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.types.IAType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class NotEqualsDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new NotEqualsDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
+    @Override
+    public FunctionIdentifier getIdentifier() {
+        return AsterixBuiltinFunctions.NEQ;
     }
 
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(IScalarEvaluatorFactory[] args) throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+                return new AbstractComparisonEvaluator(args[0], args[1], ctx) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
+                    protected boolean getComparisonResult(int r) {
+                        return r != 0;
+                    }
 
+                    @Override
+                    protected boolean isTotallyOrderable() {
+                        return false;
                     }
                 };
             }
-        };
-    }
 
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        };
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java
index 422f325..74f4b65 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java
@@ -22,20 +22,16 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.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.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -80,10 +76,6 @@
         private IValueParser byteArrayParser;
         private UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
-        @SuppressWarnings("unchecked")
-        private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                .getSerializerDeserializer(BuiltinType.ANULL);
-
         public ABinaryConstructorEvaluator(IScalarEvaluatorFactory copyEvaluatorFactory,
                 IValueParserFactory valueParserFactory, IHyracksTaskContext context) throws AlgebricksException {
             eval = copyEvaluatorFactory.createScalarEvaluator(context);
@@ -99,11 +91,7 @@
                 int len = inputArg.getLength();
 
                 ATypeTag tt = ATypeTag.VALUE_TYPE_MAPPING[binary[startOffset]];
-                if (tt == ATypeTag.NULL) {
-                    resultStorage.reset();
-                    nullSerde.serialize(ANull.NULL, out);
-                    result.set(resultStorage);
-                } else if (tt == ATypeTag.BINARY) {
+                if (tt == ATypeTag.BINARY) {
                     result.set(inputArg);
                 } else if (tt == ATypeTag.STRING) {
                     resultStorage.reset();
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java
index 0e41f4a..85ecb75 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -73,9 +72,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ABoolean> booleanSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -100,12 +96,9 @@
                                 } else {
                                     throw new AlgebricksException(errorMessage);
                                 }
-                            } else if (serString[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
-                            result.set(resultStorage);
                         } catch (IOException e1) {
                             throw new AlgebricksException(errorMessage);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java
index 708b027..319ab0e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.om.base.ACircle;
 import org.apache.asterix.om.base.AMutableCircle;
 import org.apache.asterix.om.base.AMutablePoint;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -72,9 +71,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ACircle> circleSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ACIRCLE);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
@@ -97,8 +93,6 @@
                                         Double.parseDouble(s.substring(commaIndex + 1, spaceIndex)));
                                 aCircle.setValue(aPoint, Double.parseDouble(s.substring(spaceIndex + 1, s.length())));
                                 circleSerde.serialize(aCircle, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
index d306159..06b9948 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADate;
 import org.apache.asterix.om.base.AMutableDate;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ADateParserFactory;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -72,9 +71,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADate> dateSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATE);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
@@ -109,24 +105,19 @@
 
                                 long chrononTimeInMs = ADateParserFactory.parseDatePart(serString, startOffset,
                                         endOffset - startOffset + 1);
-
                                 short temp = 0;
                                 if (chrononTimeInMs < 0
                                         && chrononTimeInMs % GregorianCalendarSystem.CHRONON_OF_DAY != 0) {
                                     temp = 1;
                                 }
-
                                 aDate.setValue((int) (chrononTimeInMs / GregorianCalendarSystem.CHRONON_OF_DAY) - temp);
-
                                 dateSerde.serialize(aDate, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
                             result.set(resultStorage);
-                        } catch (IOException e1) {
-                            throw new AlgebricksException(errorMessage);
+                        } catch (IOException e) {
+                            throw new AlgebricksException(e);
                         }
                     }
                 };
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
index a538b2b..63f3461 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADateTime;
 import org.apache.asterix.om.base.AMutableDateTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ADateParserFactory;
 import org.apache.asterix.om.base.temporal.ATimeParserFactory;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -71,9 +70,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -115,8 +111,6 @@
 
                                 aDateTime.setValue(chrononTimeInMs);
                                 datetimeSerde.serialize(aDateTime, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADayTimeDurationConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADayTimeDurationConstructorDescriptor.java
index 31ceb9f..f95a441 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADayTimeDurationConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADayTimeDurationConstructorDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADayTimeDuration;
 import org.apache.asterix.om.base.AMutableDayTimeDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory.ADurationParseOption;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -73,9 +72,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADayTimeDuration> dayTimeDurationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADAYTIMEDURATION);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -96,8 +92,6 @@
                                         aDayTimeDuration, ADurationParseOption.DAY_TIME);
 
                                 dayTimeDurationSerde.serialize(aDayTimeDuration, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java
index adacd51..92d7c72 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADouble;
 import org.apache.asterix.om.base.AMutableDouble;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -77,9 +76,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADouble> doubleSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADOUBLE);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
@@ -107,8 +103,6 @@
                                     aDouble.setValue(Double.parseDouble(utf8Ptr.toString()));
                                 }
                                 doubleSerde.serialize(aDouble, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
index cd48249..18dc471 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADuration;
 import org.apache.asterix.om.base.AMutableDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory.ADurationParseOption;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -70,9 +69,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADuration> durationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADURATION);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -90,8 +86,6 @@
                                 ADurationParserFactory.parseDuration(serString, utf8Ptr.getCharStartOffset(),
                                         stringLength, aDuration, ADurationParseOption.All);
                                 durationSerde.serialize(aDuration, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java
index 842ebab..e293552 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AFloat;
 import org.apache.asterix.om.base.AMutableFloat;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -86,9 +85,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AFloat> floatSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AFLOAT);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -115,8 +111,6 @@
                                     aFloat.setValue(Float.parseFloat(utf8Ptr.toString()));
                                 }
                                 floatSerde.serialize(aFloat, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java
index 2a0d795..f413c82 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt16;
 import org.apache.asterix.om.base.AMutableInt16;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -73,9 +72,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInt16> int16Serde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT16);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -118,8 +114,6 @@
 
                                 aInt16.setValue(value);
                                 int16Serde.serialize(aInt16, out);
-                            } else if (serString[startOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java
index 3d335f2..a727026 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt32;
 import org.apache.asterix.om.base.AMutableInt32;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -72,9 +71,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInt32> int32Serde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT32);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -117,8 +113,6 @@
 
                                 aInt32.setValue(value);
                                 int32Serde.serialize(aInt32, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java
index c658423..12775fb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -73,9 +72,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInt64> int64Serde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -118,8 +114,6 @@
 
                                 aInt64.setValue(value);
                                 int64Serde.serialize(aInt64, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java
index c865820..90359de 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt8;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -73,9 +72,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInt8> int8Serde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT8);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -118,8 +114,6 @@
 
                                 aInt8.setValue(value);
                                 int8Serde.serialize(aInt8, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
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 172ad4f..ccfdb43 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
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.AMutableInterval;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -75,9 +74,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInterval> intervalSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINTERVAL);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -91,13 +87,6 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != bytes1[offset1]) {
                                 throw new AlgebricksException(FID.getName()
                                         + ": expects both arguments to be of the same type. Either DATE/TIME/DATETIME, but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
index 55ff7d1..ca115fb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
@@ -29,7 +29,6 @@
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.AMutableDuration;
 import org.apache.asterix.om.base.AMutableInterval;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ADateParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory.ADurationParseOption;
@@ -87,9 +86,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInterval> intervalSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINTERVAL);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -106,13 +102,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             long intervalStart = 0, intervalEnd = 0;
                             if (bytes0[offset0] == ATypeTag.SERIALIZED_DATE_TYPE_TAG) {
                                 intervalStart = ADateSerializerDeserializer.getChronon(bytes0, offset0 + 1)
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
index dab0714..b8c56fb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
@@ -29,7 +29,6 @@
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.AMutableDuration;
 import org.apache.asterix.om.base.AMutableInterval;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ADateParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory.ADurationParseOption;
@@ -85,9 +84,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInterval> intervalSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINTERVAL);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -103,13 +99,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             long intervalStart = 0, intervalEnd = 0;
                             if (bytes0[offset0] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 intervalStart = ADateTimeSerializerDeserializer.getChronon(bytes0, offset0 + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
index b3df622..49644f3 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.AMutableDuration;
 import org.apache.asterix.om.base.AMutableInterval;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory.ADurationParseOption;
 import org.apache.asterix.om.base.temporal.ATimeParserFactory;
@@ -85,9 +84,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInterval> intervalSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINTERVAL);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -104,13 +100,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             long intervalStart = 0, intervalEnd = 0;
                             if (bytes0[offset0] == ATypeTag.SERIALIZED_TIME_TYPE_TAG) {
                                 intervalStart = ATimeSerializerDeserializer.getChronon(bytes0, offset0 + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java
index 82e7150..b912a4e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.om.base.ALine;
 import org.apache.asterix.om.base.AMutableLine;
 import org.apache.asterix.om.base.AMutablePoint;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -73,9 +72,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ALine> lineSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ALINE);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -99,8 +95,6 @@
                                         Double.parseDouble(s.substring(commaIndex + 1, s.length())));
                                 aLine.setValue(aPoint[0], aPoint[1]);
                                 lineSerde.serialize(aLine, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java
index 623d546..71359a8 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java
@@ -23,7 +23,7 @@
 
 import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -70,8 +70,8 @@
                     IBinaryComparator utf8BinaryComparator = AqlBinaryComparatorFactoryProvider.UTF8STRING_POINTABLE_INSTANCE
                             .createBinaryComparator();
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
+                    private ISerializerDeserializer<AMissing> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
+                            .getSerializerDeserializer(BuiltinType.AMISSING);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -85,7 +85,7 @@
                                 if (utf8BinaryComparator.compare(serString, offset + 1, len - 1, NULL, 0,
                                         NULL.length) == 0) {
                                     resultStorage.reset();
-                                    nullSerde.serialize(ANull.NULL, out);
+                                    nullSerde.serialize(AMissing.MISSING, out);
                                     result.set(resultStorage);
                                     return;
                                 } else {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java
index f0cea4b..b7982da 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java
@@ -23,7 +23,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutablePoint3D;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.APoint3D;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -71,9 +70,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<APoint3D> point3DSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.APOINT3D);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -94,8 +90,6 @@
                                         Double.parseDouble(s.substring(firstCommaIndex + 1, secondCommaIndex)),
                                         Double.parseDouble(s.substring(secondCommaIndex + 1, s.length())));
                                 point3DSerde.serialize(aPoint3D, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java
index 32d1ae6..78ac2da 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java
@@ -23,7 +23,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutablePoint;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.APoint;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -70,9 +69,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<APoint> pointSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.APOINT);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -91,8 +87,6 @@
                                 aPoint.setValue(Double.parseDouble(s.substring(0, s.indexOf(','))),
                                         Double.parseDouble(s.substring(s.indexOf(',') + 1, s.length())));
                                 pointSerde.serialize(aPoint, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java
index fc163ad..0735e37 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java
@@ -22,20 +22,16 @@
 import java.io.IOException;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.APointSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.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.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -65,9 +61,6 @@
                     private IPointable inputArg = new VoidPointable();
                     private IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
                     private String errorMessage = "This can not be an instance of polygon";
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -93,8 +86,6 @@
                                     APointSerializerDeserializer.serialize(Double.parseDouble(points[i].split(",")[0]),
                                             Double.parseDouble(points[i].split(",")[1]), out);
                                 }
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java
index b2dbe1e..e6eb5c1 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutablePoint;
 import org.apache.asterix.om.base.AMutableRectangle;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ARectangle;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -72,9 +71,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ARectangle> rectangle2DSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ARECTANGLE);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -106,8 +102,6 @@
                                             "Rectangle arugment must be either (bottom left point, top right point) or (top right point, bottom left point)");
                                 }
                                 rectangle2DSerde.serialize(aRectangle, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java
index 6399ace..930b584 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java
@@ -28,20 +28,16 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.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.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -72,9 +68,6 @@
                     private DataOutput out = resultStorage.getDataOutput();
                     private IPointable inputArg = new VoidPointable();
                     private IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private UTF8StringBuilder builder = new UTF8StringBuilder();
                     private GrowableArray baaos = new GrowableArray();
 
@@ -89,10 +82,7 @@
                             int len = inputArg.getLength();
 
                             ATypeTag tt = ATypeTag.VALUE_TYPE_MAPPING[serString[offset]];
-                            if (tt == ATypeTag.NULL) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                            } else if (tt == ATypeTag.STRING) {
+                            if (tt == ATypeTag.STRING) {
                                 result.set(inputArg);
                             } else {
                                 builder.reset(baaos, len);
@@ -134,7 +124,7 @@
                                         break;
                                     }
 
-                                        // NotYetImplemented
+                                    // NotYetImplemented
                                     case CIRCLE:
                                     case DATE:
                                     case DATETIME:
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
index ed8051d..a296ae9 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
@@ -23,7 +23,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 import org.apache.asterix.om.base.temporal.ATimeParserFactory;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
@@ -72,9 +71,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -108,9 +104,6 @@
 
                                 aTime.setValue(chrononTimeInMs);
                                 timeSerde.serialize(aTime, out);
-
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AUUIDFromStringConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AUUIDFromStringConstructorDescriptor.java
index e058813..44140fb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AUUIDFromStringConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AUUIDFromStringConstructorDescriptor.java
@@ -23,7 +23,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableUUID;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AUUID;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -75,9 +74,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AUUID> uuidSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AUUID);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
@@ -96,8 +92,6 @@
                                 int offset = utf8Ptr.getCharStartOffset();
                                 uuid.parseUUIDHexBytes(serString, offset);
                                 uuidSerde.serialize(uuid, out);
-                            } else if (serString[start] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AYearMonthDurationConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AYearMonthDurationConstructorDescriptor.java
index eaf8257..160043f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AYearMonthDurationConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/AYearMonthDurationConstructorDescriptor.java
@@ -22,7 +22,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableYearMonthDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AYearMonthDuration;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory.ADurationParseOption;
@@ -72,9 +71,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AYearMonthDuration> yearMonthDurationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AYEARMONTHDURATION);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
 
                     @Override
@@ -92,8 +88,6 @@
                                 ADurationParserFactory.parseDuration(serString, utf8Ptr.getCharStartOffset(),
                                         stringLength, aYearMonthDuration, ADurationParseOption.YEAR_MONTH);
                                 yearMonthDurationSerde.serialize(aYearMonthDuration, out);
-                            } else if (serString[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/OpenRecordConstructorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/OpenRecordConstructorDescriptor.java
index af3ba54..f6ff2d9 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/OpenRecordConstructorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/OpenRecordConstructorDescriptor.java
@@ -97,14 +97,20 @@
                             recBuilder.init();
                             for (int i = 0; i < evalFields.length; i++) {
                                 evalFields[i].evaluate(tuple, fieldValuePointable);
-                                if (openFields[i]) {
+                                byte[] data = fieldValuePointable.getByteArray();
+                                int offset = fieldValuePointable.getStartOffset();
+                                boolean openField = openFields[i];
+                                if (openField && data[offset] != ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                                    // MISSING for an open field means the field does not exist.
                                     evalNames[i].evaluate(tuple, fieldNamePointable);
                                     recBuilder.addField(fieldNamePointable, fieldValuePointable);
-                                } else {
-                                    if (fieldValuePointable.getByteArray()[fieldValuePointable
-                                            .getStartOffset()] != ATypeTag.NULL.serialize()) {
-                                        recBuilder.addField(closedFieldId, fieldValuePointable);
-                                    }
+                                }
+                                if (!openField && data[offset] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                                    // Turns MISSING into NULL for a closed field.
+                                    data[offset] = ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+                                }
+                                if (!openField) {
+                                    recBuilder.addField(closedFieldId, fieldValuePointable);
                                     closedFieldId++;
                                 }
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java
index 4a5c59a..fd89493 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java
@@ -22,7 +22,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -56,9 +55,6 @@
     @SuppressWarnings({ "rawtypes" })
     private ISerializerDeserializer boolSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
-    @SuppressWarnings("unchecked")
-    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
 
     public AbstractBinaryStringBoolEval(IHyracksTaskContext context, IScalarEvaluatorFactory evalLeftFactory,
             IScalarEvaluatorFactory evalRightFactory, FunctionIdentifier funcID) throws AlgebricksException {
@@ -81,20 +77,11 @@
         int len1 = ptr1.getLength();
 
         resultStorage.reset();
-        try {
-            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                nullSerde.serialize(ANull.NULL, dout);
-                result.set(resultStorage);
-                return;
-            } else if (bytes0[offset0] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
-                throw new AlgebricksException(funcID.getName() + ": expects input type STRING or NULL, but got "
-                        + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]) + " and "
-                        + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1]) + ")!");
-            }
-        } catch (HyracksDataException e) {
-            throw new AlgebricksException(e);
+        if (bytes0[offset0] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
+            throw new AlgebricksException(funcID.getName() + ": expects input type STRING or NULL, but got "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]) + " and "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1]) + ")!");
         }
 
         leftPtr.set(bytes0, offset0 + 1, len0 - 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java
index 0d262fb..56b473e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java
@@ -43,7 +43,6 @@
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
@@ -136,21 +135,15 @@
                     @SuppressWarnings("unchecked")
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-
                         try {
                             resultStorage.reset();
                             resultType = 0;
                             int currentType = 0;
-                            for (int i = 0; i < args.length; i++) {
-                                IPointable argPtr;
-                                if (i == 0) {
-                                    evalLeft.evaluate(tuple, argPtr0);
-                                    argPtr = argPtr0;
-                                } else {
-                                    evalRight.evaluate(tuple, argPtr1);
-                                    argPtr = argPtr1;
-                                }
+                            evalLeft.evaluate(tuple, argPtr0);
+                            evalRight.evaluate(tuple, argPtr1);
 
+                            for (int i = 0; i < args.length; i++) {
+                                IPointable argPtr = i == 0 ? argPtr0 : argPtr1;
                                 byte[] bytes = argPtr.getByteArray();
                                 int offset = argPtr.getStartOffset();
 
@@ -197,16 +190,9 @@
                                     case DURATION:
                                     case YEARMONTHDURATION:
                                     case DAYTIMEDURATION:
-                                        evaluateTemporalArthmeticOperation(typeTag, tuple);
+                                        evaluateTemporalArthmeticOperation(typeTag);
                                         result.set(resultStorage);
                                         return;
-                                    case NULL: {
-                                        serde = AqlSerializerDeserializerProvider.INSTANCE
-                                                .getSerializerDeserializer(BuiltinType.ANULL);
-                                        serde.serialize(ANull.NULL, out);
-                                        result.set(resultStorage);
-                                        return;
-                                    }
                                     default: {
                                         throw new NotImplementedException(getIdentifier().getName()
                                                 + (i == 0 ? ": Left" : ": Right")
@@ -296,22 +282,14 @@
                     }
 
                     @SuppressWarnings("unchecked")
-                    private void evaluateTemporalArthmeticOperation(ATypeTag leftType, IFrameTupleReference tuple)
+                    private void evaluateTemporalArthmeticOperation(ATypeTag leftType)
                             throws HyracksDataException, AlgebricksException {
-                        evalRight.evaluate(tuple, argPtr1);
                         byte[] bytes1 = argPtr1.getByteArray();
                         int offset1 = argPtr1.getStartOffset();
                         ATypeTag rightType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1]);
                         byte[] bytes0 = argPtr0.getByteArray();
                         int offset0 = argPtr0.getStartOffset();
 
-                        if (leftType == ATypeTag.NULL || rightType == ATypeTag.NULL) {
-                            serde = AqlSerializerDeserializerProvider.INSTANCE
-                                    .getSerializerDeserializer(BuiltinType.ANULL);
-                            serde.serialize(ANull.NULL, out);
-                            return;
-                        }
-
                         if (rightType == leftType) {
 
                             serde = AqlSerializerDeserializerProvider.INSTANCE
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractQuadStringStringEval.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractQuadStringStringEval.java
index 0085461..daa9a54 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractQuadStringStringEval.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractQuadStringStringEval.java
@@ -26,7 +26,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableString;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -60,9 +59,6 @@
 
     private AMutableString resultBuffer = new AMutableString("");
     @SuppressWarnings("rawtypes")
-    private ISerializerDeserializer nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
-    @SuppressWarnings("rawtypes")
     private ISerializerDeserializer strSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ASTRING);
 
@@ -90,34 +86,20 @@
         eval3.evaluate(tuple, array3);
 
         resultStorage.reset();
-        try {
-            if (array0.getByteArray()[array0.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || array1.getByteArray()[array1.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || array2.getByteArray()[array2.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || array3.getByteArray()[array3.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                nullSerde.serialize(ANull.NULL, dout);
-                result.set(resultStorage);
-                return;
-            } else if (array0.getByteArray()[array0.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || array1.getByteArray()[array1.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || array2.getByteArray()[array2.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || array3.getByteArray()[array3.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
-                throw new AlgebricksException(funcID.getName()
-                        + ": expects input type (STRING/NULL, STRING/NULL, STRING/NULL, STRING/NULL), but got ("
-                        + EnumDeserializer.ATYPETAGDESERIALIZER
-                                .deserialize(array0.getByteArray()[array0.getStartOffset()])
-                        + ", "
-                        + EnumDeserializer.ATYPETAGDESERIALIZER
-                                .deserialize(array1.getByteArray()[array1.getStartOffset()])
-                        + ", "
-                        + EnumDeserializer.ATYPETAGDESERIALIZER
-                                .deserialize(array2.getByteArray()[array2.getStartOffset()])
-                        + ", " + EnumDeserializer.ATYPETAGDESERIALIZER
-                                .deserialize(array3.getByteArray()[array3.getStartOffset()])
-                        + ".");
-            }
-        } catch (HyracksDataException e) {
-            throw new AlgebricksException(e);
+        if (array0.getByteArray()[array0.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || array1.getByteArray()[array1.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || array2.getByteArray()[array2.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || array3.getByteArray()[array3.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
+            throw new AlgebricksException(funcID.getName()
+                    + ": expects input type (STRING/NULL, STRING/NULL, STRING/NULL, STRING/NULL), but got ("
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array0.getByteArray()[array0.getStartOffset()])
+                    + ", "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array1.getByteArray()[array1.getStartOffset()])
+                    + ", "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array2.getByteArray()[array2.getStartOffset()])
+                    + ", "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array3.getByteArray()[array3.getStartOffset()])
+                    + ".");
         }
 
         strPtr1st.set(array0.getByteArray(), array0.getStartOffset() + 1, array0.getLength());
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringBoolEval.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringBoolEval.java
index f1f07dd..6f1ce15 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringBoolEval.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringBoolEval.java
@@ -22,7 +22,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -53,9 +52,6 @@
     @SuppressWarnings("rawtypes")
     private ISerializerDeserializer boolSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
-    @SuppressWarnings("unchecked")
-    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
 
     private final FunctionIdentifier funcID;
 
@@ -65,7 +61,7 @@
 
     public AbstractTripleStringBoolEval(IHyracksTaskContext context, IScalarEvaluatorFactory eval0,
             IScalarEvaluatorFactory eval1, IScalarEvaluatorFactory eval2, FunctionIdentifier funcID)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         this.eval0 = eval0.createScalarEvaluator(context);
         this.eval1 = eval1.createScalarEvaluator(context);
         this.eval2 = eval2.createScalarEvaluator(context);
@@ -80,32 +76,17 @@
         eval2.evaluate(tuple, array2);
 
         resultStorage.reset();
-        try {
-            if (array0.getByteArray()[array0.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || array1.getByteArray()[array1.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || array2.getByteArray()[array2.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                nullSerde.serialize(ANull.NULL, dout);
-                result.set(resultStorage);
-                return;
-            }
-
-            if (array0.getByteArray()[array0.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || array1.getByteArray()[array1.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || array2.getByteArray()[array2.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
-                throw new AlgebricksException(
-                        funcID.getName() + ": expects iput type (STRING/NULL, STRING/NULL, STRING) but got ("
-                                + EnumDeserializer.ATYPETAGDESERIALIZER
-                                        .deserialize(array0.getByteArray()[array0.getStartOffset()])
-                                + ", "
-                                + EnumDeserializer.ATYPETAGDESERIALIZER
-                                        .deserialize(array1.getByteArray()[array1.getStartOffset()])
-                                + ", " + EnumDeserializer.ATYPETAGDESERIALIZER
-                                        .deserialize(array2.getByteArray()[array2.getStartOffset()])
-                                + ")");
-            }
-
-        } catch (HyracksDataException e) {
-            throw new AlgebricksException(e);
+        if (array0.getByteArray()[array0.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || array1.getByteArray()[array1.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || array2.getByteArray()[array2.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
+            throw new AlgebricksException(funcID.getName()
+                    + ": expects iput type (STRING/NULL, STRING/NULL, STRING/NULL) but got ("
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array0.getByteArray()[array0.getStartOffset()])
+                    + ", "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array1.getByteArray()[array1.getStartOffset()])
+                    + ", "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array2.getByteArray()[array2.getStartOffset()])
+                    + ")");
         }
 
         strPtr1st.set(array0.getByteArray(), array0.getStartOffset() + 1, array0.getLength());
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringStringEval.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringStringEval.java
index 7511b82..bcbee23 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringStringEval.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractTripleStringStringEval.java
@@ -22,7 +22,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableString;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -52,9 +51,6 @@
 
     private AMutableString resultBuffer = new AMutableString("");
     @SuppressWarnings("rawtypes")
-    private ISerializerDeserializer nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
-    @SuppressWarnings("rawtypes")
     private ISerializerDeserializer strSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ASTRING);
 
@@ -66,7 +62,7 @@
 
     public AbstractTripleStringStringEval(IHyracksTaskContext context, IScalarEvaluatorFactory eval0,
             IScalarEvaluatorFactory eval1, IScalarEvaluatorFactory eval2, FunctionIdentifier funcID)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         this.eval0 = eval0.createScalarEvaluator(context);
         this.eval1 = eval1.createScalarEvaluator(context);
         this.eval2 = eval2.createScalarEvaluator(context);
@@ -81,29 +77,17 @@
         eval2.evaluate(tuple, array2);
 
         resultStorage.reset();
-        try {
-            if (array0.getByteArray()[array0.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || array1.getByteArray()[array1.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                    || array2.getByteArray()[array2.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                nullSerde.serialize(ANull.NULL, dout);
-                result.set(resultStorage);
-                return;
-            } else if (array0.getByteArray()[array0.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || array1.getByteArray()[array1.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                    || array2.getByteArray()[array2.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
-                throw new AlgebricksException(
-                        funcID.getName() + ": expects input type (STRING/NULL, STRING/NULL, STRING/NULL), but got ("
-                                + EnumDeserializer.ATYPETAGDESERIALIZER
-                                        .deserialize(array0.getByteArray()[array0.getStartOffset()])
-                                + ", "
-                                + EnumDeserializer.ATYPETAGDESERIALIZER
-                                        .deserialize(array1.getByteArray()[array1.getStartOffset()])
-                                + ", " + EnumDeserializer.ATYPETAGDESERIALIZER
-                                        .deserialize(array2.getByteArray()[array2.getStartOffset()])
-                                + ".");
-            }
-        } catch (HyracksDataException e) {
-            throw new AlgebricksException(e);
+        if (array0.getByteArray()[array0.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || array1.getByteArray()[array1.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                || array2.getByteArray()[array2.getStartOffset()] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
+            throw new AlgebricksException(funcID.getName()
+                    + ": expects input type (STRING/NULL, STRING/NULL, STRING/NULL), but got ("
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array0.getByteArray()[array0.getStartOffset()])
+                    + ", "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array1.getByteArray()[array1.getStartOffset()])
+                    + ", "
+                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(array2.getByteArray()[array2.getStartOffset()])
+                    + ".");
         }
 
         strPtr1st.set(array0.getByteArray(), array0.getStartOffset() + 1, array0.getLength());
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java
index 01abb1b..7150517 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AndDescriptor.java
@@ -23,6 +23,7 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ABooleanSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -80,6 +81,9 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ANULL);
+                    @SuppressWarnings("unchecked")
+                    private ISerializerDeserializer<AMissing> missingSerde = AqlSerializerDeserializerProvider.INSTANCE
+                            .getSerializerDeserializer(BuiltinType.AMISSING);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -88,25 +92,40 @@
                             int n = args.length;
                             boolean res = true;
                             boolean metNull = false;
+                            boolean metMissing = false;
                             for (int i = 0; i < n; i++) {
                                 evals[i].evaluate(tuple, argPtr);
                                 byte[] bytes = argPtr.getByteArray();
                                 int offset = argPtr.getStartOffset();
-
+                                boolean isNull = false;
+                                boolean isMissing = false;
+                                if (bytes[offset] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                                    isMissing = true;
+                                    metMissing = true;
+                                }
                                 if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
+                                    isNull = true;
                                     metNull = true;
+                                }
+                                if (isMissing || isNull) {
                                     continue;
                                 }
                                 boolean argResult = ABooleanSerializerDeserializer.getBoolean(bytes, offset + 1);
-                                res = res && argResult;
-                            }
-                            if (metNull) {
-                                if (!res) {
-                                    ABoolean aResult = ABoolean.FALSE;
-                                    booleanSerde.serialize(aResult, out);
-                                } else {
-                                    nullSerde.serialize(ANull.NULL, out);
+                                if (argResult == false) {
+                                    // anything AND FALSE = FALSE
+                                    booleanSerde.serialize(ABoolean.FALSE, out);
+                                    result.set(resultStorage);
+                                    return;
                                 }
+                                res &= argResult;
+                            }
+                            if (metMissing) {
+                                // MISSING AND NULL = MISSING
+                                // MISSING AND TRUE = MISSING
+                                missingSerde.serialize(AMissing.MISSING, out);
+                            } else if (metNull) {
+                                // NULL AND TRUE = NULL
+                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 ABoolean aResult = res ? (ABoolean.TRUE) : (ABoolean.FALSE);
                                 booleanSerde.serialize(aResult, out);
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 546eebd..16cec14 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
@@ -24,13 +24,10 @@
 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.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 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.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
@@ -39,7 +36,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -86,9 +82,6 @@
                 private DataOutput out = resultStorage.getDataOutput();
                 private IPointable inputArgList = new VoidPointable();
                 private IScalarEvaluator evalList = listEvalFactory.createScalarEvaluator(ctx);
-                @SuppressWarnings("unchecked")
-                private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                        .getSerializerDeserializer(BuiltinType.ANULL);
                 private int itemOffset;
                 private int itemLength;
 
@@ -101,12 +94,6 @@
                         byte[] serList = inputArgList.getByteArray();
                         int offset = inputArgList.getStartOffset();
 
-                        if (serList[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                            nullSerde.serialize(ANull.NULL, out);
-                            result.set(resultStorage);
-                            return;
-                        }
-
                         if (serList[offset] != ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG
                                 && serList[offset] != ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG) {
                             throw new AlgebricksException(AsterixBuiltinFunctions.ANY_COLLECTION_MEMBER.getName()
@@ -116,14 +103,14 @@
 
                         if (serList[offset] == ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG) {
                             if (AOrderedListSerializerDeserializer.getNumberOfItems(serList, offset) == 0) {
-                                out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                                out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
                                 result.set(resultStorage);
                                 return;
                             }
                             itemOffset = AOrderedListSerializerDeserializer.getItemOffset(serList, offset, 0);
                         } else {
                             if (AUnorderedListSerializerDeserializer.getNumberOfItems(serList, offset) == 0) {
-                                out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                                out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
                                 result.set(resultStorage);
                                 return;
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NotNullDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CheckUnknownDescriptor.java
similarity index 91%
rename from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NotNullDescriptor.java
rename to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CheckUnknownDescriptor.java
index 45fc04c..abd0d3a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NotNullDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CheckUnknownDescriptor.java
@@ -38,13 +38,13 @@
  * If the input is not null, just return it directly;
  * Otherwise, throw a runtime exception.
  */
-public class NotNullDescriptor extends AbstractScalarFunctionDynamicDescriptor {
+public class CheckUnknownDescriptor extends AbstractScalarFunctionDynamicDescriptor {
 
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new NotNullDescriptor();
+            return new CheckUnknownDescriptor();
         }
     };
 
@@ -58,7 +58,7 @@
                 return new IScalarEvaluator() {
                     private IPointable inputArg = new VoidPointable();
                     private IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
-                    private String errorMessage = AsterixBuiltinFunctions.NOT_NULL
+                    private String errorMessage = AsterixBuiltinFunctions.CHECK_UNKNOWN
                             + ": the input value cannot be NULL.";
 
                     @Override
@@ -67,7 +67,8 @@
                         byte[] data = inputArg.getByteArray();
                         int offset = inputArg.getStartOffset();
 
-                        if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
+                        if (data[offset] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG
+                                || data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
                             throw new AlgebricksException(errorMessage);
                         }
                         result.set(inputArg);
@@ -79,7 +80,7 @@
 
     @Override
     public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.NOT_NULL;
+        return AsterixBuiltinFunctions.CHECK_UNKNOWN;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePointDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePointDescriptor.java
index b65c5c0..6d37152 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePointDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CreatePointDescriptor.java
@@ -22,10 +22,8 @@
 import java.io.IOException;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
-import org.apache.asterix.dataflow.data.nontagged.serde.ANullSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutablePoint;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.APoint;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -86,10 +84,8 @@
                         int offset1 = inputArg1.getStartOffset();
 
                         // type-check: (double, double)
-                        if ((bytes0[offset0] != ATypeTag.SERIALIZED_DOUBLE_TYPE_TAG
-                                && bytes0[offset0] != ATypeTag.SERIALIZED_NULL_TYPE_TAG)
-                                || (bytes1[offset1] != ATypeTag.SERIALIZED_DOUBLE_TYPE_TAG
-                                        && bytes1[offset1] != ATypeTag.SERIALIZED_NULL_TYPE_TAG)) {
+                        if (bytes0[offset0] != ATypeTag.SERIALIZED_DOUBLE_TYPE_TAG
+                                || bytes1[offset1] != ATypeTag.SERIALIZED_DOUBLE_TYPE_TAG) {
                             throw new AlgebricksException(AsterixBuiltinFunctions.CREATE_POINT.getName()
                                     + ": expects input type: (DOUBLE, DOUBLE) but got ("
                                     + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]) + ", "
@@ -98,14 +94,9 @@
 
                         resultStorage.reset();
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                ANullSerializerDeserializer.INSTANCE.serialize(ANull.NULL, out);
-                            } else {
-                                aPoint.setValue(ADoubleSerializerDeserializer.getDouble(bytes0, offset0 + 1),
-                                        ADoubleSerializerDeserializer.getDouble(bytes1, offset1 + 1));
-                                pointSerde.serialize(aPoint, out);
-                            }
+                            aPoint.setValue(ADoubleSerializerDeserializer.getDouble(bytes0, offset0 + 1),
+                                    ADoubleSerializerDeserializer.getDouble(bytes1, offset1 + 1));
+                            pointSerde.serialize(aPoint, out);
                         } catch (IOException e1) {
                             throw new AlgebricksException(e1);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/DeepEqualityDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/DeepEqualityDescriptor.java
index 174deb1..dec8829 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/DeepEqualityDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/DeepEqualityDescriptor.java
@@ -76,9 +76,9 @@
                 final DataOutput out = resultStorage.getDataOutput();
                 final IScalarEvaluator evalLeft = evalFactoryLeft.createScalarEvaluator(ctx);
                 final IScalarEvaluator evalRight = evalFactoryRight.createScalarEvaluator(ctx);
-                final DeepEqualAssessor deepEqualAssessor = new DeepEqualAssessor();
 
                 return new IScalarEvaluator() {
+                    private final DeepEqualAssessor deepEqualAssessor = new DeepEqualAssessor();
                     private final PointableAllocator allocator = new PointableAllocator();
                     private final IVisitablePointable pointableLeft = allocator.allocateFieldValue(inputTypeLeft);
                     private final IVisitablePointable pointableRight = allocator.allocateFieldValue(inputTypeRight);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceListIsFilterable.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceListIsFilterableDescriptor.java
similarity index 80%
rename from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceListIsFilterable.java
rename to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceListIsFilterableDescriptor.java
index 01ddb55..a4c4311 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceListIsFilterable.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceListIsFilterableDescriptor.java
@@ -46,20 +46,21 @@
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 /**
- * Checks whether a list with an edit distance threshold can be filtered with a lower bounding on the number of common list elements.
- * This function returns 'true' if the lower bound on the number of common elements is positive, 'false' otherwise.
- * For example, this function is used during an indexed nested-loop join based on edit distance. We partition the tuples of the probing
- * dataset into those that are filterable and those that are not. Those that are filterable are forwarded to the index. The others are
- * are fed into a (non indexed) nested-loop join.
+ * Checks whether a list with an edit distance threshold can be filtered with a lower bounding on the number
+ * of common list elements. This function returns 'true' if the lower bound on the number of common elements
+ * is positive, 'false' otherwise. For example, this function is used during an indexed nested-loop join based
+ * on edit distance. We partition the tuples of the probing dataset into those that are filterable and those
+ * that are not. Those that are filterable are forwarded to the index. The others are are fed into a (non
+ * indexed) nested-loop join.
  */
-public class EditDistanceListIsFilterable extends AbstractScalarFunctionDynamicDescriptor {
+public class EditDistanceListIsFilterableDescriptor extends AbstractScalarFunctionDynamicDescriptor {
 
     private static final long serialVersionUID = 1L;
 
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EditDistanceListIsFilterable();
+            return new EditDistanceListIsFilterableDescriptor();
         }
     };
 
@@ -83,7 +84,8 @@
 
     private static class EditDistanceListIsFilterableEvaluator implements IScalarEvaluator {
 
-        protected final IPointable argPtr = new VoidPointable();
+        protected final IPointable listPtr = new VoidPointable();
+        protected final IPointable edThreshPtr = new VoidPointable();
         protected final ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
         protected final DataOutput output = resultStorage.getDataOutput();
 
@@ -103,36 +105,32 @@
         @Override
         public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
             resultStorage.reset();
-            ATypeTag typeTag = null;
+
+            listEval.evaluate(tuple, listPtr);
+            edThreshEval.evaluate(tuple, edThreshPtr);
 
             // Check type and compute string length.
-            listEval.evaluate(tuple, argPtr);
-            byte[] bytes = argPtr.getByteArray();
-            int offset = argPtr.getStartOffset();
+            byte[] bytes = listPtr.getByteArray();
+            int offset = listPtr.getStartOffset();
 
-            typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
-            long listLen = 0;
+            ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
+            long listLen;
             switch (typeTag) {
-                case UNORDEREDLIST: {
+                case UNORDEREDLIST:
                     listLen = AUnorderedListSerializerDeserializer.getNumberOfItems(bytes, offset);
                     break;
-                }
-                case ORDEREDLIST: {
+                case ORDEREDLIST:
                     listLen = AOrderedListSerializerDeserializer.getNumberOfItems(bytes, offset);
                     break;
-                }
-                default: {
+                default:
                     throw new AlgebricksException(AsterixBuiltinFunctions.EDIT_DISTANCE_LIST_IS_FILTERABLE.getName()
                             + ": expects input type ORDEREDLIST or UNORDEREDLIST as the first argument, but got "
                             + typeTag + ".");
-                }
             }
 
             // Check type and extract edit-distance threshold.
-            edThreshEval.evaluate(tuple, argPtr);
-            bytes = argPtr.getByteArray();
-            offset = argPtr.getStartOffset();
-            typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
+            bytes = edThreshPtr.getByteArray();
+            offset = edThreshPtr.getStartOffset();
             long edThresh;
 
             try {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterable.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterable.java
deleted file mode 100644
index a707e46..0000000
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterable.java
+++ /dev/null
@@ -1,171 +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.evaluators.functions;
-
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ABoolean;
-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.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
-import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-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;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.BooleanPointable;
-import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
-import org.apache.hyracks.data.std.primitive.VoidPointable;
-import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
-
-/**
- * Checks whether a string with an edit distance threshold can be filtered with a lower bounding on number of common grams.
- * This function returns 'true' if the lower bound on the number of common grams is positive, 'false' otherwise.
- * For example, this function is used during an indexed nested-loop join based on edit distance. We partition the tuples of the probing
- * dataset into those that are filterable and those that are not. Those that are filterable are forwarded to the index. The others are
- * are fed into a (non indexed) nested-loop join.
- */
-public class EditDistanceStringIsFilterable extends AbstractScalarFunctionDynamicDescriptor {
-
-    private static final long serialVersionUID = 1L;
-    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
-        @Override
-        public IFunctionDescriptor createFunctionDescriptor() {
-            return new EditDistanceStringIsFilterable();
-        }
-    };
-
-    @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
-            throws AlgebricksException {
-        return new IScalarEvaluatorFactory() {
-            private static final long serialVersionUID = 1L;
-
-            @Override
-            public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                return new EditDistanceStringIsFilterableEvaluator(args, ctx);
-            }
-        };
-    }
-
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EDIT_DISTANCE_STRING_IS_FILTERABLE;
-    }
-
-    private static class EditDistanceStringIsFilterableEvaluator implements IScalarEvaluator {
-
-        protected final ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
-        protected final DataOutput output = resultStorage.getDataOutput();
-        protected final IPointable argPtr = new VoidPointable();
-
-        protected final IScalarEvaluator stringEval;
-        protected final IScalarEvaluator edThreshEval;
-        protected final IScalarEvaluator gramLenEval;
-        protected final IScalarEvaluator usePrePostEval;
-
-        @SuppressWarnings("unchecked")
-        private final ISerializerDeserializer<ABoolean> booleanSerde = AqlSerializerDeserializerProvider.INSTANCE
-                .getSerializerDeserializer(BuiltinType.ABOOLEAN);
-
-        private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
-
-        public EditDistanceStringIsFilterableEvaluator(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
-                throws AlgebricksException {
-            stringEval = args[0].createScalarEvaluator(context);
-            edThreshEval = args[1].createScalarEvaluator(context);
-            gramLenEval = args[2].createScalarEvaluator(context);
-            usePrePostEval = args[3].createScalarEvaluator(context);
-        }
-
-        @Override
-        public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-            resultStorage.reset();
-            ATypeTag typeTag = null;
-
-            // Check type and compute string length.
-            stringEval.evaluate(tuple, argPtr);
-            typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argPtr.getByteArray()[argPtr.getStartOffset()]);
-            if (!typeTag.equals(ATypeTag.STRING)) {
-                throw new AlgebricksException(AsterixBuiltinFunctions.EDIT_DISTANCE_STRING_IS_FILTERABLE.getName()
-                        + ": expects input type STRING as first argument, but got " + typeTag + ".");
-            }
-
-            utf8Ptr.set(argPtr.getByteArray(), argPtr.getStartOffset() + 1, argPtr.getLength());
-            int strLen = utf8Ptr.getStringLength();
-
-            // Check type and extract edit-distance threshold.
-            edThreshEval.evaluate(tuple, argPtr);
-            typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argPtr.getByteArray()[argPtr.getStartOffset()]);
-
-            long edThresh = 0;
-
-            try {
-                edThresh = ATypeHierarchy.getIntegerValue(argPtr.getByteArray(), argPtr.getStartOffset());
-            } catch (HyracksDataException e1) {
-                throw new AlgebricksException(e1);
-            }
-
-            // Check type and extract gram length.
-            gramLenEval.evaluate(tuple, argPtr);
-            typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argPtr.getByteArray()[argPtr.getStartOffset()]);
-
-            long gramLen = 0;
-            try {
-                gramLen = ATypeHierarchy.getIntegerValue(argPtr.getByteArray(), argPtr.getStartOffset());
-            } catch (HyracksDataException e1) {
-                throw new AlgebricksException(e1);
-            }
-
-            // Check type and extract usePrePost flag.
-            usePrePostEval.evaluate(tuple, argPtr);
-            typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argPtr.getByteArray()[argPtr.getStartOffset()]);
-            if (!typeTag.equals(ATypeTag.BOOLEAN)) {
-                throw new AlgebricksException(AsterixBuiltinFunctions.EDIT_DISTANCE_STRING_IS_FILTERABLE.getName()
-                        + ": expects input type BOOLEAN as fourth argument, but got " + typeTag + ".");
-            }
-            boolean usePrePost = BooleanPointable.getBoolean(argPtr.getByteArray(), argPtr.getStartOffset() + 1);
-
-            // Compute result.
-            long numGrams = (usePrePost) ? strLen + gramLen - 1 : strLen - gramLen + 1;
-            long lowerBound = numGrams - edThresh * gramLen;
-            try {
-                if (lowerBound <= 0 || strLen == 0) {
-                    booleanSerde.serialize(ABoolean.FALSE, output);
-                } else {
-                    booleanSerde.serialize(ABoolean.TRUE, output);
-                }
-            } catch (IOException e) {
-                throw new AlgebricksException(e);
-            }
-            result.set(resultStorage);
-        }
-    }
-}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableDescriptor.java
similarity index 69%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableDescriptor.java
index 0bfa5a8..8944453 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableDescriptor.java
@@ -21,57 +21,46 @@
 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.types.IAType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
+/**
+ * Checks whether a string with an edit distance threshold can be filtered with a lower bounding
+ * on number of common grams. This function returns 'true' if the lower bound on the number of
+ * common grams is positive, 'false' otherwise. For example, this function is used during an indexed
+ * nested-loop join based on edit distance. We partition the tuples of the probing dataset into those
+ * that are filterable and those that are not. Those that are filterable are forwarded to the index.
+ * The others are fed into a (non indexed) nested-loop join.
+ */
+public class EditDistanceStringIsFilterableDescriptor extends AbstractScalarFunctionDynamicDescriptor {
 
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new EditDistanceStringIsFilterableDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
-    }
-
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
+            throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
-
-                    @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
-
-                    }
-                };
+                return new EditDistanceStringIsFilterableEvaluator(args, ctx);
             }
         };
     }
 
     @Override
     public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        return AsterixBuiltinFunctions.EDIT_DISTANCE_STRING_IS_FILTERABLE;
     }
-
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableEvaluator.java
new file mode 100644
index 0000000..595a85a
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableEvaluator.java
@@ -0,0 +1,132 @@
+/*
+ * 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.evaluators.functions;
+
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
+import org.apache.asterix.om.base.ABoolean;
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.data.std.primitive.BooleanPointable;
+import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
+import org.apache.hyracks.data.std.primitive.VoidPointable;
+import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public class EditDistanceStringIsFilterableEvaluator implements IScalarEvaluator {
+
+    protected final ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
+    protected final DataOutput output = resultStorage.getDataOutput();
+    protected final IPointable stringPtr = new VoidPointable();
+    protected final IPointable edThreshPtr = new VoidPointable();
+    protected final IPointable gramLenPtr = new VoidPointable();
+    protected final IPointable usePrePostPtr = new VoidPointable();
+
+    protected final IScalarEvaluator stringEval;
+    protected final IScalarEvaluator edThreshEval;
+    protected final IScalarEvaluator gramLenEval;
+    protected final IScalarEvaluator usePrePostEval;
+
+    @SuppressWarnings("unchecked")
+    private final ISerializerDeserializer<ABoolean> booleanSerde = AqlSerializerDeserializerProvider.INSTANCE
+            .getSerializerDeserializer(BuiltinType.ABOOLEAN);
+
+    private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
+
+    public EditDistanceStringIsFilterableEvaluator(IScalarEvaluatorFactory[] args, IHyracksTaskContext context)
+            throws AlgebricksException {
+        stringEval = args[0].createScalarEvaluator(context);
+        edThreshEval = args[1].createScalarEvaluator(context);
+        gramLenEval = args[2].createScalarEvaluator(context);
+        usePrePostEval = args[3].createScalarEvaluator(context);
+    }
+
+    @Override
+    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
+        resultStorage.reset();
+
+        stringEval.evaluate(tuple, stringPtr);
+        edThreshEval.evaluate(tuple, edThreshPtr);
+        gramLenEval.evaluate(tuple, gramLenPtr);
+        usePrePostEval.evaluate(tuple, usePrePostPtr);
+
+        // Check type and compute string length.
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(stringPtr.getByteArray()[stringPtr.getStartOffset()]);
+        if (!typeTag.equals(ATypeTag.STRING)) {
+            throw new AlgebricksException(AsterixBuiltinFunctions.EDIT_DISTANCE_STRING_IS_FILTERABLE.getName()
+                    + ": expects input type STRING as first argument, but got " + typeTag + ".");
+        }
+        utf8Ptr.set(stringPtr.getByteArray(), stringPtr.getStartOffset() + 1, stringPtr.getLength());
+        int strLen = utf8Ptr.getStringLength();
+
+        // Check type and extract edit-distance threshold.
+        long edThresh = 0;
+        try {
+            edThresh = ATypeHierarchy.getIntegerValue(edThreshPtr.getByteArray(), edThreshPtr.getStartOffset());
+        } catch (HyracksDataException e1) {
+            throw new AlgebricksException(e1);
+        }
+
+        // Check type and extract gram length.
+        long gramLen = 0;
+        try {
+            gramLen = ATypeHierarchy.getIntegerValue(gramLenPtr.getByteArray(), gramLenPtr.getStartOffset());
+        } catch (HyracksDataException e1) {
+            throw new AlgebricksException(e1);
+        }
+
+        // Check type and extract usePrePost flag.
+        typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
+                .deserialize(usePrePostPtr.getByteArray()[usePrePostPtr.getStartOffset()]);
+        if (!typeTag.equals(ATypeTag.BOOLEAN)) {
+            throw new AlgebricksException(AsterixBuiltinFunctions.EDIT_DISTANCE_STRING_IS_FILTERABLE.getName()
+                    + ": expects input type BOOLEAN as fourth argument, but got " + typeTag + ".");
+        }
+        boolean usePrePost = BooleanPointable.getBoolean(usePrePostPtr.getByteArray(),
+                usePrePostPtr.getStartOffset() + 1);
+
+        // Compute result.
+        long numGrams = usePrePost ? strLen + gramLen - 1 : strLen - gramLen + 1;
+        long lowerBound = numGrams - edThresh * gramLen;
+        try {
+            if (lowerBound <= 0 || strLen == 0) {
+                booleanSerde.serialize(ABoolean.FALSE, output);
+            } else {
+                booleanSerde.serialize(ABoolean.TRUE, output);
+            }
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+        result.set(resultStorage);
+    }
+}
\ No newline at end of file
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/FlowRecordDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/FlowRecordDescriptor.java
deleted file mode 100644
index 5c9d8ef..0000000
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/FlowRecordDescriptor.java
+++ /dev/null
@@ -1,91 +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.evaluators.functions;
-
-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.PointableAllocator;
-import org.apache.asterix.om.pointables.base.IVisitablePointable;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-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;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.VoidPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
-
-public class FlowRecordDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
-    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
-        @Override
-        public IFunctionDescriptor createFunctionDescriptor() {
-            return new FlowRecordDescriptor();
-        }
-    };
-
-    private static final long serialVersionUID = 1L;
-    private ARecordType inputType;
-
-    public void reset(ARecordType inputType) {
-        this.inputType = inputType;
-    }
-
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.FLOW_RECORD;
-    }
-
-    @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
-        final IScalarEvaluatorFactory recordEvalFactory = args[0];
-
-        return new IScalarEvaluatorFactory() {
-            private static final long serialVersionUID = 1L;
-
-            @Override
-            public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
-                final IPointable recordPtr = new VoidPointable();
-                final IScalarEvaluator recEvaluator = recordEvalFactory.createScalarEvaluator(ctx);
-
-                return new IScalarEvaluator() {
-                    // pointable allocator
-                    private PointableAllocator allocator = new PointableAllocator();
-                    final IVisitablePointable recAccessor = allocator.allocateRecordValue(inputType);
-
-                    @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        try {
-                            recEvaluator.evaluate(tuple, recordPtr);
-                            recAccessor.set(recordPtr);
-                            result.set(recAccessor);
-                        } catch (Exception ioe) {
-                            throw new AlgebricksException(ioe);
-                        }
-                    }
-                };
-            }
-        };
-    }
-
-}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/FuzzyEqDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/FuzzyEqDescriptor.java
deleted file mode 100644
index eaa6028..0000000
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/FuzzyEqDescriptor.java
+++ /dev/null
@@ -1,49 +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.evaluators.functions;
-
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.om.functions.IFunctionDescriptor;
-import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
-import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
-
-public class FuzzyEqDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
-    private static final long serialVersionUID = 1L;
-    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
-        public IFunctionDescriptor createFunctionDescriptor() {
-            return new FuzzyEqDescriptor();
-        }
-    };
-
-    @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(IScalarEvaluatorFactory[] args) throws AlgebricksException {
-        throw new NotImplementedException();
-    }
-
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.FUZZY_EQ;
-    }
-
-}
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 020336f..88b8a51 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
@@ -85,7 +85,7 @@
                 private IPointable inputArgIdx = new VoidPointable();
                 private IScalarEvaluator evalList = listEvalFactory.createScalarEvaluator(ctx);
                 private IScalarEvaluator evalIdx = indexEvalFactory.createScalarEvaluator(ctx);
-                private byte[] nullBytes = new byte[] { ATypeTag.SERIALIZED_NULL_TYPE_TAG };
+                private byte[] missingBytes = new byte[] { ATypeTag.SERIALIZED_MISSING_TYPE_TAG };
                 private int itemIndex;
                 private int itemOffset;
                 private int itemLength;
@@ -102,11 +102,6 @@
                         byte[] indexBytes = inputArgIdx.getByteArray();
                         int indexOffset = inputArgIdx.getStartOffset();
 
-                        if (serOrderedList[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                            result.set(nullBytes, 0, 1);
-                            return;
-                        }
-
                         if (serOrderedList[offset] == ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG) {
                             itemIndex = ATypeHierarchy.getIntegerValue(indexBytes, indexOffset);
                         } else {
@@ -118,14 +113,12 @@
                                     + ").");
                         }
 
-                        if (itemIndex >= AOrderedListSerializerDeserializer.getNumberOfItems(serOrderedList, offset)) {
-                            result.set(nullBytes, 0, 1);
+                        if (itemIndex < 0 || itemIndex >= AOrderedListSerializerDeserializer
+                                .getNumberOfItems(serOrderedList, offset)) {
+                            // Out-of-bound index access should return MISSING.
+                            result.set(missingBytes, 0, 1);
                             return;
                         }
-                        if (itemIndex < 0) {
-                            throw new AlgebricksException(
-                                    AsterixBuiltinFunctions.GET_ITEM.getName() + ": item index cannot be negative!");
-                        }
 
                         itemTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serOrderedList[offset + 1]);
                         if (itemTag == ATypeTag.ANY) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsMissingDescriptor.java
similarity index 70%
rename from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
rename to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsMissingDescriptor.java
index 0bfa5a8..45c3f6d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsMissingDescriptor.java
@@ -21,48 +21,38 @@
 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.types.IAType;
+import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
+import org.apache.asterix.runtime.evaluators.common.AbstractTypeCheckEvaluator;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class IsMissingDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new IsMissingDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
-    }
-
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
+            throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
-            public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+            public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
+                final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
+                return new AbstractTypeCheckEvaluator(eval) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
-
+                    protected boolean isMatch(byte typeTag) {
+                        return typeTag == ATypeTag.SERIALIZED_MISSING_TYPE_TAG;
                     }
                 };
             }
@@ -71,7 +61,7 @@
 
     @Override
     public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        return AsterixBuiltinFunctions.IS_MISSING;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsNullDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsNullDescriptor.java
index a528dae..3ae3bd9 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsNullDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsNullDescriptor.java
@@ -18,25 +18,17 @@
  */
 package org.apache.asterix.runtime.evaluators.functions;
 
-import java.io.DataOutput;
-
-import org.apache.asterix.dataflow.data.nontagged.serde.AObjectSerializerDeserializer;
-import org.apache.asterix.om.base.ABoolean;
 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.types.ATypeTag;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
+import org.apache.asterix.runtime.evaluators.common.AbstractTypeCheckEvaluator;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.VoidPointable;
-import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 public class IsNullDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
@@ -51,32 +43,16 @@
     public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
             throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
             public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
-                return new IScalarEvaluator() {
-
-                    private ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
-                    private DataOutput out = resultStorage.getDataOutput();
-                    private IPointable argPtr = new VoidPointable();
-                    private IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
-                    private final AObjectSerializerDeserializer aObjSerDer = AObjectSerializerDeserializer.INSTANCE;
+                final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
+                return new AbstractTypeCheckEvaluator(eval) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        eval.evaluate(tuple, argPtr);
-                        boolean isNull = argPtr.getByteArray()[argPtr
-                                .getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG;
-                        ABoolean res = isNull ? ABoolean.TRUE : ABoolean.FALSE;
-                        try {
-                            resultStorage.reset();
-                            aObjSerDer.serialize(res, out);
-                            result.set(resultStorage);
-                        } catch (HyracksDataException e) {
-                            throw new AlgebricksException(e);
-                        }
+                    protected boolean isMatch(byte typeTag) {
+                        return typeTag == ATypeTag.SERIALIZED_NULL_TYPE_TAG;
                     }
                 };
             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsUnknownDescriptor.java
similarity index 70%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsUnknownDescriptor.java
index 0bfa5a8..be04c86 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/EmbedTypeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IsUnknownDescriptor.java
@@ -21,48 +21,39 @@
 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.types.IAType;
+import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
+import org.apache.asterix.runtime.evaluators.common.AbstractTypeCheckEvaluator;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class EmbedTypeDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+public class IsUnknownDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new EmbedTypeDescriptor();
+            return new IsUnknownDescriptor();
         }
     };
 
-    @SuppressWarnings("unused")
-    private IAType fieldType;
-
-    public void reset(IAType fieldType) {
-        this.fieldType = fieldType;
-    }
-
     @Override
-    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args) {
+    public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
+            throws AlgebricksException {
         return new IScalarEvaluatorFactory() {
-
             private static final long serialVersionUID = 1L;
 
             @Override
-            public IScalarEvaluator createScalarEvaluator(IHyracksTaskContext ctx) throws AlgebricksException {
-                // TODO Auto-generated method stub
-                return new IScalarEvaluator() {
+            public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
+                final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
+                return new AbstractTypeCheckEvaluator(eval) {
 
                     @Override
-                    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-                        // TODO Auto-generated method stub
-
+                    protected boolean isMatch(byte typeTag) {
+                        return typeTag == ATypeTag.SERIALIZED_NULL_TYPE_TAG
+                                || typeTag == ATypeTag.SERIALIZED_MISSING_TYPE_TAG;
                     }
                 };
             }
@@ -71,7 +62,7 @@
 
     @Override
     public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.EMBED_TYPE;
+        return AsterixBuiltinFunctions.IS_UNKOWN;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/LenDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/LenDescriptor.java
index d42d96f..c681d78 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/LenDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/LenDescriptor.java
@@ -26,7 +26,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -40,7 +39,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -77,9 +75,6 @@
                     @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<AInt64> int64Serde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -88,16 +83,6 @@
                         byte[] serList = inputVal.getByteArray();
                         int offset = inputVal.getStartOffset();
 
-                        if (serList[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                            try {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } catch (HyracksDataException e) {
-                                throw new AlgebricksException(e);
-                            }
-                            result.set(resultStorage);
-                            return;
-                        }
-
                         if (serList[offset] != ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG
                                 && serList[offset] != ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG) {
                             throw new AlgebricksException(AsterixBuiltinFunctions.LEN.getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NotDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NotDescriptor.java
index f05c2ed..fb209a9 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NotDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NotDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ABooleanSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -77,9 +76,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ABoolean> booleanSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -94,8 +90,6 @@
                                 boolean argRes = ABooleanSerializerDeserializer.getBoolean(bytes, offset + 1);
                                 ABoolean aResult = argRes ? (ABoolean.FALSE) : (ABoolean.TRUE);
                                 booleanSerde.serialize(aResult, out);
-                            } else if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(errorMessage);
                             }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericAbsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericAbsDescriptor.java
index 47c78d6..373547e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericAbsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericAbsDescriptor.java
@@ -38,7 +38,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -105,11 +104,7 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                serde = AqlSerializerDeserializerProvider.INSTANCE
-                                        .getSerializerDeserializer(BuiltinType.ANULL);
-                                serde.serialize(ANull.NULL, out);
-                            } else if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
+                            if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
                                 serde = AqlSerializerDeserializerProvider.INSTANCE
                                         .getSerializerDeserializer(BuiltinType.AINT8);
                                 byte val = AInt8SerializerDeserializer.getByte(data, offset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericFloorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericFloorDescriptor.java
index 0c6aae9..336bf15 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericFloorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericFloorDescriptor.java
@@ -38,7 +38,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -105,11 +104,7 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                serde = AqlSerializerDeserializerProvider.INSTANCE
-                                        .getSerializerDeserializer(BuiltinType.ANULL);
-                                serde.serialize(ANull.NULL, out);
-                            } else if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
+                            if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
                                 serde = AqlSerializerDeserializerProvider.INSTANCE
                                         .getSerializerDeserializer(BuiltinType.AINT8);
                                 byte val = AInt8SerializerDeserializer.getByte(data, offset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericModuloDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericModuloDescriptor.java
index 1bc936c..d40cb70 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericModuloDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericModuloDescriptor.java
@@ -33,7 +33,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -84,8 +83,8 @@
                 return new IScalarEvaluator() {
                     private ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
                     private DataOutput out = resultStorage.getDataOutput();
-                    // one temp. buffer re-used by both children
-                    private IPointable argPtr = new VoidPointable();
+                    private IPointable leftPtr = new VoidPointable();
+                    private IPointable rightPtr = new VoidPointable();
                     private IScalarEvaluator evalLeft = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator evalRight = args[1].createScalarEvaluator(ctx);
                     private double[] operands = new double[args.length];
@@ -107,12 +106,10 @@
 
                         try {
                             resultStorage.reset();
+                            evalLeft.evaluate(tuple, leftPtr);
+                            evalRight.evaluate(tuple, rightPtr);
                             for (int i = 0; i < args.length; i++) {
-                                if (i == 0) {
-                                    evalLeft.evaluate(tuple, argPtr);
-                                } else {
-                                    evalRight.evaluate(tuple, argPtr);
-                                }
+                                IPointable argPtr = i == 0 ? leftPtr : rightPtr;
                                 byte[] data = argPtr.getByteArray();
                                 int offset = argPtr.getStartOffset();
                                 typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(data[offset]);
@@ -147,13 +144,6 @@
                                         operands[i] = ADoubleSerializerDeserializer.getDouble(data, offset + 1);
                                         break;
                                     }
-                                    case NULL: {
-                                        serde = AqlSerializerDeserializerProvider.INSTANCE
-                                                .getSerializerDeserializer(BuiltinType.ANULL);
-                                        serde.serialize(ANull.NULL, out);
-                                        result.set(resultStorage);
-                                        return;
-                                    }
                                     default: {
                                         throw new NotImplementedException(AsterixBuiltinFunctions.NUMERIC_MOD.getName()
                                                 + (i == 0 ? ": left" : ": right") + " operand can not be "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundDescriptor.java
index b05ff65..773ba27 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundDescriptor.java
@@ -38,7 +38,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -105,11 +104,7 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                serde = AqlSerializerDeserializerProvider.INSTANCE
-                                        .getSerializerDeserializer(BuiltinType.ANULL);
-                                serde.serialize(ANull.NULL, out);
-                            } else if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
+                            if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
                                 serde = AqlSerializerDeserializerProvider.INSTANCE
                                         .getSerializerDeserializer(BuiltinType.AINT8);
                                 byte val = AInt8SerializerDeserializer.getByte(data, offset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEven2Descriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEven2Descriptor.java
index a1acb14..d39478d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEven2Descriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEven2Descriptor.java
@@ -39,7 +39,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -87,7 +86,8 @@
 
                     private ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
                     private DataOutput out = resultStorage.getDataOutput();
-                    private IPointable argPtr = new VoidPointable();
+                    private IPointable argValue = new VoidPointable();
+                    private IPointable argPrecision = new VoidPointable();
                     private IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator precision = args[1].createScalarEvaluator(ctx);
                     private AMutableDouble aDouble = new AMutableDouble(0);
@@ -99,11 +99,9 @@
                     @SuppressWarnings("rawtypes")
                     private ISerializerDeserializer serde;
 
-                    private int getPrecision(IFrameTupleReference tuple) throws AlgebricksException {
-                        resultStorage.reset();
-                        precision.evaluate(tuple, argPtr);
-                        byte[] bytes = argPtr.getByteArray();
-                        int offset = argPtr.getStartOffset();
+                    private int getPrecision() throws AlgebricksException {
+                        byte[] bytes = argPrecision.getByteArray();
+                        int offset = argPrecision.getStartOffset();
 
                         if (bytes[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
                             return AInt8SerializerDeserializer.getByte(bytes, offset + 1);
@@ -123,16 +121,13 @@
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
-                        eval.evaluate(tuple, argPtr);
-                        byte[] data = argPtr.getByteArray();
-                        int offset = argPtr.getStartOffset();
+                        eval.evaluate(tuple, argValue);
+                        precision.evaluate(tuple, argPrecision);
+                        byte[] data = argValue.getByteArray();
+                        int offset = argValue.getStartOffset();
 
                         try {
-                            if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                serde = AqlSerializerDeserializerProvider.INSTANCE
-                                        .getSerializerDeserializer(BuiltinType.ANULL);
-                                serde.serialize(ANull.NULL, out);
-                            } else if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
+                            if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
                                 serde = AqlSerializerDeserializerProvider.INSTANCE
                                         .getSerializerDeserializer(BuiltinType.AINT8);
                                 byte val = AInt8SerializerDeserializer.getByte(data, offset + 1);
@@ -166,7 +161,7 @@
                                 } else {
                                     BigDecimal r = new BigDecimal(Float.toString(val));
                                     aFloat.setValue(
-                                            r.setScale(getPrecision(tuple), BigDecimal.ROUND_HALF_EVEN).floatValue());
+                                            r.setScale(getPrecision(), BigDecimal.ROUND_HALF_EVEN).floatValue());
                                     serde.serialize(aFloat, out);
                                 }
                             } else if (data[offset] == ATypeTag.SERIALIZED_DOUBLE_TYPE_TAG) {
@@ -179,7 +174,7 @@
                                 } else {
                                     BigDecimal r = new BigDecimal(Double.toString(val));
                                     aDouble.setValue(
-                                            r.setScale(getPrecision(tuple), BigDecimal.ROUND_HALF_EVEN).doubleValue());
+                                            r.setScale(getPrecision(), BigDecimal.ROUND_HALF_EVEN).doubleValue());
                                     serde.serialize(aDouble, out);
                                 }
                             } else {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEvenDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEvenDescriptor.java
index 0d18b24..575035e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEvenDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericRoundHalfToEvenDescriptor.java
@@ -38,7 +38,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -105,13 +104,7 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                serde = AqlSerializerDeserializerProvider.INSTANCE
-                                        .getSerializerDeserializer(BuiltinType.ANULL);
-                                serde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
+                            if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
                                 serde = AqlSerializerDeserializerProvider.INSTANCE
                                         .getSerializerDeserializer(BuiltinType.AINT8);
                                 byte val = AInt8SerializerDeserializer.getByte(data, offset + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericSubtractDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericSubtractDescriptor.java
index b850f91..4355be0 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericSubtractDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericSubtractDescriptor.java
@@ -33,7 +33,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -143,13 +142,6 @@
                                         operands[i] = ADoubleSerializerDeserializer.getDouble(data, offset + 1);
                                         break;
                                     }
-                                    case NULL: {
-                                        serde = AqlSerializerDeserializerProvider.INSTANCE
-                                                .getSerializerDeserializer(BuiltinType.ANULL);
-                                        serde.serialize(ANull.NULL, out);
-                                        result.set(resultStorage);
-                                        return;
-                                    }
                                     default: {
                                         throw new NotImplementedException(AsterixBuiltinFunctions.NUMERIC_SUBTRACT
                                                 .getName() + (i == 0 ? ": left" : ": right") + " operand can not be "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericUnaryMinusDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericUnaryMinusDescriptor.java
index 50e657d..422ab49 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericUnaryMinusDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/NumericUnaryMinusDescriptor.java
@@ -33,7 +33,6 @@
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.om.base.AMutableInt64;
 import org.apache.asterix.om.base.AMutableInt8;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -96,11 +95,7 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                serde = AqlSerializerDeserializerProvider.INSTANCE
-                                        .getSerializerDeserializer(BuiltinType.ANULL);
-                                serde.serialize(ANull.NULL, out);
-                            } else if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
+                            if (data[offset] == ATypeTag.SERIALIZED_INT8_TYPE_TAG) {
                                 serde = AqlSerializerDeserializerProvider.INSTANCE
                                         .getSerializerDeserializer(BuiltinType.AINT8);
                                 aInt8.setValue((byte) -AInt8SerializerDeserializer.getByte(data, offset + 1));
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/OrDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/OrDescriptor.java
index cbf4dcc..a98f4bb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/OrDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/OrDescriptor.java
@@ -23,6 +23,7 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ABooleanSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -80,6 +81,9 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ANULL);
+                    @SuppressWarnings("unchecked")
+                    private ISerializerDeserializer<AMissing> missingSerde = AqlSerializerDeserializerProvider.INSTANCE
+                            .getSerializerDeserializer(BuiltinType.AMISSING);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -88,29 +92,37 @@
                             int n = args.length;
                             boolean res = false;
                             boolean metNull = false;
+                            boolean metMissing = false;
                             for (int i = 0; i < n; i++) {
                                 evals[i].evaluate(tuple, argPtr);
                                 byte[] data = argPtr.getByteArray();
                                 int offset = argPtr.getStartOffset();
+                                if (data[offset] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                                    metMissing = true;
+                                    continue;
+                                }
                                 if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
                                     metNull = true;
                                     continue;
                                 }
                                 boolean argResult = ABooleanSerializerDeserializer.getBoolean(data, offset + 1);
                                 if (argResult == true) {
-                                    res = true;
-                                    break;
+                                    // anything OR TRUE = TRUE
+                                    booleanSerde.serialize(ABoolean.TRUE, output);
+                                    result.set(resultStorage);
+                                    return;
                                 }
+                                res |= argResult;
                             }
                             if (metNull) {
-                                if (!res) {
-                                    ABoolean aResult = ABoolean.FALSE;
-                                    booleanSerde.serialize(aResult, output);
-                                } else {
-                                    nullSerde.serialize(ANull.NULL, output);
-                                }
+                                // NULL OR FALSE = NULL
+                                // NULL OR MISSING = NULL
+                                nullSerde.serialize(ANull.NULL, output);
+                            } else if (metMissing) {
+                                // MISSING OR FALSE = MISSING
+                                missingSerde.serialize(AMissing.MISSING, output);
                             } else {
-                                ABoolean aResult = res ? (ABoolean.TRUE) : (ABoolean.FALSE);
+                                ABoolean aResult = res ? ABoolean.TRUE : ABoolean.FALSE;
                                 booleanSerde.serialize(aResult, output);
                             }
                             result.set(resultStorage);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java
index 9a7017a..c9e5807 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java
@@ -70,7 +70,8 @@
 
                     private final ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
                     private final DataOutput out = resultStorage.getDataOutput();
-                    private final IPointable inputVal = new VoidPointable();
+                    private final IPointable lenPtr = new VoidPointable();
+                    private final IPointable thresholdPtr = new VoidPointable();
                     private final IScalarEvaluator evalLen = args[0].createScalarEvaluator(ctx);
                     private final IScalarEvaluator evalThreshold = args[1].createScalarEvaluator(ctx);
 
@@ -86,19 +87,20 @@
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
+                        evalLen.evaluate(tuple, lenPtr);
+                        evalThreshold.evaluate(tuple, thresholdPtr);
+
                         // length
-                        evalLen.evaluate(tuple, inputVal);
                         int length = 0;
                         try {
-                            length = ATypeHierarchy.getIntegerValue(inputVal.getByteArray(), inputVal.getStartOffset());
+                            length = ATypeHierarchy.getIntegerValue(lenPtr.getByteArray(), lenPtr.getStartOffset());
                         } catch (HyracksDataException e1) {
                             throw new AlgebricksException(e1);
                         }
 
                         // similarity threshold
-                        evalThreshold.evaluate(tuple, inputVal);
-                        byte[] data = inputVal.getByteArray();
-                        int offset = inputVal.getStartOffset();
+                        byte[] data = thresholdPtr.getByteArray();
+                        int offset = thresholdPtr.getStartOffset();
                         if (data[offset] != ATypeTag.SERIALIZED_FLOAT_TYPE_TAG) {
                             throw new AlgebricksException(AsterixBuiltinFunctions.PREFIX_LEN_JACCARD.getName()
                                     + ": expects type FLOAT the first argument but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/RegExpDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/RegExpDescriptor.java
index a0829fd..7b9ca73 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/RegExpDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/RegExpDescriptor.java
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -100,9 +99,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ABoolean> booleanSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     private Matcher matcher;
                     private Pattern pattern;
 
@@ -112,15 +108,11 @@
                         // evaluate the pattern first
                         try {
                             evalPattern.evaluate(tuple, array0);
+                            evalString.evaluate(tuple, array0);
+
                             byte[] patternBytes = array0.getByteArray();
                             int patternOffset = array0.getStartOffset();
                             int patternLen = array0.getLength();
-
-                            if (patternBytes[patternOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, dout);
-                                result.set(resultStorage);
-                                return;
-                            }
                             if (patternBytes[patternOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(AsterixBuiltinFunctions.REG_EXP.getName()
                                         + ": expects type STRING/NULL for the first input argument but got "
@@ -148,15 +140,9 @@
                                 pattern = Pattern.compile(strPattern.getStringValue());
 
                             }
-                            evalString.evaluate(tuple, array0);
                             byte[] data = array0.getByteArray();
                             int offset = array0.getStartOffset();
                             int len = array0.getLength();
-                            if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, dout);
-                                result.set(resultStorage);
-                                return;
-                            }
                             if (data[offset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(AsterixBuiltinFunctions.REG_EXP.getName()
                                         + ": expects type STRING/NULL for the second input argument but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialAreaDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialAreaDescriptor.java
index 5d8f514..e31ad90 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialAreaDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialAreaDescriptor.java
@@ -26,13 +26,10 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARectangleSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.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.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.asterix.runtime.evaluators.common.SpatialUtils;
@@ -42,7 +39,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -74,10 +70,6 @@
                     private final IPointable argPtr = new VoidPointable();
                     private final IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
 
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
@@ -126,9 +118,6 @@
                                     out.writeByte(ATypeTag.SERIALIZED_DOUBLE_TYPE_TAG);
                                     out.writeDouble(area);
                                     break;
-                                case NULL:
-                                    nullSerde.serialize(ANull.NULL, out);
-                                    break;
                                 default:
                                     throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_AREA.getName()
                                             + ": does not support the type: " + tag
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialCellDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialCellDescriptor.java
index cb6d194..2208d6f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialCellDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialCellDescriptor.java
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutablePoint;
 import org.apache.asterix.om.base.AMutableRectangle;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ARectangle;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -81,9 +80,6 @@
                     private final AMutablePoint[] aPoint = { new AMutablePoint(0, 0), new AMutablePoint(0, 0) };
 
                     @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<ARectangle> rectangleSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ARECTANGLE);
 
@@ -130,9 +126,6 @@
                                 aPoint[1].setValue(x + xInc, y + yInc);
                                 aRectangle.setValue(aPoint[0], aPoint[1]);
                                 rectangleSerde.serialize(aRectangle, out);
-                            } else if (tag0 == ATypeTag.NULL || tag1 == ATypeTag.NULL || tag2 == ATypeTag.NULL
-                                    || tag3 == ATypeTag.NULL) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new AlgebricksException(AsterixBuiltinFunctions.SPATIAL_CELL.getName()
                                         + ": expects input type: (POINT, POINT, DOUBLE, DOUBLE) but got ("
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialDistanceDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialDistanceDescriptor.java
index d7f260e..5c969b1 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialDistanceDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialDistanceDescriptor.java
@@ -24,13 +24,10 @@
 import org.apache.asterix.dataflow.data.nontagged.Coordinate;
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.APointSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.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.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -39,7 +36,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -73,10 +69,6 @@
                     private final IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private final IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
@@ -91,7 +83,7 @@
 
                             ATypeTag tag0 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]);
                             ATypeTag tag1 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1]);
-                            double distance = 0.0;
+                            double distance;
                             if (tag0 == ATypeTag.POINT) {
                                 if (tag1 == ATypeTag.POINT) {
                                     double x1 = ADoubleSerializerDeserializer.getDouble(bytes0,
@@ -108,8 +100,6 @@
                                             + ": does not support the type: " + tag1
                                             + "; it is only implemented for POINT.");
                                 }
-                            } else if (tag0 == ATypeTag.NULL || tag1 == ATypeTag.NULL) {
-                                nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_DISTANCE.getName()
                                         + ": does not support the type: " + tag1
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialIntersectDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialIntersectDescriptor.java
index 626fe80..03ec9a6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialIntersectDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SpatialIntersectDescriptor.java
@@ -450,7 +450,7 @@
 
                     private boolean triangleTriangleIntersection(DoubleArray trianglesX0, DoubleArray trianglesY0,
                             int triangleId0, DoubleArray trianglesX1, DoubleArray trianglesY1, int triangleId1)
-                                    throws HyracksDataException { // separating axis theorem
+                            throws HyracksDataException { // separating axis theorem
 
                         for (int side = 0; side < 3; side++) {
                             spatialUtils.findNormals(trianglesX0, trianglesY0, triangleId0, side);
@@ -830,9 +830,6 @@
                                         case RECTANGLE:
                                             res = pointInRectangle(bytes0, offset0, bytes1, offset1);
                                             break;
-                                        case NULL:
-                                            res = false;
-                                            break;
                                         default:
                                             throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_INTERSECT
                                                     .getName() + ": does not support the type: " + tag1
@@ -900,9 +897,6 @@
                                         case RECTANGLE:
                                             res = lineRectangleIntersection(bytes0, offset0, bytes1, offset1);
                                             break;
-                                        case NULL:
-                                            res = false;
-                                            break;
                                         default:
                                             throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_INTERSECT
                                                     .getName() + ": does not support the type: " + tag1
@@ -993,9 +987,6 @@
                                         case RECTANGLE:
                                             res = rectanglePolygonIntersection(bytes1, offset1, bytes0, offset0);
                                             break;
-                                        case NULL:
-                                            res = false;
-                                            break;
                                         default:
                                             throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_INTERSECT
                                                     .getName() + ": does not support the type: " + tag1
@@ -1019,9 +1010,6 @@
                                         case RECTANGLE:
                                             res = rectangleCircleIntersection(bytes1, offset1, bytes0, offset0);
                                             break;
-                                        case NULL:
-                                            res = false;
-                                            break;
                                         default:
                                             throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_INTERSECT
                                                     .getName() + ": does not support the type: " + tag1
@@ -1069,18 +1057,12 @@
                                                 }
                                             }
                                             break;
-                                        case NULL:
-                                            res = false;
-                                            break;
                                         default:
                                             throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_INTERSECT
                                                     .getName() + ": does not support the type: " + tag1
                                                     + "; it is only implemented for POINT, ALINE, POLYGON, and CIRCLE.");
                                     }
                                     break;
-                                case NULL:
-                                    res = false;
-                                    break;
                                 default:
                                     throw new NotImplementedException(AsterixBuiltinFunctions.SPATIAL_INTERSECT
                                             .getName() + ": does not support the type: " + tag1
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/Substring2Descriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/Substring2Descriptor.java
index 8abda5f..f0c9fba 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/Substring2Descriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/Substring2Descriptor.java
@@ -63,7 +63,8 @@
 
                     private ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
                     private DataOutput out = resultStorage.getDataOutput();
-                    private IPointable argPtr = new VoidPointable();
+                    private IPointable argString = new VoidPointable();
+                    private IPointable argStart = new VoidPointable();
                     private IScalarEvaluator evalString = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator evalStart = args[1].createScalarEvaluator(ctx);
                     private final GrowableArray array = new GrowableArray();
@@ -73,22 +74,21 @@
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
-                        evalStart.evaluate(tuple, argPtr);
+                        evalStart.evaluate(tuple, argStart);
+                        evalString.evaluate(tuple, argString);
+
                         int start = 0;
-
-                        byte[] bytes = argPtr.getByteArray();
-                        int offset = argPtr.getStartOffset();
-
+                        byte[] bytes = argStart.getByteArray();
+                        int offset = argStart.getStartOffset();
                         try {
                             start = ATypeHierarchy.getIntegerValue(bytes, offset) - 1;
                         } catch (HyracksDataException e1) {
                             throw new AlgebricksException(e1);
                         }
 
-                        evalString.evaluate(tuple, argPtr);
-                        bytes = argPtr.getByteArray();
-                        offset = argPtr.getStartOffset();
-                        int len = argPtr.getLength();
+                        bytes = argString.getByteArray();
+                        offset = argString.getStartOffset();
+                        int len = argString.getLength();
                         if (bytes[offset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                             throw new AlgebricksException(AsterixBuiltinFunctions.SUBSTRING2.getName()
                                     + ": expects type STRING for the first argument but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringAfterDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringAfterDescriptor.java
index 32db2c2..23dbbec 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringAfterDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringAfterDescriptor.java
@@ -81,22 +81,14 @@
                         int patternOffset = array1.getStartOffset();
                         int patternLen = array1.getLength();
 
-                        if ((src[srcOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                                && src[srcOffset] != ATypeTag.SERIALIZED_NULL_TYPE_TAG)
-                                || (pattern[patternOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                                        && pattern[patternOffset] != ATypeTag.SERIALIZED_NULL_TYPE_TAG)) {
+                        if (src[srcOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                                || pattern[patternOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                             throw new AlgebricksException(AsterixBuiltinFunctions.SUBSTRING_AFTER.getName()
                                     + ": expects input type (STRING/NULL, STRING/NULL) but got ("
                                     + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(src[srcOffset]) + ", "
                                     + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(pattern[patternOffset]) + ").");
                         }
                         try {
-                            if (src[srcOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || pattern[patternOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
-                                result.set(resultStorage);
-                                return;
-                            }
                             stringPtr.set(src, srcOffset + 1, srcLen - 1);
                             patternPtr.set(pattern, patternOffset + 1, patternLen - 1);
                             array.reset();
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringBeforeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringBeforeDescriptor.java
index f418213..65aa34b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringBeforeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringBeforeDescriptor.java
@@ -83,10 +83,8 @@
                         int patternOffset = array1.getStartOffset();
                         int patternLen = array1.getLength();
 
-                        if ((src[srcOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                                && src[srcOffset] != ATypeTag.SERIALIZED_NULL_TYPE_TAG)
-                                || (pattern[patternOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
-                                        && pattern[patternOffset] != ATypeTag.SERIALIZED_NULL_TYPE_TAG)) {
+                        if (src[srcOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
+                                || pattern[patternOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                             throw new AlgebricksException(AsterixBuiltinFunctions.SUBSTRING_BEFORE.getName()
                                     + ": expects input type (STRING/NULL, STRING/NULL) but got ("
                                     + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(src[srcOffset]) + ", "
@@ -94,12 +92,6 @@
                         }
 
                         try {
-                            if (src[srcOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || pattern[patternOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
-                                result.set(resultStorage);
-                                return;
-                            }
                             stringPtr.set(src, srcOffset + 1, srcLen - 1);
                             patternPtr.set(pattern, patternOffset + 1, patternLen - 1);
                             array.reset();
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringDescriptor.java
index 660fbb8..e960b58 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/SubstringDescriptor.java
@@ -25,18 +25,15 @@
 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.hierachy.ATypeHierarchy;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.DoublePointable;
-import org.apache.hyracks.data.std.primitive.FloatPointable;
-import org.apache.hyracks.data.std.primitive.IntegerPointable;
-import org.apache.hyracks.data.std.primitive.LongPointable;
-import org.apache.hyracks.data.std.primitive.ShortPointable;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -67,7 +64,9 @@
 
                     private final ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
                     private final DataOutput out = resultStorage.getDataOutput();
-                    private final IPointable argPtr = new VoidPointable();
+                    private IPointable argString = new VoidPointable();
+                    private IPointable argStart = new VoidPointable();
+                    private IPointable argLen = new VoidPointable();
                     private final IScalarEvaluator evalString = args[0].createScalarEvaluator(ctx);
                     private final IScalarEvaluator evalStart = args[1].createScalarEvaluator(ctx);
                     private final IScalarEvaluator evalLen = args[2].createScalarEvaluator(ctx);
@@ -79,81 +78,31 @@
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
-                        evalStart.evaluate(tuple, argPtr);
-                        byte[] bytes = argPtr.getByteArray();
-                        int offset = argPtr.getStartOffset();
+                        evalString.evaluate(tuple, argString);
+                        evalStart.evaluate(tuple, argStart);
+                        evalLen.evaluate(tuple, argLen);
+
                         int start = 0;
-
-                        ATypeTag argPtrTypeTag = ATypeTag.VALUE_TYPE_MAPPING[bytes[offset]];
-
-                        switch (argPtrTypeTag) {
-                            case INT64:
-                                start = (int) LongPointable.getLong(bytes, offset + 1) - 1;
-                                break;
-                            case INT32:
-                                start = IntegerPointable.getInteger(bytes, offset + 1) - 1;
-                                break;
-                            case INT8:
-                                start = bytes[offset + 1] - 1;
-                                break;
-                            case INT16:
-                                start = ShortPointable.getShort(bytes, offset + 1) - 1;
-                                break;
-                            case FLOAT:
-                                start = (int) FloatPointable.getFloat(bytes, offset + 1) - 1;
-                                break;
-                            case DOUBLE:
-                                start = (int) DoublePointable.getDouble(bytes, offset + 1) - 1;
-                                break;
-                            default:
-                                throw new AlgebricksException(AsterixBuiltinFunctions.SUBSTRING.getName()
-                                        + ": expects type INT8/16/32/64/FLOAT/DOUBLE for the second argument but got "
-                                        + argPtrTypeTag);
+                        byte[] bytes = argStart.getByteArray();
+                        int offset = argStart.getStartOffset();
+                        try {
+                            start = ATypeHierarchy.getIntegerValue(bytes, offset) - 1;
+                        } catch (HyracksDataException e1) {
+                            throw new AlgebricksException(e1);
                         }
 
-                        evalLen.evaluate(tuple, argPtr);
-                        bytes = argPtr.getByteArray();
-                        offset = argPtr.getStartOffset();
                         int len = 0;
-
-                        argPtrTypeTag = ATypeTag.VALUE_TYPE_MAPPING[bytes[offset]];
-
-                        switch (argPtrTypeTag) {
-                            case INT64:
-                                len = (int) LongPointable.getLong(bytes, offset + 1);
-                                break;
-                            case INT32:
-                                len = IntegerPointable.getInteger(bytes, offset + 1);
-                                break;
-                            case INT8:
-                                len = bytes[offset + 1];
-                                break;
-                            case INT16:
-                                len = ShortPointable.getShort(bytes, offset + 1);
-                                break;
-                            case FLOAT:
-                                len = (int) FloatPointable.getFloat(bytes, offset + 1);
-                                break;
-                            case DOUBLE:
-                                len = (int) DoublePointable.getDouble(bytes, offset + 1);
-                                break;
-                            default:
-                                throw new AlgebricksException(AsterixBuiltinFunctions.SUBSTRING.getName()
-                                        + ": expects type INT8/16/32/64/FLOAT/DOUBLE for the third argument but got "
-                                        + argPtrTypeTag);
+                        bytes = argLen.getByteArray();
+                        offset = argLen.getStartOffset();
+                        try {
+                            len = ATypeHierarchy.getIntegerValue(bytes, offset);
+                        } catch (HyracksDataException e1) {
+                            throw new AlgebricksException(e1);
                         }
 
-                        evalString.evaluate(tuple, argPtr);
-                        bytes = argPtr.getByteArray();
-                        offset = argPtr.getStartOffset();
-                        int length = argPtr.getLength();
-                        argPtrTypeTag = ATypeTag.VALUE_TYPE_MAPPING[bytes[offset]];
-
-                        if (argPtrTypeTag != ATypeTag.STRING) {
-                            throw new AlgebricksException(AsterixBuiltinFunctions.SUBSTRING.getName()
-                                    + ": expects type STRING for the first argument but got " + argPtrTypeTag);
-                        }
-
+                        bytes = argString.getByteArray();
+                        offset = argString.getStartOffset();
+                        int length = argString.getLength();
                         string.set(bytes, offset + 1, length - 1);
                         array.reset();
                         try {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractBinaryScalarEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractBinaryScalarEvaluator.java
index e87c4eb..c12df6f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractBinaryScalarEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractBinaryScalarEvaluator.java
@@ -21,34 +21,25 @@
 
 import java.io.DataOutput;
 
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
-import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 public abstract class AbstractBinaryScalarEvaluator implements IScalarEvaluator {
-    @SuppressWarnings("unchecked")
-    protected ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
 
     protected ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
     protected DataOutput dataOutput = resultStorage.getDataOutput();
     protected IPointable[] pointables;
     protected IScalarEvaluator[] evaluators;
 
-    public AbstractBinaryScalarEvaluator(final IHyracksTaskContext context, final IScalarEvaluatorFactory[] evaluatorFactories)
-            throws AlgebricksException {
+    public AbstractBinaryScalarEvaluator(final IHyracksTaskContext context,
+            final IScalarEvaluatorFactory[] evaluatorFactories) throws AlgebricksException {
         pointables = new IPointable[evaluatorFactories.length];
         evaluators = new IScalarEvaluator[evaluatorFactories.length];
         for (int i = 0; i < evaluators.length; ++i) {
@@ -57,27 +48,12 @@
         }
     }
 
-    public ATypeTag evaluateTuple(IFrameTupleReference tuple, int id) throws AlgebricksException {
-        evaluators[id].evaluate(tuple, pointables[id]);
-        return ATypeTag.VALUE_TYPE_MAPPING[pointables[id].getByteArray()[pointables[id].getStartOffset()]];
-    }
-
-    public boolean serializeNullIfAnyNull(ATypeTag... tags) throws HyracksDataException {
-        for (ATypeTag typeTag : tags) {
-            if (typeTag == ATypeTag.NULL) {
-                nullSerde.serialize(ANull.NULL, dataOutput);
-                return true;
-            }
-        }
-        return false;
-    }
-
     private static final String FIRST = "1st";
     private static final String SECOND = "2nd";
     private static final String THIRD = "3rd";
     private static final String TH = "th";
 
-    public static String rankToString(int i) {
+    protected String rankToString(int i) {
         String prefix = "";
         if (i >= 10) {
             prefix = String.valueOf(i / 10);
@@ -94,7 +70,7 @@
         }
     }
 
-    public static void checkTypeMachingThrowsIfNot(String title, ATypeTag[] expected, ATypeTag... actual)
+    protected void checkTypeMachingThrowsIfNot(String title, ATypeTag[] expected, ATypeTag... actual)
             throws AlgebricksException {
         for (int i = 0; i < expected.length; i++) {
             if (expected[i] != actual[i]) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractFindBinaryEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractFindBinaryEvaluator.java
new file mode 100644
index 0000000..b9acc4d
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractFindBinaryEvaluator.java
@@ -0,0 +1,122 @@
+/*
+ * 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.evaluators.functions.binary;
+
+import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
+import org.apache.asterix.om.base.AInt64;
+import org.apache.asterix.om.base.AMutableInt64;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+
+public abstract class AbstractFindBinaryEvaluator extends AbstractBinaryScalarEvaluator {
+
+    private static final ATypeTag[] EXPECTED_INPUT_TAG = { ATypeTag.BINARY, ATypeTag.BINARY };
+    protected String functionName;
+    protected AMutableInt64 result = new AMutableInt64(-1);
+    protected final ByteArrayPointable textPtr = new ByteArrayPointable();
+    protected final ByteArrayPointable wordPtr = new ByteArrayPointable();
+
+    @SuppressWarnings("unchecked")
+    protected ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
+            .getSerializerDeserializer(BuiltinType.AINT64);
+
+    public AbstractFindBinaryEvaluator(IHyracksTaskContext context, IScalarEvaluatorFactory[] copyEvaluatorFactories,
+            String functionName) throws AlgebricksException {
+        super(context, copyEvaluatorFactories);
+        this.functionName = functionName;
+    }
+
+    @Override
+    public void evaluate(IFrameTupleReference tuple, IPointable resultPointable) throws AlgebricksException {
+        resultStorage.reset();
+        for (int i = 0; i < pointables.length; ++i) {
+            evaluators[i].evaluate(tuple, pointables[i]);
+        }
+
+        int fromOffset = getFromOffset(tuple);
+        try {
+            ATypeTag textTag = ATypeTag.VALUE_TYPE_MAPPING[pointables[0].getByteArray()[pointables[0]
+                    .getStartOffset()]];
+            ATypeTag wordTag = ATypeTag.VALUE_TYPE_MAPPING[pointables[1].getByteArray()[pointables[1]
+                    .getStartOffset()]];
+
+            checkTypeMachingThrowsIfNot(functionName, EXPECTED_INPUT_TAG, textTag, wordTag);
+            textPtr.set(pointables[0].getByteArray(), pointables[0].getStartOffset() + 1,
+                    pointables[0].getLength() - 1);
+            wordPtr.set(pointables[1].getByteArray(), pointables[0].getStartOffset() + 1,
+                    pointables[1].getLength() - 1);
+            result.setValue(1L + indexOf(textPtr.getByteArray(), textPtr.getContentStartOffset(),
+                    textPtr.getContentLength(), wordPtr.getByteArray(), wordPtr.getContentStartOffset(),
+                    wordPtr.getContentLength(), fromOffset));
+            intSerde.serialize(result, dataOutput);
+        } catch (HyracksDataException e) {
+            throw new AlgebricksException(e);
+        }
+        resultPointable.set(resultStorage);
+    }
+
+    protected abstract int getFromOffset(IFrameTupleReference tuple) throws AlgebricksException;
+
+    // copy from String.indexOf(String)
+    private int indexOf(byte[] source, int sourceOffset, int sourceCount, byte[] target, int targetOffset,
+            int targetCount, int fromIndex) {
+        if (fromIndex >= sourceCount) {
+            return targetCount == 0 ? sourceCount : -1;
+        }
+        int from = fromIndex;
+        if (from < 0) {
+            from = 0;
+        }
+        if (targetCount == 0) {
+            return from;
+        }
+
+        byte first = target[targetOffset];
+        int max = sourceOffset + (sourceCount - targetCount);
+
+        for (int i = sourceOffset + fromIndex; i <= max; i++) {
+            /* Look for first character. */
+            if (source[i] != first) {
+                continue;
+            }
+
+            /* Found first character, now look at the rest of v2 */
+            int j = i + 1;
+            int end = j + targetCount - 1;
+            for (int k = targetOffset + 1; j < end && source[j] == target[k]; j++, k++) {
+                ;
+            }
+            if (j == end) {
+                /* Found whole string. */
+                return i - sourceOffset;
+            }
+        }
+        return -1;
+    }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractSubBinaryEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractSubBinaryEvaluator.java
new file mode 100644
index 0000000..8b5c512
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/AbstractSubBinaryEvaluator.java
@@ -0,0 +1,98 @@
+/*
+ * 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.evaluators.functions.binary;
+
+import java.io.IOException;
+
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
+import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
+import org.apache.hyracks.util.encoding.VarLenIntEncoderDecoder;
+
+public abstract class AbstractSubBinaryEvaluator extends AbstractBinaryScalarEvaluator {
+
+    private ByteArrayPointable byteArrayPointable = new ByteArrayPointable();
+    private byte[] metaBuffer = new byte[5];
+    protected final String functionName;
+
+    private static final ATypeTag[] EXPECTED_INPUT_TAGS = { ATypeTag.BINARY, ATypeTag.INT32 };
+
+    public AbstractSubBinaryEvaluator(IHyracksTaskContext context, IScalarEvaluatorFactory[] copyEvaluatorFactories,
+            String functionName) throws AlgebricksException {
+        super(context, copyEvaluatorFactories);
+        this.functionName = functionName;
+    }
+
+    @Override
+    public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
+        resultStorage.reset();
+        for (int i = 0; i < pointables.length; ++i) {
+            evaluators[i].evaluate(tuple, pointables[i]);
+        }
+
+        try {
+            ATypeTag argTag0 = ATypeTag.VALUE_TYPE_MAPPING[pointables[0].getByteArray()[pointables[0]
+                    .getStartOffset()]];
+            ATypeTag argTag1 = ATypeTag.VALUE_TYPE_MAPPING[pointables[1].getByteArray()[pointables[1]
+                    .getStartOffset()]];
+            checkTypeMachingThrowsIfNot(functionName, EXPECTED_INPUT_TAGS, argTag0, argTag1);
+
+            byteArrayPointable.set(pointables[0].getByteArray(), pointables[0].getStartOffset() + 1,
+                    pointables[0].getLength() - 1);
+            byte[] startBytes = pointables[1].getByteArray();
+            int offset = pointables[1].getStartOffset();
+
+            int subStart;
+
+            // strange SQL index convention
+            subStart = ATypeHierarchy.getIntegerValue(startBytes, offset) - 1;
+
+            int totalLength = byteArrayPointable.getContentLength();
+            int subLength = getSubLength(tuple);
+
+            if (subStart < 0) {
+                subStart = 0;
+            }
+
+            if (subStart >= totalLength || subLength < 0) {
+                subLength = 0;
+            } else if (subLength > totalLength // for the IntMax case
+                    || subStart + subLength > totalLength) {
+                subLength = totalLength - subStart;
+            }
+
+            dataOutput.write(ATypeTag.BINARY.serialize());
+            int metaLength = VarLenIntEncoderDecoder.encode(subLength, metaBuffer, 0);
+            dataOutput.write(metaBuffer, 0, metaLength);
+            dataOutput.write(byteArrayPointable.getByteArray(), byteArrayPointable.getContentStartOffset() + subStart,
+                    subLength);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+        result.set(resultStorage);
+    }
+
+    protected abstract int getSubLength(IFrameTupleReference tuple) throws AlgebricksException;
+}
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 2747260..b06203b 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
@@ -22,10 +22,13 @@
 import java.io.IOException;
 
 import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
+import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.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.AsterixListAccessor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -33,6 +36,7 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
@@ -66,11 +70,16 @@
 
                     private final AsterixListAccessor listAccessor = new AsterixListAccessor();
                     private final byte[] metaBuffer = new byte[5];
+                    @SuppressWarnings("unchecked")
+                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
+                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
-                        ATypeTag typeTag = evaluateTuple(tuple, 0);
+                        evaluators[0].evaluate(tuple, pointables[0]);
+                        ATypeTag typeTag = ATypeTag.VALUE_TYPE_MAPPING[pointables[0].getByteArray()[pointables[0]
+                                .getStartOffset()]];
                         if (typeTag != ATypeTag.UNORDEREDLIST && typeTag != ATypeTag.ORDEREDLIST) {
                             throw new AlgebricksException(getIdentifier().getName()
                                     + ": expects input type ORDEREDLIST/UNORDEREDLIST, but got " + typeTag);
@@ -113,8 +122,17 @@
                         }
                         result.set(resultStorage);
                     }
-                };
 
+                    private boolean serializeNullIfAnyNull(ATypeTag... tags) throws HyracksDataException {
+                        for (ATypeTag typeTag : tags) {
+                            if (typeTag == ATypeTag.NULL) {
+                                nullSerde.serialize(ANull.NULL, dataOutput);
+                                return true;
+                            }
+                        }
+                        return false;
+                    }
+                };
             }
         };
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java
index 9e9aab4..0a50c24 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java
@@ -69,12 +69,10 @@
                     public void evaluate(IFrameTupleReference tuple, IPointable resultPointable)
                             throws AlgebricksException {
                         resultStorage.reset();
-                        ATypeTag tag = evaluateTuple(tuple, 0);
+                        evaluators[0].evaluate(tuple, pointables[0]);
+                        ATypeTag tag = ATypeTag.VALUE_TYPE_MAPPING[pointables[0].getByteArray()[pointables[0]
+                                .getStartOffset()]];
                         try {
-                            if (serializeNullIfAnyNull(tag)) {
-                                resultPointable.set(resultStorage);
-                                return;
-                            }
                             checkTypeMachingThrowsIfNot(getIdentifier().getName(), EXPECTED_TAGS, tag);
                             int len = ByteArrayPointable.getContentLength(pointables[0].getByteArray(),
                                     pointables[0].getStartOffset() + 1);
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java
index c7b4843..94ec311 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java
@@ -19,24 +19,15 @@
 
 package org.apache.asterix.runtime.evaluators.functions.binary;
 
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.AInt64;
-import org.apache.asterix.om.base.AMutableInt64;
 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.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 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;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 public class FindBinaryDescriptor extends AbstractScalarFunctionDynamicDescriptor {
@@ -53,8 +44,6 @@
         return AsterixBuiltinFunctions.FIND_BINARY;
     }
 
-    private static final ATypeTag[] EXPECTED_INPUT_TAG = { ATypeTag.BINARY, ATypeTag.BINARY };
-
     @Override
     public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
             throws AlgebricksException {
@@ -63,7 +52,7 @@
 
             @Override
             public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
-                return new AbstractFindBinaryCopyEvaluator(ctx, args, getIdentifier().getName()) {
+                return new AbstractFindBinaryEvaluator(ctx, args, getIdentifier().getName()) {
                     @Override
                     protected int getFromOffset(IFrameTupleReference tuple) throws AlgebricksException {
                         return 0;
@@ -73,93 +62,4 @@
         };
     }
 
-    static abstract class AbstractFindBinaryCopyEvaluator extends AbstractBinaryScalarEvaluator {
-
-        public AbstractFindBinaryCopyEvaluator(IHyracksTaskContext context,
-                IScalarEvaluatorFactory[] copyEvaluatorFactories, String functionName) throws AlgebricksException {
-            super(context, copyEvaluatorFactories);
-            this.functionName = functionName;
-        }
-
-        protected String functionName;
-        protected AMutableInt64 result = new AMutableInt64(-1);
-        protected final ByteArrayPointable textPtr = new ByteArrayPointable();
-        protected final ByteArrayPointable wordPtr = new ByteArrayPointable();
-
-        @SuppressWarnings("unchecked")
-        protected ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
-                .getSerializerDeserializer(BuiltinType.AINT64);
-
-        @Override
-        public void evaluate(IFrameTupleReference tuple, IPointable resultPointable) throws AlgebricksException {
-            resultStorage.reset();
-            ATypeTag textTag = evaluateTuple(tuple, 0);
-            ATypeTag wordTag = evaluateTuple(tuple, 1);
-            int fromOffset = getFromOffset(tuple);
-
-            try {
-                if (serializeNullIfAnyNull(textTag, wordTag)) {
-                    resultPointable.set(resultStorage);
-                    return;
-                }
-                checkTypeMachingThrowsIfNot(functionName, EXPECTED_INPUT_TAG, textTag, wordTag);
-
-                textPtr.set(pointables[0].getByteArray(), pointables[0].getStartOffset() + 1,
-                        pointables[0].getLength() - 1);
-                wordPtr.set(pointables[1].getByteArray(), pointables[0].getStartOffset() + 1,
-                        pointables[1].getLength() - 1);
-                result.setValue(1 + indexOf(textPtr.getByteArray(), textPtr.getContentStartOffset(),
-                        textPtr.getContentLength(), wordPtr.getByteArray(), wordPtr.getContentStartOffset(),
-                        wordPtr.getContentLength(), fromOffset));
-                intSerde.serialize(result, dataOutput);
-            } catch (HyracksDataException e) {
-                throw new AlgebricksException(e);
-            }
-            resultPointable.set(resultStorage);
-        }
-
-        protected abstract int getFromOffset(IFrameTupleReference tuple) throws AlgebricksException;
-    }
-
-    // copy from String.indexOf(String)
-    static int indexOf(byte[] source, int sourceOffset, int sourceCount, byte[] target, int targetOffset,
-            int targetCount, int fromIndex) {
-        if (fromIndex >= sourceCount) {
-            return (targetCount == 0 ? sourceCount : -1);
-        }
-        if (fromIndex < 0) {
-            fromIndex = 0;
-        }
-        if (targetCount == 0) {
-            return fromIndex;
-        }
-
-        byte first = target[targetOffset];
-        int max = sourceOffset + (sourceCount - targetCount);
-
-        for (int i = sourceOffset + fromIndex; i <= max; i++) {
-            /* Look for first character. */
-            if (source[i] != first) {
-                while (++i <= max && source[i] != first) {
-                    ;
-                }
-            }
-
-            /* Found first character, now look at the rest of v2 */
-            if (i <= max) {
-                int j = i + 1;
-                int end = j + targetCount - 1;
-                for (int k = targetOffset + 1; j < end && source[j] == target[k]; j++, k++) {
-                    ;
-                }
-
-                if (j == end) {
-                    /* Found whole string. */
-                    return i - sourceOffset;
-                }
-            }
-        }
-        return -1;
-    }
-
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java
index 6b8ee38..5ed3773 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java
@@ -55,11 +55,9 @@
 
             @Override
             public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
-                return new FindBinaryDescriptor.AbstractFindBinaryCopyEvaluator(ctx, args,
-                        getIdentifier().getName()) {
+                return new AbstractFindBinaryEvaluator(ctx, args, getIdentifier().getName()) {
                     @Override
                     protected int getFromOffset(IFrameTupleReference tuple) throws AlgebricksException {
-                        evaluateTuple(tuple, 2);
                         int getFrom = 0;
                         try {
                             getFrom = ATypeHierarchy.getIntegerValue(pointables[2].getByteArray(),
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java
index a067557..2488710 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java
@@ -43,8 +43,8 @@
 
 public class ParseBinaryDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
-    static final UTF8StringPointable HEX_FORMAT = UTF8StringPointable.generateUTF8Pointable("hex");
-    static final UTF8StringPointable BASE64_FORMAT = UTF8StringPointable.generateUTF8Pointable("base64");
+    private static final UTF8StringPointable HEX_FORMAT = UTF8StringPointable.generateUTF8Pointable("hex");
+    private static final UTF8StringPointable BASE64_FORMAT = UTF8StringPointable.generateUTF8Pointable("base64");
 
     public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
@@ -84,14 +84,15 @@
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
-                        ATypeTag binaryTag = evaluateTuple(tuple, 0);
-                        ATypeTag formatTag = evaluateTuple(tuple, 1);
+                        evaluators[0].evaluate(tuple, pointables[0]);
+                        evaluators[1].evaluate(tuple, pointables[1]);
 
                         try {
-                            if (serializeNullIfAnyNull(binaryTag, formatTag)) {
-                                result.set(resultStorage);
-                                return;
-                            }
+                            ATypeTag binaryTag = ATypeTag.VALUE_TYPE_MAPPING[pointables[0].getByteArray()[pointables[0]
+                                    .getStartOffset()]];
+
+                            ATypeTag formatTag = ATypeTag.VALUE_TYPE_MAPPING[pointables[1].getByteArray()[pointables[1]
+                                    .getStartOffset()]];
                             checkTypeMachingThrowsIfNot(getIdentifier().getName(), EXPECTED_INPUT_TAGS, binaryTag,
                                     formatTag);
                             stringPointable.set(pointables[0].getByteArray(), pointables[0].getStartOffset() + 1,
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
index 92b9ec1..2dc1e34 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
@@ -19,9 +19,6 @@
 
 package org.apache.asterix.runtime.evaluators.functions.binary;
 
-import static org.apache.asterix.runtime.evaluators.functions.binary.ParseBinaryDescriptor.BASE64_FORMAT;
-import static org.apache.asterix.runtime.evaluators.functions.binary.ParseBinaryDescriptor.HEX_FORMAT;
-
 import java.io.IOException;
 
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -45,6 +42,8 @@
 
 public class PrintBinaryDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
+    private static final UTF8StringPointable HEX_FORMAT = UTF8StringPointable.generateUTF8Pointable("hex");
+    private static final UTF8StringPointable BASE64_FORMAT = UTF8StringPointable.generateUTF8Pointable("base64");
 
     @Override
     public FunctionIdentifier getIdentifier() {
@@ -78,14 +77,14 @@
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
-                        ATypeTag arg0Tag = evaluateTuple(tuple, 0);
-                        ATypeTag arg1Tag = evaluateTuple(tuple, 1);
+                        evaluators[0].evaluate(tuple, pointables[0]);
+                        evaluators[1].evaluate(tuple, pointables[1]);
 
                         try {
-                            if (serializeNullIfAnyNull(arg0Tag, arg1Tag)) {
-                                result.set(resultStorage);
-                                return;
-                            }
+                            ATypeTag arg0Tag = ATypeTag.VALUE_TYPE_MAPPING[pointables[0].getByteArray()[pointables[0]
+                                    .getStartOffset()]];
+                            ATypeTag arg1Tag = ATypeTag.VALUE_TYPE_MAPPING[pointables[1].getByteArray()[pointables[1]
+                                    .getStartOffset()]];
                             checkTypeMachingThrowsIfNot(getIdentifier().getName(), EXPECTED_INPUT_TAGS, arg0Tag,
                                     arg1Tag);
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java
index 4d435ab..129cd54 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java
@@ -52,8 +52,7 @@
 
             @Override
             public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
-                return new SubBinaryFromToDescriptor.AbstractSubBinaryCopyEvaluator(ctx, args,
-                        getIdentifier().getName()) {
+                return new AbstractSubBinaryEvaluator(ctx, args, getIdentifier().getName()) {
                     @Override
                     protected int getSubLength(IFrameTupleReference tuple) throws AlgebricksException {
                         return Integer.MAX_VALUE;
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java
index 20fdeed..bb23877 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java
@@ -19,12 +19,9 @@
 
 package org.apache.asterix.runtime.evaluators.functions.binary;
 
-import java.io.IOException;
-
 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.types.ATypeTag;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -33,10 +30,7 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
-import org.apache.hyracks.util.encoding.VarLenIntEncoderDecoder;
 
 public class SubBinaryFromToDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
@@ -60,10 +54,10 @@
 
             @Override
             public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
-                return new AbstractSubBinaryCopyEvaluator(ctx, args, getIdentifier().getName()) {
+
+                return new AbstractSubBinaryEvaluator(ctx, args, getIdentifier().getName()) {
                     @Override
                     protected int getSubLength(IFrameTupleReference tuple) throws AlgebricksException {
-                        evaluateTuple(tuple, 2);
                         int subLength = 0;
                         try {
                             subLength = ATypeHierarchy.getIntegerValue(pointables[2].getByteArray(),
@@ -78,70 +72,4 @@
             }
         };
     }
-
-    static abstract class AbstractSubBinaryCopyEvaluator extends AbstractBinaryScalarEvaluator {
-        public AbstractSubBinaryCopyEvaluator(IHyracksTaskContext context,
-                IScalarEvaluatorFactory[] copyEvaluatorFactories, String functionName) throws AlgebricksException {
-            super(context, copyEvaluatorFactories);
-            this.functionName = functionName;
-        }
-
-        private ByteArrayPointable byteArrayPointable = new ByteArrayPointable();
-        private byte[] metaBuffer = new byte[5];
-        protected final String functionName;
-
-        static final ATypeTag[] EXPECTED_INPUT_TAGS = { ATypeTag.BINARY, ATypeTag.INT32 };
-
-        @Override
-        public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
-            resultStorage.reset();
-            ATypeTag argTag0 = evaluateTuple(tuple, 0);
-            ATypeTag argTag1 = evaluateTuple(tuple, 1);
-
-            try {
-                if (serializeNullIfAnyNull(argTag0, argTag1)) {
-                    result.set(resultStorage);
-                    return;
-                }
-                checkTypeMachingThrowsIfNot(functionName, EXPECTED_INPUT_TAGS, argTag0, argTag1);
-
-                byteArrayPointable.set(pointables[0].getByteArray(), pointables[0].getStartOffset() + 1,
-                        pointables[0].getLength() - 1);
-                byte[] startBytes = pointables[1].getByteArray();
-                int offset = pointables[1].getStartOffset();
-
-                int subStart = 0;
-
-                // strange SQL index convention
-                subStart = ATypeHierarchy.getIntegerValue(startBytes, offset) - 1;
-
-                int totalLength = byteArrayPointable.getContentLength();
-                int subLength = getSubLength(tuple);
-
-                if (subStart < 0) {
-                    subStart = 0;
-                }
-
-                if (subStart >= totalLength || subLength < 0) {
-                    subLength = 0;
-                } else if (subLength > totalLength // for the IntMax case
-                        || subStart + subLength > totalLength) {
-                    subLength = totalLength - subStart;
-                }
-
-                dataOutput.write(ATypeTag.BINARY.serialize());
-                int metaLength = VarLenIntEncoderDecoder.encode(subLength, metaBuffer, 0);
-                dataOutput.write(metaBuffer, 0, metaLength);
-                dataOutput.write(byteArrayPointable.getByteArray(),
-                        byteArrayPointable.getContentStartOffset() + subStart, subLength);
-            } catch (HyracksDataException e) {
-                throw new AlgebricksException(e);
-            } catch (IOException e) {
-                throw new AlgebricksException(e);
-            }
-            result.set(resultStorage);
-        }
-
-        protected abstract int getSubLength(IFrameTupleReference tuple) throws AlgebricksException;
-    }
 }
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 dd70d1e..f3257ca 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
@@ -23,12 +23,9 @@
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.util.NonTaggedFormatUtil;
@@ -37,7 +34,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.IntegerPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -71,14 +67,11 @@
             private IPointable inputArg1 = new VoidPointable();
             private IScalarEvaluator eval0 = recordEvalFactory.createScalarEvaluator(ctx);
             private IScalarEvaluator eval1 = fieldIndexEvalFactory.createScalarEvaluator(ctx);
-            @SuppressWarnings("unchecked")
-            private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.ANULL);
             private int fieldIndex;
             private int fieldValueOffset;
             private int fieldValueLength;
             private IAType fieldValueType;
-            private ATypeTag fieldValueTypeTag = ATypeTag.NULL;
+            private ATypeTag fieldValueTypeTag;
 
             /*
              * inputArg0: the record
@@ -94,12 +87,6 @@
                     byte[] serRecord = inputArg0.getByteArray();
                     int offset = inputArg0.getStartOffset();
 
-                    if (serRecord[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                        nullSerde.serialize(ANull.NULL, out);
-                        result.set(resultStorage);
-                        return;
-                    }
-
                     if (serRecord[offset] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                         throw new AlgebricksException("Field accessor is not defined for values of type "
                                 + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[offset]));
@@ -119,7 +106,7 @@
 
                     if (fieldValueType.getTypeTag().equals(ATypeTag.UNION)) {
                         if (((AUnionType) fieldValueType).isNullableType()) {
-                            fieldValueTypeTag = ((AUnionType) fieldValueType).getNullableType().getTypeTag();
+                            fieldValueTypeTag = ((AUnionType) fieldValueType).getActualType().getTypeTag();
                             fieldValueLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, fieldValueOffset,
                                     fieldValueTypeTag, false);
                             out.writeByte(fieldValueTypeTag.serialize());
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 d11c91e..62779f3 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
@@ -23,18 +23,14 @@
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.util.NonTaggedFormatUtil;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -64,12 +60,9 @@
             private IPointable inputArg1 = new VoidPointable();
             private IScalarEvaluator eval0 = recordEvalFactory.createScalarEvaluator(ctx);
             private IScalarEvaluator eval1 = fldNameEvalFactory.createScalarEvaluator(ctx);
-            @SuppressWarnings("unchecked")
-            private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.ANULL);
             private int fieldValueOffset;
             private int fieldValueLength;
-            private ATypeTag fieldValueTypeTag = ATypeTag.NULL;
+            private ATypeTag fieldValueTypeTag;
 
             @Override
             public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
@@ -81,12 +74,6 @@
                     int serRecordOffset = inputArg0.getStartOffset();
                     int serRecordLen = inputArg0.getLength();
 
-                    if (serRecord[serRecordOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                        nullSerde.serialize(ANull.NULL, out);
-                        result.set(resultStorage);
-                        return;
-                    }
-
                     if (serRecord[serRecordOffset] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                         throw new AlgebricksException(AsterixBuiltinFunctions.FIELD_ACCESS_BY_NAME.getName()
                                 + ": expects input type NULL or RECORD, but got "
@@ -98,7 +85,7 @@
                     fieldValueOffset = ARecordSerializerDeserializer.getFieldOffsetByName(serRecord, serRecordOffset,
                             serRecordLen, serFldName, serFldNameOffset);
                     if (fieldValueOffset < 0) {
-                        out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                        out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
                         result.set(resultStorage);
                         return;
                     }
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 7d307439d..92e40cc 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
@@ -25,6 +25,7 @@
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.types.ARecordType;
@@ -35,7 +36,6 @@
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.types.runtime.RuntimeRecordTypeInfo;
 import org.apache.asterix.om.util.NonTaggedFormatUtil;
-import org.apache.commons.lang.NotImplementedException;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
@@ -79,6 +79,9 @@
             @SuppressWarnings("unchecked")
             private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
                     .getSerializerDeserializer(BuiltinType.ANULL);
+            @SuppressWarnings("unchecked")
+            private final ISerializerDeserializer<AMissing> missingSerde = AqlSerializerDeserializerProvider.INSTANCE
+                    .getSerializerDeserializer(BuiltinType.AMISSING);
 
             {
                 generateFieldsPointables();
@@ -115,11 +118,6 @@
                     int start = offset;
                     int len = inputArg0.getLength();
 
-                    if (serRecord[start] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                        nullSerde.serialize(ANull.NULL, out);
-                        result.set(resultStorage);
-                        return;
-                    }
                     if (serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                         throw new AlgebricksException("Field accessor is not defined for values of type "
                                 + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[start]));
@@ -133,7 +131,7 @@
                     IAType subType = recordType;
                     recTypeInfos[0].reset(recordType);
 
-                    ATypeTag subTypeTag = ATypeTag.NULL;
+                    ATypeTag subTypeTag = ATypeTag.MISSING;
                     boolean openField = false;
                     int pathIndex = 0;
 
@@ -141,7 +139,7 @@
                     for (; pathIndex < fieldPointables.length; pathIndex++) {
                         if (subType.getTypeTag().equals(ATypeTag.UNION)) {
                             //enforced SubType
-                            subType = ((AUnionType) subType).getNullableType();
+                            subType = ((AUnionType) subType).getActualType();
                             if (subType.getTypeTag().serialize() != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         "Field accessor is not defined for values of type " + subTypeTag);
@@ -161,7 +159,8 @@
                                 subFieldIndex, nullBitmapSize, ((ARecordType) subType).isOpen());
                         if (subFieldOffset == 0) {
                             // the field is null, we checked the null bit map
-                            out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                            // any path after null will return null.
+                            nullSerde.serialize(ANull.NULL, out);
                             result.set(resultStorage);
                             return;
                         }
@@ -171,14 +170,9 @@
                             recTypeInfos[pathIndex + 1].reset((ARecordType) subType);
                         }
                         if (subType.getTypeTag().equals(ATypeTag.UNION)) {
-                            if (((AUnionType) subType).isNullableType()) {
-                                subTypeTag = ((AUnionType) subType).getNullableType().getTypeTag();
-                                subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset,
-                                        subTypeTag, false);
-                            } else {
-                                // union .. the general case
-                                throw new NotImplementedException();
-                            }
+                            subTypeTag = ((AUnionType) subType).getActualType().getTypeTag();
+                            subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset,
+                                    subTypeTag, false);
                         } else {
                             subTypeTag = subType.getTypeTag();
                             subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset,
@@ -192,17 +186,12 @@
                             subRecordTmpStream.write(serRecord, subFieldOffset, subFieldLength);
                             serRecord = subRecordTmpStream.getByteArray();
                             start = 0;
-
-                            // type check
-                            if (serRecord[start] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-                            if (serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
-                                throw new AlgebricksException("Field accessor is not defined for values of type "
-                                        + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[start]));
-                            }
+                        }
+                        // type check
+                        if (pathIndex < fieldPointables.length - 1
+                                && serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
+                            throw new AlgebricksException("Field accessor is not defined for values of type "
+                                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[start]));
                         }
                     }
 
@@ -212,7 +201,7 @@
                         subFieldOffset = ARecordSerializerDeserializer.getFieldOffsetByName(serRecord, start, len,
                                 fieldPointables[pathIndex].getByteArray(), fieldPointables[pathIndex].getStartOffset());
                         if (subFieldOffset < 0) {
-                            out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                            out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
                             result.set(resultStorage);
                             return;
                         }
@@ -221,21 +210,22 @@
                         subFieldLength = NonTaggedFormatUtil.getFieldValueLength(serRecord, subFieldOffset, subTypeTag,
                                 true) + 1;
 
-                        if (pathIndex < fieldPointables.length - 1) {
-                            //setup next iteration
-                            start = subFieldOffset;
-                            len = subFieldLength;
+                        if (pathIndex >= fieldPointables.length - 1) {
+                            continue;
+                        }
+                        //setup next iteration
+                        start = subFieldOffset;
+                        len = subFieldLength;
 
-                            // type check
-                            if (serRecord[start] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-                            if (serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
-                                throw new AlgebricksException("Field accessor is not defined for values of type "
-                                        + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[start]));
-                            }
+                        // type check
+                        if (serRecord[start] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+                            missingSerde.serialize(AMissing.MISSING, out);
+                            result.set(resultStorage);
+                            return;
+                        }
+                        if (serRecord[start] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
+                            throw new AlgebricksException("Field accessor is not defined for values of type "
+                                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[start]));
                         }
                     }
                     // emit the final result.
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 71ce3a9..80e5fa5 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
@@ -23,11 +23,8 @@
 
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.serde.ARecordSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.runtime.RuntimeRecordTypeInfo;
 import org.apache.asterix.om.util.NonTaggedFormatUtil;
@@ -35,7 +32,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -67,10 +63,6 @@
             private final IPointable inputArg1 = new VoidPointable();
             private final IScalarEvaluator recordEval = recordEvalFactory.createScalarEvaluator(ctx);
             private final IScalarEvaluator fieldNameEval = fldNameEvalFactory.createScalarEvaluator(ctx);
-
-            @SuppressWarnings("unchecked")
-            private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.ANULL);
             private final RuntimeRecordTypeInfo recTypeInfo = new RuntimeRecordTypeInfo();
 
             {
@@ -85,21 +77,12 @@
                     byte[] serFldName = inputArg1.getByteArray();
                     int serFldNameOffset = inputArg1.getStartOffset();
                     int serFldNameLen = inputArg1.getLength();
-                    if (serFldName[serFldNameOffset] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
-                        nullSerde.serialize(ANull.NULL, out);
-                        result.set(resultStorage);
-                        return;
-                    }
 
                     recordEval.evaluate(tuple, inputArg0);
                     byte[] serRecord = inputArg0.getByteArray();
                     int serRecordOffset = inputArg0.getStartOffset();
                     int serRecordLen = inputArg0.getLength();
-                    if (serRecord[serRecordOffset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                        nullSerde.serialize(ANull.NULL, out);
-                        result.set(resultStorage);
-                        return;
-                    }
+
                     if (serRecord[serRecordOffset] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                         throw new AlgebricksException("Field accessor is not defined for values of type "
                                 + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(serRecord[serRecordOffset]));
@@ -134,7 +117,7 @@
                     subFieldOffset = ARecordSerializerDeserializer.getFieldOffsetByName(serRecord, serRecordOffset,
                             serRecordLen, serFldName, serFldNameOffset);
                     if (subFieldOffset < 0) {
-                        out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+                        out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
                         result.set(resultStorage);
                         return;
                     }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldsEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldsEvalFactory.java
index a24906d..0471b74 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldsEvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/GetRecordFieldsEvalFactory.java
@@ -22,19 +22,14 @@
 import java.io.IOException;
 
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.pointables.nonvisitor.ARecordPointable;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -56,10 +51,6 @@
     public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
         return new IScalarEvaluator() {
 
-            @SuppressWarnings("unchecked")
-            private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.ANULL);
-
             private final ARecordPointable recordPointable = (ARecordPointable) ARecordPointable.FACTORY
                     .createPointable();
             private IPointable inputArg0 = new VoidPointable();
@@ -76,16 +67,6 @@
                 int offset = inputArg0.getStartOffset();
                 int len = inputArg0.getLength();
 
-                if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                    try {
-                        nullSerde.serialize(ANull.NULL, out);
-                        result.set(resultStorage);
-                        return;
-                    } catch (HyracksDataException e) {
-                        throw new AlgebricksException(e);
-                    }
-                }
-
                 if (data[offset] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                     throw new AlgebricksException("Field accessor is not defined for values of type "
                             + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(data[offset]));
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java
index eee240b..6565935 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java
@@ -26,8 +26,6 @@
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.comparators.ListItemBinaryComparatorFactory;
 import org.apache.asterix.dataflow.data.nontagged.hash.ListItemBinaryHashFunctionFactory;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -36,11 +34,10 @@
 import org.apache.asterix.om.pointables.PointableAllocator;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
-import org.apache.asterix.om.typecomputer.impl.TypeComputerUtils;
+import org.apache.asterix.om.typecomputer.impl.TypeComputeUtils;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.types.runtime.RuntimeRecordTypeInfo;
@@ -54,7 +51,6 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunction;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -76,9 +72,9 @@
     private IAType inputFieldListItemType;
 
     public void reset(IAType outType, IAType inType0, IAType inType1) {
-        outRecType = TypeComputerUtils.extractRecordType(outType);
-        inRecType = TypeComputerUtils.extractRecordType(inType0);
-        inListType = TypeComputerUtils.extractOrderedListType(inType1);
+        outRecType = TypeComputeUtils.extractRecordType(outType);
+        inRecType = TypeComputeUtils.extractRecordType(inType0);
+        inListType = TypeComputeUtils.extractOrderedListType(inType1);
         inputFieldListItemType = inListType.getItemType();
         if (inputFieldListItemType == null || inputFieldListItemType.getTypeTag() == ATypeTag.ANY) {
             inputFieldListItemType = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
@@ -91,9 +87,6 @@
         return new IScalarEvaluatorFactory() {
 
             private static final long serialVersionUID = 1L;
-            @SuppressWarnings("unchecked")
-            private final ISerializerDeserializer<ANull> nullSerDe = AqlSerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.ANULL);
 
             @Override
             public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
@@ -134,7 +127,6 @@
                             .createBinaryComparator();
                     private BinaryHashMap hashMap = new BinaryHashMap(TABLE_SIZE, TABLE_FRAME_SIZE, putHashFunc,
                             getHashFunc, cmp);
-
                     private ArrayBackedValueStorage resultStorage = new ArrayBackedValueStorage();
                     private DataOutput out = resultStorage.getDataOutput();
 
@@ -146,18 +138,6 @@
                         eval0.evaluate(tuple, argPtr0);
                         eval1.evaluate(tuple, argPtr1);
 
-                        if (argPtr0.getByteArray()[argPtr0.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                || argPtr1.getByteArray()[argPtr1
-                                        .getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                            try {
-                                nullSerDe.serialize(ANull.NULL, out);
-                            } catch (HyracksDataException e) {
-                                throw new AlgebricksException(e);
-                            }
-                            result.set(resultStorage);
-                            return;
-                        }
-
                         // Make sure we get a valid record
                         if (argPtr0.getByteArray()[argPtr0.getStartOffset()] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                             throw new AlgebricksException("Expected an ordederlist of type " + inRecType + " but "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor.java
index 0f11a48..2f54c9e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor.java
@@ -25,8 +25,6 @@
 
 import org.apache.asterix.builders.RecordBuilder;
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -34,10 +32,9 @@
 import org.apache.asterix.om.pointables.PointableAllocator;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
-import org.apache.asterix.om.typecomputer.impl.TypeComputerUtils;
+import org.apache.asterix.om.typecomputer.impl.TypeComputeUtils;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
 import org.apache.asterix.om.types.runtime.RuntimeRecordTypeInfo;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
@@ -48,8 +45,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -78,9 +73,9 @@
     private ARecordType inRecType1;
 
     public void reset(IAType outType, IAType inType0, IAType inType1) {
-        outRecType = TypeComputerUtils.extractRecordType(outType);
-        inRecType0 = TypeComputerUtils.extractRecordType(inType0);
-        inRecType1 = TypeComputerUtils.extractRecordType(inType1);
+        outRecType = TypeComputeUtils.extractRecordType(outType);
+        inRecType0 = TypeComputeUtils.extractRecordType(inType0);
+        inRecType1 = TypeComputeUtils.extractRecordType(inType1);
     }
 
     @Override
@@ -90,10 +85,6 @@
 
             private static final long serialVersionUID = 1L;
 
-            @SuppressWarnings("unchecked")
-            private final ISerializerDeserializer<ANull> nullSerDe = AqlSerializerDeserializerProvider.INSTANCE
-                    .getSerializerDeserializer(BuiltinType.ANULL);
-
             @Override
             public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws AlgebricksException {
                 final PointableAllocator pa = new PointableAllocator();
@@ -123,17 +114,6 @@
                         eval0.evaluate(tuple, argPtr0);
                         eval1.evaluate(tuple, argPtr1);
 
-                        if (argPtr0.getByteArray()[argPtr0.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                || argPtr1.getByteArray()[argPtr1.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                            try {
-                                nullSerDe.serialize(ANull.NULL, out);
-                            } catch (HyracksDataException e) {
-                                throw new AlgebricksException(e);
-                            }
-                            result.set(resultStorage);
-                            return;
-                        }
-
                         vp0.set(argPtr0);
                         vp1.set(argPtr1);
 
@@ -151,7 +131,7 @@
 
                     private void mergeFields(ARecordType combinedType, ARecordVisitablePointable leftRecord,
                             ARecordVisitablePointable rightRecord, boolean openFromParent, int nestedLevel)
-                                    throws IOException, AsterixException, AlgebricksException {
+                            throws IOException, AsterixException, AlgebricksException {
                         if (rbStack.size() < (nestedLevel + 1)) {
                             rbStack.add(new RecordBuilder());
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordRemoveFieldsEvalFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordRemoveFieldsEvalFactory.java
index 57c6d01..68865c3 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordRemoveFieldsEvalFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordRemoveFieldsEvalFactory.java
@@ -28,8 +28,6 @@
 
 import org.apache.asterix.builders.RecordBuilder;
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.pointables.AListVisitablePointable;
 import org.apache.asterix.om.pointables.ARecordVisitablePointable;
@@ -39,7 +37,6 @@
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.runtime.RuntimeRecordTypeInfo;
 import org.apache.asterix.runtime.evaluators.functions.PointableHelper;
@@ -47,7 +44,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -56,9 +52,6 @@
 
 class RecordRemoveFieldsEvalFactory implements IScalarEvaluatorFactory {
     private static final long serialVersionUID = 1L;
-    @SuppressWarnings("unchecked")
-    private final ISerializerDeserializer<ANull> nullSerDe = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.ANULL);
     private IScalarEvaluatorFactory inputRecordEvalFactory;
     private IScalarEvaluatorFactory removeFieldPathsFactory;
     private ARecordType requiredRecType;
@@ -103,16 +96,6 @@
                 eval0.evaluate(tuple, inputArg0);
                 eval1.evaluate(tuple, inputArg1);
 
-                if (inputArg0.getByteArray()[inputArg0.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                    try {
-                        nullSerDe.serialize(ANull.NULL, out);
-                    } catch (HyracksDataException e) {
-                        throw new AlgebricksException(e);
-                    }
-                    result.set(resultStorage);
-                    return;
-                }
-
                 if (inputArg0.getByteArray()[inputArg0.getStartOffset()] != ATypeTag.SERIALIZED_RECORD_TYPE_TAG) {
                     throw new AlgebricksException(
                             AsterixBuiltinFunctions.REMOVE_FIELDS.getName() + ": expects input type " + inputRecType
@@ -146,7 +129,7 @@
 
             private void processRecord(ARecordType requiredType, ARecordVisitablePointable srp,
                     AListVisitablePointable inputList, int nestedLevel)
-                            throws IOException, AsterixException, AlgebricksException {
+                    throws IOException, AsterixException, AlgebricksException {
                 if (rbStack.size() < (nestedLevel + 1)) {
                     rbStack.add(new RecordBuilder());
                 }
@@ -177,7 +160,7 @@
             private void addKeptFieldToSubRecord(ARecordType requiredType, IVisitablePointable fieldNamePointable,
                     IVisitablePointable fieldValuePointable, IVisitablePointable fieldTypePointable,
                     AListVisitablePointable inputList, int nestedLevel)
-                            throws IOException, AsterixException, AlgebricksException {
+                    throws IOException, AsterixException, AlgebricksException {
 
                 runtimeRecordTypeInfo.reset(requiredType);
                 int pos = runtimeRecordTypeInfo.getFieldIndex(fieldNamePointable.getByteArray(),
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 1cd3919..413459b 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
@@ -22,7 +22,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
@@ -42,9 +41,6 @@
 public abstract class AbstractIntervalLogicFuncDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private final static long serialVersionUID = 1L;
 
-    /* (non-Javadoc)
-     * @see org.apache.asterix.runtime.base.IScalarFunctionDynamicDescriptor#createEvaluatorFactory(org.apache.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory[])
-     */
     @Override
     public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
             throws AlgebricksException {
@@ -73,9 +69,6 @@
 
                     // possible output types
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ABoolean> booleanSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
 
@@ -86,13 +79,6 @@
                         eval1.evaluate(tuple, argPtr1);
 
                         try {
-                            if (argPtr0.getTag() == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || argPtr1.getTag() == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (argPtr0.getTag() != ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG
                                     || argPtr1.getTag() != ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
@@ -109,7 +95,7 @@
                                         + ": failed to compare intervals with different internal time type.");
                             }
 
-                            ABoolean res = (compareIntervals(il, interval0, interval1)) ? ABoolean.TRUE : ABoolean.FALSE;
+                            ABoolean res = compareIntervals(il, interval0, interval1) ? ABoolean.TRUE : ABoolean.FALSE;
 
                             booleanSerde.serialize(res, out);
                         } catch (HyracksDataException hex) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java
index 6c445e2..1ce0c9c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustDateTimeForTimeZoneDescriptor.java
@@ -21,8 +21,6 @@
 import java.io.DataOutput;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADateTimeSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ATimeParserFactory;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem.Fields;
@@ -30,7 +28,6 @@
 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.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -38,7 +35,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -80,10 +76,6 @@
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
                     // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     private GregorianCalendarSystem calInstance = GregorianCalendarSystem.getInstance();
 
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
@@ -102,13 +94,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         FID.getName() + ": expects type DATETIME/NULL for parameter 0 but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java
index 72e4200..bab00bd 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/AdjustTimeForTimeZoneDescriptor.java
@@ -21,8 +21,6 @@
 import java.io.DataOutput;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ATimeSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.ATimeParserFactory;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem.Fields;
@@ -30,7 +28,6 @@
 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.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -38,7 +35,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -78,11 +74,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     private GregorianCalendarSystem calInstance = GregorianCalendarSystem.getInstance();
                     private final UTF8StringWriter writer = new UTF8StringWriter();
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
@@ -100,13 +91,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_TIME_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         FID.getName() + ": expects type TIME/NULL for parameter 0 but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDuartionFromDateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDuartionFromDateDescriptor.java
index 418ad68..e38da7e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDuartionFromDateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDuartionFromDateDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADuration;
 import org.apache.asterix.om.base.AMutableDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.DurationArithmeticOperations;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -80,10 +79,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADuration> durationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADURATION);
@@ -104,13 +99,6 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DATE_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         FID.getName() + ": expects type DATE/NULL for parameter 0 but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDurationFromDateTimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDurationFromDateTimeDescriptor.java
index dcef6ab..c42865c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDurationFromDateTimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/CalendarDurationFromDateTimeDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADuration;
 import org.apache.asterix.om.base.AMutableDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.DurationArithmeticOperations;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -95,10 +94,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADuration> durationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADURATION);
@@ -119,13 +114,6 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         FID.getName() + ": expects type DATETIME/NULL for parameter 0 but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromDatetimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromDatetimeDescriptor.java
index bcdb20f..d4fa0e6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromDatetimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromDatetimeDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADate;
 import org.apache.asterix.om.base.AMutableDate;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -79,10 +78,6 @@
                             .getSerializerDeserializer(BuiltinType.ADATE);
                     private AMutableDate aDate = new AMutableDate(0);
 
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
@@ -91,24 +86,19 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                if (bytes[offset] != ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
-                                    throw new AlgebricksException(
-                                            FID.getName() + ": expects input type DATETIME/NULL but got "
-                                                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
-                                }
-                                long datetimeChronon = ADateTimeSerializerDeserializer.getChronon(bytes, offset + 1);
-                                int dateChrononInDays = (int) (datetimeChronon
-                                        / GregorianCalendarSystem.CHRONON_OF_DAY);
-                                if (dateChrononInDays < 0
-                                        && datetimeChronon % GregorianCalendarSystem.CHRONON_OF_DAY != 0) {
-                                    dateChrononInDays -= 1;
-                                }
-                                aDate.setValue(dateChrononInDays);
-                                dateSerde.serialize(aDate, out);
+                            if (bytes[offset] != ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
+                                throw new AlgebricksException(
+                                        FID.getName() + ": expects input type DATETIME/NULL but got "
+                                                + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
                             }
+                            long datetimeChronon = ADateTimeSerializerDeserializer.getChronon(bytes, offset + 1);
+                            int dateChrononInDays = (int) (datetimeChronon / GregorianCalendarSystem.CHRONON_OF_DAY);
+                            if (dateChrononInDays < 0
+                                    && datetimeChronon % GregorianCalendarSystem.CHRONON_OF_DAY != 0) {
+                                dateChrononInDays -= 1;
+                            }
+                            aDate.setValue(dateChrononInDays);
+                            dateSerde.serialize(aDate, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromUnixTimeInDaysDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromUnixTimeInDaysDescriptor.java
index b6f7a2e..5fa57f6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromUnixTimeInDaysDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DateFromUnixTimeInDaysDescriptor.java
@@ -23,11 +23,9 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADate;
 import org.apache.asterix.om.base.AMutableDate;
-import org.apache.asterix.om.base.ANull;
 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.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
@@ -77,22 +75,15 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADate> dateSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATE);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
                         eval.evaluate(tuple, argPtr);
                         try {
-                            if (argPtr.getByteArray()[argPtr.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                aDate.setValue(
-                                        ATypeHierarchy.getIntegerValue(argPtr.getByteArray(), argPtr.getStartOffset()));
-                                dateSerde.serialize(aDate, out);
-                            }
+                            aDate.setValue(
+                                    ATypeHierarchy.getIntegerValue(argPtr.getByteArray(), argPtr.getStartOffset()));
+                            dateSerde.serialize(aDate, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromDateAndTimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromDateAndTimeDescriptor.java
index ab88265..98f84aa 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromDateAndTimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromDateAndTimeDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADateTime;
 import org.apache.asterix.om.base.AMutableDateTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -85,10 +84,6 @@
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
                     private AMutableDateTime aDateTime = new AMutableDateTime(0);
 
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
@@ -101,27 +96,21 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                if (bytes0[offset0] != ATypeTag.SERIALIZED_DATE_TYPE_TAG
-                                        && bytes1[offset1] != ATypeTag.SERIALIZED_TIME_TYPE_TAG) {
-                                    throw new AlgebricksException(FID.getName()
-                                            + ": expects input type (DATE/NULL, TIME/NULL) but got ("
-                                            + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]) + ", "
-                                            + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1])
-                                            + ").");
+                            if (bytes0[offset0] != ATypeTag.SERIALIZED_DATE_TYPE_TAG
+                                    && bytes1[offset1] != ATypeTag.SERIALIZED_TIME_TYPE_TAG) {
+                                throw new AlgebricksException(FID.getName()
+                                        + ": expects input type (DATE/NULL, TIME/NULL) but got ("
+                                        + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]) + ", "
+                                        + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1]) + ").");
 
-                                }
-
-                                long datetimeChronon = ADateSerializerDeserializer.getChronon(bytes0, offset0 + 1)
-                                        * GregorianCalendarSystem.CHRONON_OF_DAY
-                                        + ATimeSerializerDeserializer.getChronon(bytes1, offset1 + 1);
-
-                                aDateTime.setValue(datetimeChronon);
-                                datetimeSerde.serialize(aDateTime, out);
                             }
+
+                            long datetimeChronon = ADateSerializerDeserializer.getChronon(bytes0, offset0 + 1)
+                                    * GregorianCalendarSystem.CHRONON_OF_DAY
+                                    + ATimeSerializerDeserializer.getChronon(bytes1, offset1 + 1);
+
+                            aDateTime.setValue(datetimeChronon);
+                            datetimeSerde.serialize(aDateTime, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInMsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInMsDescriptor.java
index fae8566..d9c0156 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInMsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInMsDescriptor.java
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADateTime;
 import org.apache.asterix.om.base.AMutableDateTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -82,9 +81,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     private AMutableDateTime aDatetime = new AMutableDateTime(0);
 
@@ -96,29 +92,24 @@
                         int offset = argPtr.getStartOffset();
                         try {
                             ATypeTag argPtrTypeTag = ATypeTag.VALUE_TYPE_MAPPING[bytes[offset]];
-                            if (argPtrTypeTag == ATypeTag.NULL) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                switch (argPtrTypeTag) {
-                                    case INT8:
-                                        aDatetime.setValue(AInt8SerializerDeserializer.getByte(bytes, offset + 1));
-                                        break;
-                                    case INT16:
-                                        aDatetime.setValue(AInt16SerializerDeserializer.getShort(bytes, offset + 1));
-                                        break;
-                                    case INT32:
-                                        aDatetime.setValue(AInt32SerializerDeserializer.getInt(bytes, offset + 1));
-                                        break;
-                                    case INT64:
-                                        aDatetime.setValue(AInt64SerializerDeserializer.getLong(bytes, offset + 1));
-                                        break;
-                                    default:
-                                        throw new AlgebricksException(
-                                                FID.getName() + ": expects type INT8/INT16/INT32/INT64/NULL but got "
-                                                        + argPtrTypeTag);
-                                }
-                                datetimeSerde.serialize(aDatetime, out);
+                            switch (argPtrTypeTag) {
+                                case INT8:
+                                    aDatetime.setValue(AInt8SerializerDeserializer.getByte(bytes, offset + 1));
+                                    break;
+                                case INT16:
+                                    aDatetime.setValue(AInt16SerializerDeserializer.getShort(bytes, offset + 1));
+                                    break;
+                                case INT32:
+                                    aDatetime.setValue(AInt32SerializerDeserializer.getInt(bytes, offset + 1));
+                                    break;
+                                case INT64:
+                                    aDatetime.setValue(AInt64SerializerDeserializer.getLong(bytes, offset + 1));
+                                    break;
+                                default:
+                                    throw new AlgebricksException(FID.getName()
+                                            + ": expects type INT8/INT16/INT32/INT64/NULL but got " + argPtrTypeTag);
                             }
+                            datetimeSerde.serialize(aDatetime, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInSecsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInSecsDescriptor.java
index 1450ce6..a0258b6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInSecsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DatetimeFromUnixTimeInSecsDescriptor.java
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADateTime;
 import org.apache.asterix.om.base.AMutableDateTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -82,9 +81,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     private AMutableDateTime aDatetime = new AMutableDateTime(0);
 
@@ -100,33 +96,25 @@
 
                             ATypeTag argPtrTypeTag = ATypeTag.VALUE_TYPE_MAPPING[bytes[offset]];
 
-                            if (argPtrTypeTag == ATypeTag.NULL) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                switch (argPtrTypeTag) {
-                                    case INT8:
-                                        aDatetime.setValue(
-                                                (AInt8SerializerDeserializer.getByte(bytes, offset + 1) * 1000l));
-                                        break;
-                                    case INT16:
-                                        aDatetime.setValue(
-                                                (AInt16SerializerDeserializer.getShort(bytes, offset + 1) * 1000l));
-                                        break;
-                                    case INT32:
-                                        aDatetime.setValue(
-                                                (AInt32SerializerDeserializer.getInt(bytes, offset + 1) * 1000l));
-                                        break;
-                                    case INT64:
-                                        aDatetime.setValue(
-                                                (AInt64SerializerDeserializer.getLong(bytes, offset + 1) * 1000l));
-                                        break;
-                                    default:
-                                        throw new AlgebricksException(
-                                                FID.getName() + ": expects type INT8/INT16/INT32/INT64/NULL but got "
-                                                        + argPtrTypeTag);
-                                }
-                                datetimeSerde.serialize(aDatetime, out);
+                            switch (argPtrTypeTag) {
+                                case INT8:
+                                    aDatetime.setValue(AInt8SerializerDeserializer.getByte(bytes, offset + 1) * 1000l);
+                                    break;
+                                case INT16:
+                                    aDatetime
+                                            .setValue(AInt16SerializerDeserializer.getShort(bytes, offset + 1) * 1000l);
+                                    break;
+                                case INT32:
+                                    aDatetime.setValue(AInt32SerializerDeserializer.getInt(bytes, offset + 1) * 1000l);
+                                    break;
+                                case INT64:
+                                    aDatetime.setValue(AInt64SerializerDeserializer.getLong(bytes, offset + 1) * 1000l);
+                                    break;
+                                default:
+                                    throw new AlgebricksException(FID.getName()
+                                            + ": expects type INT8/INT16/INT32/INT64/NULL but got " + argPtrTypeTag);
                             }
+                            datetimeSerde.serialize(aDatetime, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayOfWeekDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayOfWeekDescriptor.java
index d7b5044..e1fe88b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayOfWeekDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayOfWeekDescriptor.java
@@ -25,7 +25,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -83,10 +82,6 @@
                             .getSerializerDeserializer(BuiltinType.AINT64);
                     private AMutableInt64 aInt64 = new AMutableInt64(0);
 
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
@@ -96,46 +91,42 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
+                            int daysSinceAnchor;
+                            int reminder = 0;
+                            if (bytes[offset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
+                                daysSinceAnchor = (int) (ADateTimeSerializerDeserializer.getChronon(bytes, offset + 1)
+                                        / GregorianCalendarSystem.CHRONON_OF_DAY);
+                                reminder = (int) (ADateTimeSerializerDeserializer.getChronon(bytes, offset + 1)
+                                        % GregorianCalendarSystem.CHRONON_OF_DAY);
+                            } else if (bytes[offset] == ATypeTag.SERIALIZED_DATE_TYPE_TAG) {
+                                daysSinceAnchor = ADateSerializerDeserializer.getChronon(bytes, offset + 1);
                             } else {
-                                int daysSinceAnchor;
-                                int reminder = 0;
-                                if (bytes[offset] == ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
-                                    daysSinceAnchor = (int) (ADateTimeSerializerDeserializer.getChronon(bytes,
-                                            offset + 1) / GregorianCalendarSystem.CHRONON_OF_DAY);
-                                    reminder = (int) (ADateTimeSerializerDeserializer.getChronon(bytes, offset + 1)
-                                            % GregorianCalendarSystem.CHRONON_OF_DAY);
-                                } else if (bytes[offset] == ATypeTag.SERIALIZED_DATE_TYPE_TAG) {
-                                    daysSinceAnchor = ADateSerializerDeserializer.getChronon(bytes, offset + 1);
-                                } else {
-                                    throw new AlgebricksException(
-                                            FID.getName() + ": expects input type DATETIME/DATE/NULL but got "
-                                                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
-                                }
-
-                                // adjust the day before 1970-01-01
-                                if (daysSinceAnchor < 0 && reminder != 0) {
-                                    daysSinceAnchor -= 1;
-                                }
-
-                                // compute the weekday (0-based, and 0 = Sunday). Adjustment is needed as the anchor day is Thursday
-                                int weekday = (daysSinceAnchor + ANCHOR_WEEKDAY) % 7;
-
-                                // handle the negative weekday
-                                if (weekday < 0) {
-                                    weekday += 7;
-                                }
-
-                                // convert from 0-based to 1-based (so 7 = Sunday)
-                                if (weekday == 0) {
-                                    weekday = 7;
-                                }
-
-                                aInt64.setValue(weekday);
-
-                                int64Serde.serialize(aInt64, out);
+                                throw new AlgebricksException(
+                                        FID.getName() + ": expects input type DATETIME/DATE/NULL but got "
+                                                + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
                             }
+
+                            // adjust the day before 1970-01-01
+                            if (daysSinceAnchor < 0 && reminder != 0) {
+                                daysSinceAnchor -= 1;
+                            }
+
+                            // compute the weekday (0-based, and 0 = Sunday). Adjustment is needed as
+                            // the anchor day is Thursday.
+                            int weekday = (daysSinceAnchor + ANCHOR_WEEKDAY) % 7;
+
+                            // handle the negative weekday
+                            if (weekday < 0) {
+                                weekday += 7;
+                            }
+
+                            // convert from 0-based to 1-based (so 7 = Sunday)
+                            if (weekday == 0) {
+                                weekday = 7;
+                            }
+
+                            aInt64.setValue(weekday);
+                            int64Serde.serialize(aInt64, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationComparatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationComparatorDescriptor.java
index b7d170b..2d29c81 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationComparatorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationComparatorDescriptor.java
@@ -23,10 +23,7 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 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.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -50,26 +47,10 @@
     public final static FunctionIdentifier LESS_THAN_FID = AsterixBuiltinFunctions.DAY_TIME_DURATION_LESS_THAN;
     private final boolean isGreaterThan;
 
-    private DayTimeDurationComparatorDescriptor(boolean isGreaterThan) {
+    protected DayTimeDurationComparatorDescriptor(boolean isGreaterThan) {
         this.isGreaterThan = isGreaterThan;
     }
 
-    public final static IFunctionDescriptorFactory GREATER_THAN_FACTORY = new IFunctionDescriptorFactory() {
-
-        @Override
-        public IFunctionDescriptor createFunctionDescriptor() {
-            return new DayTimeDurationComparatorDescriptor(true);
-        }
-    };
-
-    public final static IFunctionDescriptorFactory LESS_THAN_FACTORY = new IFunctionDescriptorFactory() {
-
-        @Override
-        public IFunctionDescriptor createFunctionDescriptor() {
-            return new DayTimeDurationComparatorDescriptor(false);
-        }
-    };
-
     @Override
     public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
             throws AlgebricksException {
@@ -88,10 +69,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ABoolean> boolSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
@@ -108,13 +85,6 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationGreaterThanComparatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationGreaterThanComparatorDescriptor.java
new file mode 100644
index 0000000..9480508
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationGreaterThanComparatorDescriptor.java
@@ -0,0 +1,39 @@
+/*
+ * 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.evaluators.functions.temporal;
+
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+
+public class DayTimeDurationGreaterThanComparatorDescriptor extends DayTimeDurationComparatorDescriptor {
+    private static final long serialVersionUID = 1L;
+
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+
+        @Override
+        public IFunctionDescriptor createFunctionDescriptor() {
+            return new DayTimeDurationGreaterThanComparatorDescriptor();
+        }
+    };
+
+    protected DayTimeDurationGreaterThanComparatorDescriptor() {
+        super(true);
+    }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationLessThanComparatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationLessThanComparatorDescriptor.java
new file mode 100644
index 0000000..7304ae9
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DayTimeDurationLessThanComparatorDescriptor.java
@@ -0,0 +1,39 @@
+/*
+ * 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.evaluators.functions.temporal;
+
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+
+public class DayTimeDurationLessThanComparatorDescriptor extends DayTimeDurationComparatorDescriptor {
+    private static final long serialVersionUID = 1L;
+
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+
+        @Override
+        public IFunctionDescriptor createFunctionDescriptor() {
+            return new DayTimeDurationLessThanComparatorDescriptor();
+        }
+    };
+
+    protected DayTimeDurationLessThanComparatorDescriptor() {
+        super(false);
+    }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationEqualDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationEqualDescriptor.java
index bd18f0b..0a88684 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationEqualDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationEqualDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -72,10 +71,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ABoolean> boolSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
@@ -92,13 +87,6 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG) {
                                 throw new AlgebricksException(FID.getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromIntervalDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromIntervalDescriptor.java
index 28d2b85..0c4042f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromIntervalDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromIntervalDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADayTimeDuration;
 import org.apache.asterix.om.base.AMutableDayTimeDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -74,10 +73,6 @@
                     private IScalarEvaluator eval = args[0].createScalarEvaluator(ctx);
 
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
-                    @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADayTimeDuration> dayTimeDurationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADAYTIMEDURATION);
 
@@ -92,11 +87,7 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            } else if (bytes[offset] != ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
+                            if (bytes[offset] != ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         FID.getName() + ": expects INTERVAL/NULL as the input but got "
                                                 + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMillisecondsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMillisecondsDescriptor.java
index b1860bb..480cf8f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMillisecondsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMillisecondsDescriptor.java
@@ -27,7 +27,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADuration;
 import org.apache.asterix.om.base.AMutableDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -75,10 +74,6 @@
                     private IPointable argPtr0 = new VoidPointable();
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADuration> durationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADURATION);
@@ -94,29 +89,24 @@
 
                         try {
                             ATypeTag argPtrTypeTag = ATypeTag.VALUE_TYPE_MAPPING[bytes[offset]];
-                            if (argPtrTypeTag == ATypeTag.NULL) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                switch (argPtrTypeTag) {
-                                    case INT8:
-                                        aDuration.setValue(0, AInt8SerializerDeserializer.getByte(bytes, offset + 1));
-                                        break;
-                                    case INT16:
-                                        aDuration.setValue(0, AInt16SerializerDeserializer.getShort(bytes, offset + 1));
-                                        break;
-                                    case INT32:
-                                        aDuration.setValue(0, AInt32SerializerDeserializer.getInt(bytes, offset + 1));
-                                        break;
-                                    case INT64:
-                                        aDuration.setValue(0, AInt64SerializerDeserializer.getLong(bytes, offset + 1));
-                                        break;
-                                    default:
-                                        throw new AlgebricksException(
-                                                FID.getName() + ": expects type INT8/INT16/INT32/INT64/NULL but got "
-                                                        + argPtrTypeTag);
-                                }
-                                durationSerde.serialize(aDuration, out);
+                            switch (argPtrTypeTag) {
+                                case INT8:
+                                    aDuration.setValue(0, AInt8SerializerDeserializer.getByte(bytes, offset + 1));
+                                    break;
+                                case INT16:
+                                    aDuration.setValue(0, AInt16SerializerDeserializer.getShort(bytes, offset + 1));
+                                    break;
+                                case INT32:
+                                    aDuration.setValue(0, AInt32SerializerDeserializer.getInt(bytes, offset + 1));
+                                    break;
+                                case INT64:
+                                    aDuration.setValue(0, AInt64SerializerDeserializer.getLong(bytes, offset + 1));
+                                    break;
+                                default:
+                                    throw new AlgebricksException(FID.getName()
+                                            + ": expects type INT8/INT16/INT32/INT64/NULL but got " + argPtrTypeTag);
                             }
+                            durationSerde.serialize(aDuration, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMonthsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMonthsDescriptor.java
index 334607a..5db6294 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMonthsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/DurationFromMonthsDescriptor.java
@@ -23,11 +23,9 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADuration;
 import org.apache.asterix.om.base.AMutableDuration;
-import org.apache.asterix.om.base.ANull;
 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.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
@@ -71,10 +69,6 @@
                     private IPointable argPtr0 = new VoidPointable();
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADuration> durationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADURATION);
@@ -90,11 +84,6 @@
                         int offset = argPtr0.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
                             aDuration.setValue(ATypeHierarchy.getIntegerValue(bytes, offset), 0);
                             durationSerde.serialize(aDuration, out);
                         } catch (HyracksDataException hex) {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetDayTimeDurationDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetDayTimeDurationDescriptor.java
index b75a5b9..cb84fc8 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetDayTimeDurationDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetDayTimeDurationDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADayTimeDuration;
 import org.apache.asterix.om.base.AMutableDayTimeDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -71,10 +70,6 @@
                     private IPointable argPtr0 = new VoidPointable();
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADayTimeDuration> dayTimeDurationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADAYTIMEDURATION);
@@ -90,12 +85,6 @@
                         int offset = argPtr0.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes[offset] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG) {
                                 throw new AlgebricksException(FID.getName() + ": expects NULL/DURATION, but got "
                                         + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
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 9726058..1de1e48 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
@@ -96,10 +96,7 @@
                         byte type1 = argPtr1.getTag();
 
                         try {
-                            if (type0 == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || type1 == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else if (type0 == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG && type0 == type1) {
+                            if (type0 == ATypeTag.SERIALIZED_INTERVAL_TYPE_TAG && type0 == type1) {
                                 argPtr0.getValue(interval0);
                                 argPtr1.getValue(interval1);
                                 byte intervalType0 = interval0.getType();
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetYearMonthDurationDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetYearMonthDurationDescriptor.java
index d3397c4..d2e4b6e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetYearMonthDurationDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetYearMonthDurationDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableYearMonthDuration;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.AYearMonthDuration;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
@@ -71,10 +70,6 @@
                     private IPointable argPtr0 = new VoidPointable();
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AYearMonthDuration> yearMonthDurationSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AYEARMONTHDURATION);
@@ -90,12 +85,6 @@
                         int offset0 = argPtr0.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG) {
                                 throw new AlgebricksException(FID.getName() + ": expects NULL/DURATION, but got "
                                         + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]));
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBinDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBinDescriptor.java
index 2160910..b584442 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBinDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalBinDescriptor.java
@@ -28,7 +28,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.AMutableInterval;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.DurationArithmeticOperations;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -86,9 +85,6 @@
                     private final AMutableInterval aInterval = new AMutableInterval(0, 0, (byte) -1);
 
                     @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<AInterval> intervalSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINTERVAL);
 
@@ -98,9 +94,11 @@
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
                         eval0.evaluate(tuple, argPtr0);
+                        eval1.evaluate(tuple, argPtr1);
+                        eval2.evaluate(tuple, argPtr2);
+
                         byte[] bytes0 = argPtr0.getByteArray();
                         int offset0 = argPtr0.getStartOffset();
-
                         ATypeTag type0 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes0[offset0]);
 
                         long chrononToBin = 0;
@@ -115,30 +113,18 @@
                             case DATETIME:
                                 chrononToBin = ADateTimeSerializerDeserializer.getChronon(bytes0, offset0 + 1);
                                 break;
-                            case NULL:
-                                try {
-                                    nullSerde.serialize(ANull.NULL, out);
-                                } catch (HyracksDataException e) {
-                                    throw new AlgebricksException(e);
-                                }
-                                result.set(resultStorage);
-                                return;
                             default:
                                 throw new AlgebricksException(getIdentifier().getName()
                                         + ": the first argument should be DATE/TIME/DATETIME/NULL but got " + type0);
-
                         }
 
-                        eval1.evaluate(tuple, argPtr1);
                         byte[] bytes1 = argPtr1.getByteArray();
                         int offset1 = argPtr1.getStartOffset();
                         ATypeTag type1 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1]);
 
                         if (type0 != type1) {
-                            if (type0 != ATypeTag.NULL && type1 != ATypeTag.NULL) {
-                                throw new AlgebricksException(getIdentifier().getName() + ": expecting " + type0
-                                        + " for the second argument but got " + type1);
-                            }
+                            throw new AlgebricksException(getIdentifier().getName() + ": expecting " + type0
+                                    + " for the second argument but got " + type1);
                         }
 
                         long chrononToStart = 0;
@@ -153,20 +139,11 @@
                             case DATETIME:
                                 chrononToStart = ADateTimeSerializerDeserializer.getChronon(bytes1, offset1 + 1);
                                 break;
-                            case NULL:
-                                try {
-                                    nullSerde.serialize(ANull.NULL, out);
-                                } catch (HyracksDataException e) {
-                                    throw new AlgebricksException(e);
-                                }
-                                result.set(resultStorage);
-                                return;
                             default:
                                 throw new AlgebricksException(getIdentifier().getName() + ": expecting " + type0
                                         + " for the second argument but got " + type1);
                         }
 
-                        eval2.evaluate(tuple, argPtr2);
                         byte[] bytes2 = argPtr2.getByteArray();
                         int offset2 = argPtr2.getStartOffset();
                         ATypeTag type2 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes2[offset2]);
@@ -205,16 +182,7 @@
 
                                 binIndex = totalChronon / dayTime
                                         + ((totalChronon < 0 && totalChronon % dayTime != 0) ? -1 : 0);
-
                                 break;
-                            case NULL:
-                                try {
-                                    nullSerde.serialize(ANull.NULL, out);
-                                } catch (HyracksDataException e) {
-                                    throw new AlgebricksException(e);
-                                }
-                                result.set(resultStorage);
-                                return;
                             default:
                                 throw new AlgebricksException(getIdentifier().getName()
                                         + ": expecting YEARMONTHDURATION/DAYTIMEDURATION for the thrid argument but got "
@@ -253,18 +221,9 @@
                                 binEndChronon = DurationArithmeticOperations.addDuration(chrononToStart,
                                         yearMonth * ((int) binIndex + 1), dayTime * (binIndex + 1), false);
                                 break;
-                            case NULL:
-                                try {
-                                    nullSerde.serialize(ANull.NULL, out);
-                                } catch (HyracksDataException e) {
-                                    throw new AlgebricksException(e);
-                                }
-                                result.set(resultStorage);
-                                return;
                             default:
                                 throw new AlgebricksException(getIdentifier().getName()
                                         + ": the first argument should be DATE/TIME/DATETIME/NULL but got " + type0);
-
                         }
                         try {
                             aInterval.setValue(binStartChronon, binEndChronon, type0.serialize());
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDecriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java
similarity index 87%
rename from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDecriptor.java
rename to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java
index 459652e..9571787 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDecriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDescriptor.java
@@ -25,15 +25,14 @@
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 
-public class IntervalEndsDecriptor extends AbstractIntervalLogicFuncDescriptor {
+public class IntervalEndsDescriptor extends AbstractIntervalLogicFuncDescriptor {
+    private static final long serialVersionUID = 1L;
 
-    private final static long serialVersionUID = 1L;
-
-    public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new IntervalEndsDecriptor();
+            return new IntervalEndsDescriptor();
         }
     };
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MillisecondsFromDayTimeDurationDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MillisecondsFromDayTimeDurationDescriptor.java
index 4b1fedd..ffca20751 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MillisecondsFromDayTimeDurationDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MillisecondsFromDayTimeDurationDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -71,10 +70,6 @@
                     private IPointable argPtr0 = new VoidPointable();
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInt64> int64Serde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
@@ -90,12 +85,6 @@
                         int offset = argPtr0.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes[offset] != ATypeTag.SERIALIZED_DAY_TIME_DURATION_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         FID.getName() + ": expects NULL/DAY-TIME-DURATION, but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MonthsFromYearMonthDurationDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MonthsFromYearMonthDurationDescriptor.java
index d7198f1..0d2b934 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MonthsFromYearMonthDurationDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/MonthsFromYearMonthDurationDescriptor.java
@@ -24,7 +24,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMutableInt64;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
@@ -71,10 +70,6 @@
                     private IPointable argPtr0 = new VoidPointable();
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<AInt64> int64Serde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
@@ -90,12 +85,6 @@
                         int offset = argPtr0.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes[offset] != ATypeTag.SERIALIZED_YEAR_MONTH_DURATION_TYPE_TAG) {
                                 throw new AlgebricksException(
                                         FID.getName() + ": expects NULL/YEAR-MONTH-DURATION, but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapBinsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapBinsDescriptor.java
index fcf22e4..836408d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapBinsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/OverlapBinsDescriptor.java
@@ -31,7 +31,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AInterval;
 import org.apache.asterix.om.base.AMutableInterval;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.DurationArithmeticOperations;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -48,7 +47,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -93,10 +91,6 @@
                     protected final AOrderedListType intListType = new AOrderedListType(BuiltinType.AINTERVAL, null);
 
                     private final AMutableInterval aInterval = new AMutableInterval(0, 0, (byte) -1);
-
-                    @SuppressWarnings("unchecked")
-                    private final ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private final ISerializerDeserializer<AInterval> intervalSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINTERVAL);
@@ -107,6 +101,9 @@
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
                         eval0.evaluate(tuple, argPtr0);
+                        eval1.evaluate(tuple, argPtr1);
+                        eval2.evaluate(tuple, argPtr2);
+
                         byte[] bytes0 = argPtr0.getByteArray();
                         int offset0 = argPtr0.getStartOffset();
 
@@ -119,32 +116,18 @@
                             intervalStart = AIntervalSerializerDeserializer.getIntervalStart(bytes0, offset0 + 1);
                             intervalEnd = AIntervalSerializerDeserializer.getIntervalEnd(bytes0, offset0 + 1);
                             intervalTypeTag = AIntervalSerializerDeserializer.getIntervalTimeType(bytes0, offset0 + 1);
-                        } else if (type0 == ATypeTag.NULL) {
-                            try {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } catch (HyracksDataException e) {
-                                throw new AlgebricksException(e);
-                            }
-                            result.set(resultStorage);
-                            return;
                         } else {
                             throw new AlgebricksException(getIdentifier().getName()
-                                    + ": the first argument should be INTERVAL/NULL but got " + type0);
+                                    + ": the first argument should be INTERVAL/NULL/MISSING but got " + type0);
                         }
 
                         // get the anchor instance time
-                        eval1.evaluate(tuple, argPtr1);
                         byte[] bytes1 = argPtr1.getByteArray();
                         int offset1 = argPtr1.getStartOffset();
-
                         ATypeTag type1 = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes1[offset1]);
-
-                        if (intervalTypeTag != type1.serialize()) {
-                            if (intervalTypeTag != ATypeTag.SERIALIZED_NULL_TYPE_TAG && type1 != ATypeTag.NULL) {
-                                throw new AlgebricksException(
-                                        getIdentifier().getName() + ": expecting compatible type to " + type0 + "("
-                                                + intervalTypeTag + ") for the second argument but got " + type1);
-                            }
+                        if (intervalTypeTag != bytes1[offset1]) {
+                            throw new AlgebricksException(getIdentifier().getName() + ": expecting compatible type to "
+                                    + type0 + "(" + intervalTypeTag + ") for the second argument but got " + type1);
                         }
 
                         long anchorTime = 0;
@@ -159,21 +142,12 @@
                             case DATETIME:
                                 anchorTime = ADateTimeSerializerDeserializer.getChronon(bytes1, offset1 + 1);
                                 break;
-                            case NULL:
-                                try {
-                                    nullSerde.serialize(ANull.NULL, out);
-                                } catch (HyracksDataException e) {
-                                    throw new AlgebricksException(e);
-                                }
-                                result.set(resultStorage);
-                                return;
                             default:
                                 throw new AlgebricksException(
                                         getIdentifier().getName() + ": expecting compatible type to " + type0 + "("
                                                 + intervalTypeTag + ") for the second argument but got " + type1);
                         }
 
-                        eval2.evaluate(tuple, argPtr2);
                         byte[] bytes2 = argPtr2.getByteArray();
                         int offset2 = argPtr2.getStartOffset();
 
@@ -215,16 +189,6 @@
                                 firstBinIndex = totalChronon / dayTime
                                         + ((totalChronon < 0 && totalChronon % dayTime != 0) ? -1 : 0);
                                 break;
-
-                            case NULL:
-                                try {
-                                    nullSerde.serialize(ANull.NULL, out);
-                                } catch (HyracksDataException e) {
-                                    throw new AlgebricksException(e);
-                                }
-                                result.set(resultStorage);
-                                return;
-
                             default:
                                 throw new AlgebricksException(getIdentifier().getName()
                                         + ": expecting YEARMONTHDURATION/DAYTIMEDURATION for the thrid argument but got "
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateDescriptor.java
index 1243394..1810b48 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADate;
 import org.apache.asterix.om.base.AMutableDate;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.AsterixTemporalTypeParseException;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils.DateTimeParseMode;
@@ -83,9 +82,6 @@
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADate> dateSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATE);
 
@@ -106,13 +102,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateTimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateTimeDescriptor.java
index 7c8847a..9717f8e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateTimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseDateTimeDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ADateTime;
 import org.apache.asterix.om.base.AMutableDateTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.AsterixTemporalTypeParseException;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils.DateTimeParseMode;
@@ -78,9 +77,6 @@
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
 
@@ -101,13 +97,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseTimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseTimeDescriptor.java
index 893c357..fb4bc55 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseTimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/ParseTimeDescriptor.java
@@ -22,7 +22,6 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 import org.apache.asterix.om.base.temporal.AsterixTemporalTypeParseException;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils;
@@ -79,9 +78,6 @@
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-                    @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
 
@@ -102,13 +98,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_STRING_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateDescriptor.java
index f48a5c4..b979786 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateDescriptor.java
@@ -22,8 +22,6 @@
 import java.io.IOException;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADateSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils.DateTimeParseMode;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
@@ -31,7 +29,6 @@
 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.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -39,7 +36,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -78,10 +74,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     private StringBuilder sbder = new StringBuilder();
                     private final UTF8StringWriter utf8Writer = new UTF8StringWriter();
 
@@ -97,13 +89,6 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DATE_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateTimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateTimeDescriptor.java
index 75fcfe7..780d09a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateTimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintDateTimeDescriptor.java
@@ -22,15 +22,12 @@
 import java.io.IOException;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ADateTimeSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils.DateTimeParseMode;
 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.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -38,7 +35,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -76,11 +72,6 @@
                     private IPointable argPtr1 = new VoidPointable();
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
-
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     private StringBuilder sbder = new StringBuilder();
                     private UTF8StringWriter utf8Writer = new UTF8StringWriter();
                     private UTF8StringPointable utf8Ptr = new UTF8StringPointable();
@@ -98,13 +89,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DATETIME_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintTimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintTimeDescriptor.java
index 2318412..576de35 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintTimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/PrintTimeDescriptor.java
@@ -22,15 +22,12 @@
 import java.io.IOException;
 
 import org.apache.asterix.dataflow.data.nontagged.serde.ATimeSerializerDeserializer;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils;
 import org.apache.asterix.om.base.temporal.DateTimeFormatUtils.DateTimeParseMode;
 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.types.ATypeTag;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -38,7 +35,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -77,10 +73,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     private StringBuilder sbder = new StringBuilder();
                     private final UTF8StringWriter writer = new UTF8StringWriter();
                     private final UTF8StringPointable utf8Ptr = new UTF8StringPointable();
@@ -98,13 +90,6 @@
                         int len1 = argPtr1.getLength();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_TIME_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_STRING_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromDatetimeDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromDatetimeDescriptor.java
index a8c3fe6..6846ef8 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromDatetimeDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromDatetimeDescriptor.java
@@ -23,7 +23,6 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ADateTimeSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -83,10 +82,6 @@
                             .getSerializerDeserializer(BuiltinType.ATIME);
                     private AMutableTime aTime = new AMutableTime(0);
 
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
-
                     @Override
                     public void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException {
                         resultStorage.reset();
@@ -96,22 +91,18 @@
                         int offset = argPtr.getStartOffset();
 
                         try {
-                            if (bytes[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                if (bytes[offset] != ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
-                                    throw new AlgebricksException(
-                                            FID.getName() + ": expects input type DATETIME/NULL but got "
-                                                    + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
-                                }
-                                long datetimeChronon = ADateTimeSerializerDeserializer.getChronon(bytes, offset + 1);
-                                int timeChronon = (int) (datetimeChronon % GregorianCalendarSystem.CHRONON_OF_DAY);
-                                if (timeChronon < 0) {
-                                    timeChronon += GregorianCalendarSystem.CHRONON_OF_DAY;
-                                }
-                                aTime.setValue(timeChronon);
-                                timeSerde.serialize(aTime, out);
+                            if (bytes[offset] != ATypeTag.SERIALIZED_DATETIME_TYPE_TAG) {
+                                throw new AlgebricksException(
+                                        FID.getName() + ": expects input type DATETIME/NULL but got "
+                                                + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]));
                             }
+                            long datetimeChronon = ADateTimeSerializerDeserializer.getChronon(bytes, offset + 1);
+                            int timeChronon = (int) (datetimeChronon % GregorianCalendarSystem.CHRONON_OF_DAY);
+                            if (timeChronon < 0) {
+                                timeChronon += GregorianCalendarSystem.CHRONON_OF_DAY;
+                            }
+                            aTime.setValue(timeChronon);
+                            timeSerde.serialize(aTime, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromUnixTimeInMsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromUnixTimeInMsDescriptor.java
index 48be51d..e46241d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromUnixTimeInMsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/TimeFromUnixTimeInMsDescriptor.java
@@ -22,12 +22,10 @@
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.AMutableTime;
-import org.apache.asterix.om.base.ANull;
 import org.apache.asterix.om.base.ATime;
 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.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
@@ -77,9 +75,6 @@
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
 
                     private AMutableTime aTime = new AMutableTime(0);
 
@@ -88,13 +83,9 @@
                         resultStorage.reset();
                         eval.evaluate(tuple, argPtr);
                         try {
-                            if (argPtr.getByteArray()[argPtr.getStartOffset()] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                            } else {
-                                aTime.setValue(
-                                        ATypeHierarchy.getIntegerValue(argPtr.getByteArray(), argPtr.getStartOffset()));
-                                timeSerde.serialize(aTime, out);
-                            }
+                            aTime.setValue(
+                                    ATypeHierarchy.getIntegerValue(argPtr.getByteArray(), argPtr.getStartOffset()));
+                            timeSerde.serialize(aTime, out);
                         } catch (HyracksDataException hex) {
                             throw new AlgebricksException(hex);
                         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationComparatorDecriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationComparatorDescriptor.java
similarity index 77%
rename from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationComparatorDecriptor.java
rename to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationComparatorDescriptor.java
index 52cbaf5..10b8116 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationComparatorDecriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationComparatorDescriptor.java
@@ -23,10 +23,7 @@
 import org.apache.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ANull;
 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.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -43,32 +40,16 @@
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
-public class YearMonthDurationComparatorDecriptor extends AbstractScalarFunctionDynamicDescriptor {
-    private final static long serialVersionUID = 1L;
-    public final static FunctionIdentifier GREATER_THAN_FID = AsterixBuiltinFunctions.YEAR_MONTH_DURATION_GREATER_THAN;
-    public final static FunctionIdentifier LESS_THAN_FID = AsterixBuiltinFunctions.YEAR_MONTH_DURATION_LESS_THAN;
+public class YearMonthDurationComparatorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
+    private static final long serialVersionUID = 1L;
+    public static final FunctionIdentifier GREATER_THAN_FID = AsterixBuiltinFunctions.YEAR_MONTH_DURATION_GREATER_THAN;
+    public static final FunctionIdentifier LESS_THAN_FID = AsterixBuiltinFunctions.YEAR_MONTH_DURATION_LESS_THAN;
     private final boolean isGreaterThan;
 
-    private YearMonthDurationComparatorDecriptor(boolean isGreaterThan) {
+    protected YearMonthDurationComparatorDescriptor(boolean isGreaterThan) {
         this.isGreaterThan = isGreaterThan;
     }
 
-    public final static IFunctionDescriptorFactory GREATER_THAN_FACTORY = new IFunctionDescriptorFactory() {
-
-        @Override
-        public IFunctionDescriptor createFunctionDescriptor() {
-            return new YearMonthDurationComparatorDecriptor(true);
-        }
-    };
-
-    public final static IFunctionDescriptorFactory LESS_THAN_FACTORY = new IFunctionDescriptorFactory() {
-
-        @Override
-        public IFunctionDescriptor createFunctionDescriptor() {
-            return new YearMonthDurationComparatorDecriptor(false);
-        }
-    };
-
     @Override
     public IScalarEvaluatorFactory createEvaluatorFactory(final IScalarEvaluatorFactory[] args)
             throws AlgebricksException {
@@ -87,10 +68,6 @@
                     private IScalarEvaluator eval0 = args[0].createScalarEvaluator(ctx);
                     private IScalarEvaluator eval1 = args[1].createScalarEvaluator(ctx);
 
-                    // possible output types
-                    @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.ANULL);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ABoolean> boolSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ABOOLEAN);
@@ -107,13 +84,6 @@
                         int offset1 = argPtr1.getStartOffset();
 
                         try {
-                            if (bytes0[offset0] == ATypeTag.SERIALIZED_NULL_TYPE_TAG
-                                    || bytes1[offset1] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                nullSerde.serialize(ANull.NULL, out);
-                                result.set(resultStorage);
-                                return;
-                            }
-
                             if (bytes0[offset0] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG
                                     || bytes1[offset1] != ATypeTag.SERIALIZED_DURATION_TYPE_TAG) {
                                 throw new AlgebricksException(getIdentifier().getName()
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDecriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationGreaterThanComparatorDescriptor.java
similarity index 60%
copy from asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDecriptor.java
copy to asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationGreaterThanComparatorDescriptor.java
index 459652e..42458ad 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalEndsDecriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationGreaterThanComparatorDescriptor.java
@@ -16,36 +16,24 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.asterix.runtime.evaluators.functions.temporal;
 
-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;
 
-public class IntervalEndsDecriptor extends AbstractIntervalLogicFuncDescriptor {
+public class YearMonthDurationGreaterThanComparatorDescriptor extends YearMonthDurationComparatorDescriptor {
 
-    private final static long serialVersionUID = 1L;
-
+    private static final long serialVersionUID = 1L;
     public final static IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
 
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
-            return new IntervalEndsDecriptor();
+            return new YearMonthDurationGreaterThanComparatorDescriptor();
         }
     };
 
-    @Override
-    public FunctionIdentifier getIdentifier() {
-        return AsterixBuiltinFunctions.INTERVAL_ENDS;
+    protected YearMonthDurationGreaterThanComparatorDescriptor() {
+        super(true);
     }
-
-    @Override
-    protected boolean compareIntervals(IntervalLogic il, AIntervalPointable ip1, AIntervalPointable ip2)
-            throws AlgebricksException {
-        return il.ends(ip1, ip2);
-    }
-
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationLessThanComparatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationLessThanComparatorDescriptor.java
new file mode 100644
index 0000000..da8867d
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/YearMonthDurationLessThanComparatorDescriptor.java
@@ -0,0 +1,39 @@
+/*
+ * 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.evaluators.functions.temporal;
+
+import org.apache.asterix.om.functions.IFunctionDescriptor;
+import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
+
+public class YearMonthDurationLessThanComparatorDescriptor extends YearMonthDurationComparatorDescriptor {
+
+    private static final long serialVersionUID = 1L;
+    public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+
+        @Override
+        public IFunctionDescriptor createFunctionDescriptor() {
+            return new YearMonthDurationLessThanComparatorDescriptor();
+        }
+    };
+
+    protected YearMonthDurationLessThanComparatorDescriptor() {
+        super(false);
+    }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/CodeGenUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/CodeGenUtil.java
index 3de9fc4..1da88a1 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/CodeGenUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/CodeGenUtil.java
@@ -22,6 +22,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -36,11 +38,16 @@
 
     public final static String DEFAULT_SUFFIX_FOR_GENERATED_CLASS = "Gen";
     private final static String OBJECT_CLASS_NAME = "java/lang/Object";
+    private final static String DESCRIPTOR_SUPER_CLASS_NAME = "org/apache/asterix/runtime/"
+            + "evaluators/base/AbstractScalarFunctionDynamicDescriptor";
     private final static String EVALUATOR_FACTORY = "EvaluatorFactory";
     private final static String EVALUATOR = "Evaluator";
     private final static String INNER = "Inner";
     private final static String DESCRIPTOR = "Descriptor";
+    private final static String ACCESSOR = "Accessor";
     private final static String DOLLAR = "$";
+    private final static String PKG_SUFFIX = "/generated";
+    private final static String ASTERIXDB_PREFIX = "org/apache/asterix";
 
     /**
      * The callback interface for a caller to determine what it needs to do for
@@ -74,15 +81,26 @@
      * @throws IOException
      * @throws ClassNotFoundException
      */
-    public static void generateScalarFunctionDescriptorBinary(String packagePrefix,
+    public static List<Pair<String, String>> generateScalarFunctionDescriptorBinary(String packagePrefix,
             String originalFuncDescriptorClassName, String suffixForGeneratedClass, ClassLoader classLoader,
             ClassByteCodeAction action) throws IOException, ClassNotFoundException {
         originalFuncDescriptorClassName = toInternalClassName(originalFuncDescriptorClassName);
-        String targetFuncDescriptorClassName = toInternalClassName(
-                originalFuncDescriptorClassName + suffixForGeneratedClass);
+        if (originalFuncDescriptorClassName.equals(DESCRIPTOR_SUPER_CLASS_NAME)) {
+            return Collections.emptyList();
+        }
+
+        String targetFuncDescriptorClassName = getGeneratedFunctionDescriptorInternalClassName(
+                originalFuncDescriptorClassName, suffixForGeneratedClass);
 
         // Adds the mapping of the old/new names of the function descriptor.
         List<Pair<String, String>> nameMappings = new ArrayList<>();
+
+        // Generates code for super classes except java.lang.Object.
+        Class<?> evaluatorClass = CodeGenUtil.class.getClassLoader()
+                .loadClass(toJdkStandardName(originalFuncDescriptorClassName));
+        nameMappings.addAll(generateScalarFunctionDescriptorBinary(packagePrefix,
+                evaluatorClass.getSuperclass().getName(), suffixForGeneratedClass, classLoader, action));
+
         nameMappings.add(Pair.of(originalFuncDescriptorClassName, targetFuncDescriptorClassName));
         nameMappings.add(Pair.of(toJdkStandardName(originalFuncDescriptorClassName),
                 toJdkStandardName(targetFuncDescriptorClassName)));
@@ -102,7 +120,7 @@
         int evalFactoryCounter = 0;
         for (String evaluateFactoryClassName : evaluatorFactoryClassNames) {
             generateEvaluatorFactoryClassBinary(packagePrefix, evaluateFactoryClassName, suffixForGeneratedClass,
-                    ++evalFactoryCounter, nameMappings, classLoader, action);
+                    evalFactoryCounter++, nameMappings, classLoader, action);
         }
 
         // Transforms the function descriptor class and outputs the generated class binary.
@@ -110,6 +128,21 @@
         RenameClassVisitor renamingVisitor = new RenameClassVisitor(writer, nameMappings);
         reader.accept(renamingVisitor, 0);
         action.runAction(targetFuncDescriptorClassName, writer.toByteArray());
+        return nameMappings;
+    }
+
+    public static String getGeneratedFunctionDescriptorClassName(String originalFuncDescriptorClassName,
+            String suffixForGeneratedClass) {
+        return toJdkStandardName(getGeneratedFunctionDescriptorInternalClassName(originalFuncDescriptorClassName,
+                suffixForGeneratedClass));
+    }
+
+    private static String getGeneratedFunctionDescriptorInternalClassName(String originalFuncDescriptorClassName,
+            String suffixForGeneratedClass) {
+        String originalFuncDescriptorClassInternalName = toInternalClassName(originalFuncDescriptorClassName);
+        String targetFuncDescriptorClassName = getGeneratedClassName(originalFuncDescriptorClassInternalName,
+                suffixForGeneratedClass, 0);
+        return targetFuncDescriptorClassName;
     }
 
     /**
@@ -184,7 +217,7 @@
         // Generates code for all evaluators.
         int evalCounter = 0;
         for (String evaluateClassName : evaluatorClassNames) {
-            generateEvaluatorClassBinary(evaluateClassName, suffixForGeneratedClass, ++evalCounter, nameMappings,
+            generateEvaluatorClassBinary(evaluateClassName, suffixForGeneratedClass, evalCounter++, nameMappings,
                     classLoader, action);
         }
 
@@ -235,13 +268,31 @@
         nameMappings.add(
                 Pair.of(toJdkStandardName(originalEvaluatorClassName), toJdkStandardName(targetEvaluatorClassName)));
 
+        ClassReader firstPassReader = new ClassReader(getResourceStream(originalEvaluatorClassName, classLoader));
+        // Generates inner classes other than the evaluator.
+        Set<String> excludedNames = new HashSet<>();
+        for (Pair<String, String> entry : nameMappings) {
+            excludedNames.add(entry.getKey());
+        }
+        generateNonEvalInnerClasses(firstPassReader, excludedNames, nameMappings, suffixForGeneratedClass, classLoader,
+                action);
+
+        // Injects missing-handling byte code.
+        ClassWriter firstPassWriter = new ClassWriter(firstPassReader, 0);
+        EvaluatorMissingCheckVisitor missingHandlingVisitor = new EvaluatorMissingCheckVisitor(firstPassWriter);
+        firstPassReader.accept(missingHandlingVisitor, 0);
+
+        ClassReader secondPassReader = new ClassReader(firstPassWriter.toByteArray());
         // Injects null-handling byte code and output the class binary.
-        ClassReader reader = new ClassReader(getResourceStream(originalEvaluatorClassName, classLoader));
-        ClassWriter writer = new ClassWriter(reader, 0);
-        RenameClassVisitor renamingVisitor = new RenameClassVisitor(writer, nameMappings);
-        EvaluatorVisitor evaluateVisitor = new EvaluatorVisitor(renamingVisitor);
-        reader.accept(evaluateVisitor, 0);
-        action.runAction(targetEvaluatorClassName, writer.toByteArray());
+        // Since we're going to add jump instructions, we have to let the ClassWriter to
+        // automatically generate frames for JVM to verify the class.
+        ClassWriter secondPassWriter = new ClassWriter(secondPassReader,
+                ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
+        RenameClassVisitor renamingVisitor = new RenameClassVisitor(secondPassWriter, nameMappings);
+        EvaluatorNullCheckVisitor nullHandlingVisitor = new EvaluatorNullCheckVisitor(renamingVisitor,
+                missingHandlingVisitor.getLastAddedLabel());
+        secondPassReader.accept(nullHandlingVisitor, 0);
+        action.runAction(targetEvaluatorClassName, secondPassWriter.toByteArray());
     }
 
     /**
@@ -275,7 +326,7 @@
         String suffix = INNER + suffixForGeneratedClass;
         for (String innerClassName : innerClassNames) {
             // adds name mapping.
-            String targetInnerClassName = getGeneratedClassName(innerClassName, suffix, ++counter);
+            String targetInnerClassName = getGeneratedClassName(innerClassName, suffix, counter++);
             nameMappings.add(Pair.of(innerClassName, targetInnerClassName));
             nameMappings.add(Pair.of(toJdkStandardName(innerClassName), toJdkStandardName(targetInnerClassName)));
 
@@ -325,15 +376,25 @@
         StringBuilder sb = new StringBuilder();
         int end = originalClassName.indexOf(DESCRIPTOR);
         if (end < 0) {
+            end = originalClassName.indexOf(ACCESSOR);
+        }
+        if (end < 0) {
             end = originalClassName.indexOf(DOLLAR);
         }
         if (end < 0) {
-            end = originalClassName.length() - 1;
+            end = originalClassName.length();
         }
 
-        sb.append(originalClassName.substring(0, end));
+        String name = originalClassName.substring(0, end);
+        String lastName = name.substring(ASTERIXDB_PREFIX.length());
+
+        sb.append(ASTERIXDB_PREFIX);
+        sb.append(PKG_SUFFIX);
+        sb.append(lastName);
         sb.append(suffix);
-        sb.append(counter);
+        if (counter > 0) {
+            sb.append(counter);
+        }
         return sb.toString();
     }
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorMissingCheckVisitor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorMissingCheckVisitor.java
new file mode 100644
index 0000000..adedee5
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorMissingCheckVisitor.java
@@ -0,0 +1,228 @@
+/*
+ * 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.evaluators.staticcodegen;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.AbstractInsnNode;
+import org.objectweb.asm.tree.FieldInsnNode;
+import org.objectweb.asm.tree.IincInsnNode;
+import org.objectweb.asm.tree.InsnNode;
+import org.objectweb.asm.tree.IntInsnNode;
+import org.objectweb.asm.tree.VarInsnNode;
+
+/**
+ * This visitor adds missing-handling byte code into an evaluator class.
+ */
+public class EvaluatorMissingCheckVisitor extends ClassVisitor {
+    private static final String EVALUATE_DESC = "(Lorg/apache/hyracks/dataflow/common/data/"
+            + "accessors/IFrameTupleReference;Lorg/apache/hyracks/data/std/api/IPointable;)V";
+    private static final String EVALUATE = "evaluate";
+    private static final MethodIdentifier METHOD_IDENTIFIER = new MethodIdentifier(EVALUATE, EVALUATE_DESC, null);
+    private static final String TYPE_CHECKER_CLASS = "org/apache/asterix/runtime/evaluators/staticcodegen/TypeChecker";
+    private static final String TYPE_CHECKER_DESC = "L" + TYPE_CHECKER_CLASS + ";";
+    private static final String TYPE_CHECKER_NAME = "typeChecker";
+    private static final String IS_MISSING = "isMissing";
+    private static final String TYPECHECK_METHOD_DESC = "(Lorg/apache/hyracks/data/std/api/IPointable;"
+            + "Lorg/apache/hyracks/data/std/api/IPointable;)Z";
+    private static final String CONSTRUCTOR = "<init>";
+    private String className = null;
+    private Label lastAddedLabel = null;
+
+    public EvaluatorMissingCheckVisitor(ClassVisitor downStreamVisitor) {
+        super(Opcodes.ASM5, downStreamVisitor);
+    }
+
+    @Override
+    public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
+        if (cv != null) {
+            cv.visit(version, access, name, signature, superName, interfaces);
+        }
+        this.className = name;
+    }
+
+    @Override
+    public void visitEnd() {
+        if (cv != null) {
+            cv.visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_FINAL, TYPE_CHECKER_NAME, TYPE_CHECKER_DESC, null, null);
+            cv.visitEnd();
+        }
+    }
+
+    @Override
+    public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
+        MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions);
+        if (!METHOD_IDENTIFIER.equals(new MethodIdentifier(name, desc, signature)) && !name.equals(CONSTRUCTOR)) {
+            return mv;
+        }
+        if (name.equals(CONSTRUCTOR) && mv != null) {
+            return new ConstructorVisitor(Opcodes.ASM5, mv);
+        }
+        if (mv != null) {
+            return new InjectMissingCheckVisitor(Opcodes.ASM5, mv);
+        }
+        return null;
+    }
+
+    // Obtains the last added label.
+    Label getLastAddedLabel() {
+        return lastAddedLabel;
+    }
+
+    class ConstructorVisitor extends MethodVisitor {
+
+        public ConstructorVisitor(int api, MethodVisitor mv) {
+            super(api, mv);
+        }
+
+        @Override
+        public void visitInsn(int opcode) {
+            if (opcode != Opcodes.RETURN) {
+                mv.visitInsn(opcode);
+                return;
+            }
+            // Loads "this".
+            mv.visitVarInsn(Opcodes.ALOAD, 0);
+            // New TypeChecker.
+            mv.visitTypeInsn(Opcodes.NEW, TYPE_CHECKER_CLASS);
+            // Duplicate the top operand.
+            mv.visitInsn(Opcodes.DUP);
+            // Invoke the constructor of TypeChecker.
+            mv.visitMethodInsn(Opcodes.INVOKESPECIAL, TYPE_CHECKER_CLASS, CONSTRUCTOR, "()V", true);
+            // Putfield for the field typeChecker.
+            mv.visitFieldInsn(Opcodes.PUTFIELD, className, TYPE_CHECKER_NAME, TYPE_CHECKER_DESC);
+            // RETURN.
+            mv.visitInsn(Opcodes.RETURN);
+        }
+    }
+
+    class InjectMissingCheckVisitor extends MethodVisitor {
+
+        private FieldInsnNode fieldAccessNode = null;
+        private List<AbstractInsnNode> instructionsAfterFieldAccess = new ArrayList<>();
+        private boolean updateToNextLabel = false;
+
+        public InjectMissingCheckVisitor(int opcode, MethodVisitor mv) {
+            super(opcode, mv);
+        }
+
+        @Override
+        public void visitFieldInsn(int opcode, String owner, String name, String desc) {
+            mv.visitFieldInsn(opcode, owner, name, desc);
+            fieldAccessNode = new FieldInsnNode(opcode, owner, name, desc);
+            instructionsAfterFieldAccess.clear();
+        }
+
+        @Override
+        public void visitIincInsn(int var, int increment) {
+            if (fieldAccessNode != null) {
+                instructionsAfterFieldAccess.add(new IincInsnNode(var, increment));
+            }
+            super.visitIincInsn(var, increment);
+        }
+
+        @Override
+        public void visitInsn(int opcode) {
+            if (fieldAccessNode != null) {
+                instructionsAfterFieldAccess.add(new InsnNode(opcode));
+            }
+            super.visitInsn(opcode);
+        }
+
+        @Override
+        public void visitIntInsn(int opcode, int operand) {
+            if (fieldAccessNode != null) {
+                instructionsAfterFieldAccess.add(new IntInsnNode(opcode, operand));
+            }
+            super.visitIntInsn(opcode, operand);
+        }
+
+        @Override
+        public void visitVarInsn(int opcode, int operand) {
+            if (fieldAccessNode != null) {
+                instructionsAfterFieldAccess.add(new VarInsnNode(opcode, operand));
+            }
+            super.visitVarInsn(opcode, operand);
+        }
+
+        @Override
+        public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
+            mv.visitMethodInsn(opcode, owner, name, desc, itf);
+            if (fieldAccessNode == null || !METHOD_IDENTIFIER.equals(new MethodIdentifier(name, desc, null))) {
+                return;
+            }
+
+            // Loads the callee.
+            mv.visitVarInsn(Opcodes.ALOAD, 0);
+            mv.visitFieldInsn(Opcodes.GETFIELD, className, TYPE_CHECKER_NAME, TYPE_CHECKER_DESC);
+
+            // Loads "this".
+            mv.visitVarInsn(Opcodes.ALOAD, 0);
+            // Replays the field access instruction.
+            fieldAccessNode.accept(mv);
+
+            // Replays other instruction between the field access and the evaluator call.
+            for (AbstractInsnNode instruction : instructionsAfterFieldAccess) {
+                instruction.accept(mv);
+            }
+
+            // Loads the result IPointable.
+            mv.visitVarInsn(Opcodes.ALOAD, 2);
+
+            // Invokes the missing check method.
+            mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, TYPE_CHECKER_CLASS, IS_MISSING, TYPECHECK_METHOD_DESC, false);
+            lastAddedLabel = new Label();
+            // Adds the if branch.
+            mv.visitJumpInsn(Opcodes.IFEQ, lastAddedLabel);
+            mv.visitInsn(Opcodes.RETURN);
+            mv.visitLabel(lastAddedLabel);
+        }
+
+        @Override
+        public void visitLabel(Label label) {
+            if (updateToNextLabel) {
+                lastAddedLabel = label;
+                updateToNextLabel = false;
+            }
+            super.visitLabel(label);
+        }
+
+        @Override
+        public void visitJumpInsn(int opcode, Label label) {
+            super.visitJumpInsn(opcode, label);
+            if (lastAddedLabel == null) {
+                return;
+            }
+            try {
+                if (label.getOffset() < lastAddedLabel.getOffset()) {
+                    // Backward jump, i.e., loop.
+                    updateToNextLabel = true;
+                }
+            } catch (IllegalStateException e) {
+                // Forward jump, the offset is not available.
+            }
+        }
+    }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorNullCheckVisitor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorNullCheckVisitor.java
new file mode 100644
index 0000000..30f810b
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorNullCheckVisitor.java
@@ -0,0 +1,105 @@
+/*
+ * 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.evaluators.staticcodegen;
+
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+
+/**
+ * This visitor adds null-handling byte code into an evaluator class.
+ */
+public class EvaluatorNullCheckVisitor extends ClassVisitor {
+    private final static String EVALUATE_DESC = "(Lorg/apache/hyracks/dataflow/common/data/accessors/"
+            + "IFrameTupleReference;Lorg/apache/hyracks/data/std/api/IPointable;)V";
+    private final static String EVALUATE = "evaluate";
+    private final static MethodIdentifier METHOD_IDENTIFIER = new MethodIdentifier(EVALUATE, EVALUATE_DESC, null);
+    private final static String TYPE_CHECKER_CLASS = "org/apache/asterix/runtime/evaluators/staticcodegen/"
+            + "TypeChecker";
+    private final static String TYPE_CHECKER_DESC = "L" + TYPE_CHECKER_CLASS + ";";
+    private final static String TYPE_CHECKER_NAME = "typeChecker";
+    private final static String IS_NULL = "isNull";
+    private final static String TYPECHECK_METHOD_DESC = "(Lorg/apache/hyracks/data/std/api/IPointable;)Z";
+    private String className = null;
+    private final Label lastAddedLabel;
+
+    public EvaluatorNullCheckVisitor(ClassVisitor downStreamVisitor, Label lastAddedLabel) {
+        super(Opcodes.ASM5, downStreamVisitor);
+        this.lastAddedLabel = lastAddedLabel;
+    }
+
+    @Override
+    public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
+        if (cv != null) {
+            cv.visit(version, access, name, signature, superName, interfaces);
+        }
+        this.className = name;
+    }
+
+    @Override
+    public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
+        MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions);
+        if (!METHOD_IDENTIFIER.equals(new MethodIdentifier(name, desc, signature))) {
+            return mv;
+        }
+        if (mv != null) {
+            return new InjectNullCheckVisitor(Opcodes.ASM5, mv);
+        }
+        return null;
+    }
+
+    // Obtains the last added label.
+    Label getLastAddedLabel() {
+        return lastAddedLabel;
+    }
+
+    class InjectNullCheckVisitor extends MethodVisitor {
+
+        public InjectNullCheckVisitor(int api, MethodVisitor mv) {
+            super(api, mv);
+        }
+
+        @Override
+        public void visitLabel(Label label) {
+            // Emits the label.
+            mv.visitLabel(label);
+
+            // Injects null-handling after the last missing-handling byte code.
+            if (lastAddedLabel == null || lastAddedLabel.getOffset() != label.getOffset()) {
+                return;
+            }
+
+            // Loads the callee.
+            mv.visitVarInsn(Opcodes.ALOAD, 0);
+            mv.visitFieldInsn(Opcodes.GETFIELD, className, TYPE_CHECKER_NAME, TYPE_CHECKER_DESC);
+
+            // Loads the result IPointable.
+            mv.visitVarInsn(Opcodes.ALOAD, 2);
+
+            // Invokes the null check method.
+            mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, TYPE_CHECKER_CLASS, IS_NULL, TYPECHECK_METHOD_DESC, false);
+            Label notNull = new Label();
+            // Adds the if branch.
+            mv.visitJumpInsn(Opcodes.IFEQ, notNull);
+            mv.visitInsn(Opcodes.RETURN);
+            mv.visitLabel(notNull);
+        }
+    }
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorVisitor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorVisitor.java
deleted file mode 100644
index 6d554d7..0000000
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/EvaluatorVisitor.java
+++ /dev/null
@@ -1,125 +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.evaluators.staticcodegen;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.objectweb.asm.ClassVisitor;
-import org.objectweb.asm.Label;
-import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.Opcodes;
-import org.objectweb.asm.tree.AbstractInsnNode;
-import org.objectweb.asm.tree.FieldInsnNode;
-import org.objectweb.asm.tree.IincInsnNode;
-import org.objectweb.asm.tree.InsnNode;
-import org.objectweb.asm.tree.IntInsnNode;
-
-/**
- * This visitor adds null-handling byte code into an evaluator class.
- */
-public class EvaluatorVisitor extends ClassVisitor {
-    private final static String EVALUATE_DESC = "(Lorg/apache/hyracks/dataflow/common/data/accessors/IFrameTupleReference;Lorg/apache/hyracks/data/std/api/IPointable;)V";
-    private final static String EVALUATE = "evaluate";
-    private final static MethodIdentifier METHOD_IDENTIFIER = new MethodIdentifier(EVALUATE, EVALUATE_DESC, null);
-    private final static String TYPECHECK_CLASS = "org/apache/asterix/runtime/evaluators/staticcodegen/TypeCheckUtil";
-    private final static String IS_NULL = "isNull";
-    private final static String TYPECHECK_METHOD_DESC = "(Lorg/apache/hyracks/data/std/api/IPointable;Lorg/apache/hyracks/data/std/api/IPointable;)Z";
-
-    public EvaluatorVisitor(ClassVisitor downStreamVisitor) {
-        super(Opcodes.ASM5, downStreamVisitor);
-    }
-
-    @Override
-    public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
-        MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions);
-        if (!METHOD_IDENTIFIER.equals(new MethodIdentifier(name, desc, signature))) {
-            return mv;
-        }
-        if (mv != null) {
-            return new MethodVisitor(Opcodes.ASM5, mv) {
-                private FieldInsnNode fieldAccessNode = null;
-                private List<AbstractInsnNode> instructionsAfterFieldAccess = new ArrayList<>();
-
-                @Override
-                public void visitFieldInsn(int opcode, String owner, String name, String desc) {
-                    mv.visitFieldInsn(opcode, owner, name, desc);
-                    fieldAccessNode = new FieldInsnNode(opcode, owner, name, desc);
-                    instructionsAfterFieldAccess.clear();
-                }
-
-                @Override
-                public void visitIincInsn(int var, int increment) {
-                    if (fieldAccessNode != null) {
-                        instructionsAfterFieldAccess.add(new IincInsnNode(var, increment));
-                    }
-                    super.visitIincInsn(var, increment);
-                }
-
-                @Override
-                public void visitInsn(int opcode) {
-                    if (fieldAccessNode != null) {
-                        instructionsAfterFieldAccess.add(new InsnNode(opcode));
-                    }
-                    super.visitInsn(opcode);
-                }
-
-                @Override
-                public void visitIntInsn(int opcode, int operand) {
-                    if (fieldAccessNode != null) {
-                        instructionsAfterFieldAccess.add(new IntInsnNode(opcode, operand));
-                    }
-                    super.visitIntInsn(opcode, operand);
-                }
-
-                @Override
-                public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
-                    mv.visitMethodInsn(opcode, owner, name, desc, itf);
-                    if (fieldAccessNode == null
-                            || !METHOD_IDENTIFIER.equals(new MethodIdentifier(name, desc, signature))) {
-                        return;
-                    }
-                    // Loads "this".
-                    mv.visitVarInsn(Opcodes.ALOAD, 0);
-                    // Replays the field access instruction.
-                    fieldAccessNode.accept(mv);
-
-                    // Replays other instruction between the field access and the evaluator call.
-                    for (AbstractInsnNode instruction : instructionsAfterFieldAccess) {
-                        instruction.accept(mv);
-                    }
-
-                    // Loads the result IPointable.
-                    mv.visitVarInsn(Opcodes.ALOAD, 2);
-
-                    // Invokes the null check method.
-                    mv.visitMethodInsn(Opcodes.INVOKESTATIC, TYPECHECK_CLASS, IS_NULL, TYPECHECK_METHOD_DESC, false);
-                    Label notNull = new Label();
-                    // Adds the if branch.
-                    mv.visitJumpInsn(Opcodes.IFEQ, notNull);
-                    mv.visitInsn(Opcodes.RETURN);
-                    mv.visitLabel(notNull);
-                    mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
-                }
-            };
-        }
-        return null;
-    }
-
-}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/GatherInnerClassVisitor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/GatherInnerClassVisitor.java
index 2293734..031707b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/GatherInnerClassVisitor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/GatherInnerClassVisitor.java
@@ -44,7 +44,8 @@
 
     @Override
     public void visitInnerClass(String name, String outerName, String innerName, int access) {
-        if (className == null || !name.equals(className)) {
+        if ((className == null || !name.equals(className))
+                && ((access & Opcodes.ACC_PUBLIC) == 0 || (access & Opcodes.ACC_STATIC) == 0)) {
             innerClassNames.add(name);
         }
     }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/RenameClassVisitor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/RenameClassVisitor.java
index 1eb7357..4396fd6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/RenameClassVisitor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/RenameClassVisitor.java
@@ -53,7 +53,9 @@
 
     @Override
     public void visitInnerClass(String name, String outerName, String innerName, int access) {
-        // Skips inner class descriptions.
+        if ((access & Opcodes.ACC_PUBLIC) != 0 && (access & Opcodes.ACC_STATIC) != 0) {
+            super.visitInnerClass(name, outerName, innerName, access);
+        }
     }
 
     @Override
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/TypeCheckUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/TypeCheckUtil.java
deleted file mode 100644
index 0b02f39..0000000
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/TypeCheckUtil.java
+++ /dev/null
@@ -1,41 +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.evaluators.staticcodegen;
-
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.hyracks.data.std.api.IPointable;
-
-/**
- * The null-handling code to be injected into the evaluator(...) method of scalar evaluators.
- */
-public class TypeCheckUtil {
-
-    public static byte[] NULL_BYTES = new byte[] { ATypeTag.SERIALIZED_NULL_TYPE_TAG };
-
-    public static boolean isNull(IPointable arg, IPointable resultPointable) {
-        byte[] data = arg.getByteArray();
-        int start = arg.getStartOffset();
-        if (data[start] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-            resultPointable.set(NULL_BYTES, 0, 1);
-            return true;
-        }
-        return false;
-    }
-
-}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/TypeChecker.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/TypeChecker.java
new file mode 100644
index 0000000..55c2c4b
--- /dev/null
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/staticcodegen/TypeChecker.java
@@ -0,0 +1,77 @@
+/*
+ * 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.evaluators.staticcodegen;
+
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.data.std.api.IPointable;
+
+/**
+ * The missing/null-handling code to be injected into the evaluator(...) method of scalar evaluators.
+ */
+public class TypeChecker {
+
+    private byte[] MISSING_BYTES = new byte[] { ATypeTag.SERIALIZED_MISSING_TYPE_TAG };
+    private byte[] NULL_BYTES = new byte[] { ATypeTag.SERIALIZED_NULL_TYPE_TAG };
+    private boolean meetNull = false;
+
+    /**
+     * This method should be called for each argument of a function.
+     *
+     * @param arg,
+     *            the argument pointable.
+     * @param resultPointable,
+     *            the returned result for the function.
+     * @return true if arg is MISSING; false otherwise.
+     */
+    public boolean isMissing(IPointable arg, IPointable resultPointable) {
+        byte[] data = arg.getByteArray();
+        int start = arg.getStartOffset();
+        byte serializedTypeTag = data[start];
+        if (serializedTypeTag == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+            resultPointable.set(MISSING_BYTES, 0, 1);
+            // resets meetNull for the next evaluate(...) call.
+            meetNull = false;
+            return true;
+        }
+        if (serializedTypeTag == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
+            meetNull |= true;
+        }
+        return false;
+    }
+
+    /**
+     * This method should be called after all arguments for a function are evaluated.
+     *
+     * @param resultPointable,
+     *            the returned result for the function.
+     * @return true if any argument is NULL; false otherwise.
+     */
+    public boolean isNull(IPointable resultPointable) {
+        if (meetNull) {
+            resultPointable.set(NULL_BYTES, 0, 1);
+            // resets meetNull.
+            meetNull = false;
+            return true;
+        }
+        // resets meetNull for the next evaluate(...) call.
+        meetNull = false;
+        return false;
+    }
+
+}
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
index c151dbd..5811cd6 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
@@ -26,7 +26,7 @@
 import java.util.Map;
 
 import org.apache.asterix.common.config.GlobalConfig;
-import org.apache.asterix.dataflow.data.nontagged.AqlNullWriterFactory;
+import org.apache.asterix.dataflow.data.nontagged.AqlMissingWriterFactory;
 import org.apache.asterix.formats.base.IDataFormat;
 import org.apache.asterix.formats.nontagged.AqlADMPrinterFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlBinaryBooleanInspectorImpl;
@@ -43,7 +43,7 @@
 import org.apache.asterix.formats.nontagged.AqlTypeTraitProvider;
 import org.apache.asterix.om.base.ABoolean;
 import org.apache.asterix.om.base.AInt32;
-import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.AOrderedList;
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.base.IAObject;
@@ -54,7 +54,7 @@
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
 import org.apache.asterix.om.functions.IFunctionManager;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
-import org.apache.asterix.om.typecomputer.base.TypeComputerUtilities;
+import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
 import org.apache.asterix.om.types.AOrderedListType;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
@@ -70,20 +70,11 @@
 import org.apache.asterix.runtime.evaluators.constructors.OpenRecordConstructorDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CastListDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.CastRecordDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.DeepEqualityDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.FlowRecordDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.OrderedListConstructorDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.UnorderedListConstructorDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.records.FieldAccessByIndexDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.records.FieldAccessByIndexEvalFactory;
 import org.apache.asterix.runtime.evaluators.functions.records.FieldAccessByNameDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.records.FieldAccessNestedDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.records.FieldAccessNestedEvalFactory;
-import org.apache.asterix.runtime.evaluators.functions.records.GetRecordFieldValueDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.records.GetRecordFieldsDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.records.RecordAddFieldsDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.records.RecordMergeDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.records.RecordRemoveFieldsDescriptor;
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.commons.lang3.mutable.MutableObject;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -114,7 +105,7 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.algebricks.runtime.evaluators.ColumnAccessEvalFactory;
 import org.apache.hyracks.algebricks.runtime.evaluators.ConstantEvalFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactoryProvider;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -125,6 +116,8 @@
 import org.apache.hyracks.dataflow.common.data.parsers.LongParserFactory;
 import org.apache.hyracks.dataflow.common.data.parsers.UTF8StringParserFactory;
 
+import junit.extensions.PA;
+
 public class NonTaggedDataFormat implements IDataFormat {
 
     private static boolean registered = false;
@@ -389,8 +382,8 @@
                 } else {
                     IAType itemType = (IAType) context.getType(f.getArguments().get(0).getValue());
                     if (itemType instanceof AUnionType) {
-                        if (((AUnionType) itemType).isNullableType()) {
-                            itemType = ((AUnionType) itemType).getNullableType();
+                        if (((AUnionType) itemType).isUnknownableType()) {
+                            itemType = ((AUnionType) itemType).getActualType();
                         } else {
                             // Convert UNION types into ANY.
                             itemType = BuiltinType.ANY;
@@ -408,7 +401,8 @@
                 IAType outType = (IAType) context.getType(expr);
                 IAType type0 = (IAType) context.getType(f.getArguments().get(0).getValue());
                 IAType type1 = (IAType) context.getType(f.getArguments().get(1).getValue());
-                ((RecordMergeDescriptor) fd).reset(outType, type0, type1);
+                PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.IAType, org.apache.asterix.om.types.IAType, "
+                        + " org.apache.asterix.om.types.IAType)", outType, type0, type1);
             }
         });
 
@@ -420,7 +414,8 @@
                 AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expr;
                 IAType type0 = (IAType) context.getType(f.getArguments().get(0).getValue());
                 IAType type1 = (IAType) context.getType(f.getArguments().get(1).getValue());
-                ((DeepEqualityDescriptor) fd).reset(type0, type1);
+                PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.IAType, org.apache.asterix.om.types.IAType)",
+                        type0, type1);
             }
         });
 
@@ -440,7 +435,8 @@
                 if (type1.getTypeTag().equals(ATypeTag.ANY)) {
                     type1 = DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE;
                 }
-                ((RecordAddFieldsDescriptor) fd).reset(outType, type0, type1);
+                PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.IAType, org.apache.asterix.om.types.IAType,"
+                        + " org.apache.asterix.om.types.IAType)", outType, type0, type1);
             }
         });
 
@@ -460,7 +456,8 @@
                 if (type1.getTypeTag().equals(ATypeTag.ANY)) {
                     type1 = DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE;
                 }
-                ((RecordRemoveFieldsDescriptor) fd).reset(outType, type0, type1);
+                PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.IAType, org.apache.asterix.om.types.IAType,"
+                        + " org.apache.asterix.om.types.IAType)", outType, type0, type1);
             }
         });
 
@@ -469,7 +466,7 @@
             public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment context)
                     throws AlgebricksException {
                 AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;
-                ARecordType rt = (ARecordType) TypeComputerUtilities.getRequiredType(funcExpr);
+                ARecordType rt = (ARecordType) TypeCastUtils.getRequiredType(funcExpr);
                 IAType it = (IAType) context.getType(funcExpr.getArguments().get(0).getValue());
                 if (it.getTypeTag().equals(ATypeTag.ANY)) {
                     it = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
@@ -482,7 +479,7 @@
             public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment context)
                     throws AlgebricksException {
                 AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;
-                AbstractCollectionType rt = (AbstractCollectionType) TypeComputerUtilities.getRequiredType(funcExpr);
+                AbstractCollectionType rt = (AbstractCollectionType) TypeCastUtils.getRequiredType(funcExpr);
                 IAType it = (IAType) context.getType(funcExpr.getArguments().get(0).getValue());
                 if (it.getTypeTag().equals(ATypeTag.ANY)) {
                     it = DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE;
@@ -490,15 +487,6 @@
                 ((CastListDescriptor) fd).reset(rt, (AbstractCollectionType) it);
             }
         });
-        functionTypeInferers.put(AsterixBuiltinFunctions.FLOW_RECORD, new FunctionTypeInferer() {
-            @Override
-            public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment context)
-                    throws AlgebricksException {
-                ARecordType it = (ARecordType) TypeComputerUtilities
-                        .getInputType((AbstractFunctionCallExpression) expr);
-                ((FlowRecordDescriptor) fd).reset(it);
-            }
-        });
         functionTypeInferers.put(AsterixBuiltinFunctions.OPEN_RECORD_CONSTRUCTOR, new FunctionTypeInferer() {
             @Override
             public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment context)
@@ -561,16 +549,16 @@
                 switch (t.getTypeTag()) {
                     case RECORD: {
                         ARecordType recType = (ARecordType) t;
-                        ((FieldAccessByIndexDescriptor) fd).reset(recType);
+                        PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.ARecordType)", recType);
                         break;
                     }
                     case UNION: {
                         AUnionType unionT = (AUnionType) t;
-                        if (unionT.isNullableType()) {
-                            IAType t2 = unionT.getNullableType();
+                        if (unionT.isUnknownableType()) {
+                            IAType t2 = unionT.getActualType();
                             if (t2.getTypeTag() == ATypeTag.RECORD) {
                                 ARecordType recType = (ARecordType) t2;
-                                ((FieldAccessByIndexDescriptor) fd).reset(recType);
+                                PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.ARecordType)", recType);
                                 break;
                             }
                         }
@@ -598,7 +586,8 @@
                 switch (t.getTypeTag()) {
                     case RECORD: {
                         ARecordType recType = (ARecordType) t;
-                        ((FieldAccessNestedDescriptor) fd).reset(recType, listFieldPath);
+                        PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.ARecordType, java.util.List)", recType,
+                                listFieldPath);
                         break;
                     }
                     default: {
@@ -615,7 +604,7 @@
                 IAType t = (IAType) context.getType(fce.getArguments().get(0).getValue());
                 if (t.getTypeTag().equals(ATypeTag.RECORD)) {
                     ARecordType recType = (ARecordType) t;
-                    ((GetRecordFieldsDescriptor) fd).reset(recType);
+                    PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.ARecordType)", recType);
                 } else {
                     throw new NotImplementedException("get-record-fields for data of type " + t);
                 }
@@ -629,7 +618,7 @@
                 IAType t = (IAType) context.getType(fce.getArguments().get(0).getValue());
                 if (t.getTypeTag().equals(ATypeTag.RECORD)) {
                     ARecordType recType = (ARecordType) t;
-                    ((GetRecordFieldValueDescriptor) fd).reset(recType);
+                    PA.invokeMethod(fd, "reset(org.apache.asterix.om.types.ARecordType)", recType);
                 } else {
                     throw new NotImplementedException("get-record-field-value for data of type " + t);
                 }
@@ -662,8 +651,8 @@
     @Override
     public IScalarEvaluatorFactory getConstantEvalFactory(IAlgebricksConstantValue value) throws AlgebricksException {
         IAObject obj = null;
-        if (value.isNull()) {
-            obj = ANull.NULL;
+        if (value.isMissing()) {
+            obj = AMissing.MISSING;
         } else if (value.isTrue()) {
             obj = ABoolean.TRUE;
         } else if (value.isFalse()) {
@@ -688,8 +677,8 @@
     }
 
     @Override
-    public INullWriterFactory getNullWriterFactory() {
-        return AqlNullWriterFactory.INSTANCE;
+    public IMissingWriterFactory getMissingWriterFactory() {
+        return AqlMissingWriterFactory.INSTANCE;
     }
 
     @Override
@@ -701,7 +690,7 @@
                 switch (expr.getExpressionTag()) {
                     case CONSTANT: {
                         ConstantExpression c = (ConstantExpression) expr;
-                        if (c == ConstantExpression.NULL) {
+                        if (c == ConstantExpression.MISSING) {
                             return 1;
                         } else if (c == ConstantExpression.FALSE || c == ConstantExpression.TRUE) {
                             return 2;
@@ -709,25 +698,26 @@
                             AsterixConstantValue acv = (AsterixConstantValue) c.getValue();
                             IAObject o = acv.getObject();
                             switch (o.getType().getTypeTag()) {
-                                case DOUBLE: {
+                                case DOUBLE:
                                     return 9;
-                                }
-                                case BOOLEAN: {
-                                    return 2;
-                                }
-                                case NULL: {
-                                    return 1;
-                                }
-                                case INT32: {
+                                case FLOAT:
                                     return 5;
-                                }
-                                case INT64: {
+                                case BOOLEAN:
+                                    return 2;
+                                case MISSING:
+                                    return 1;
+                                case NULL:
+                                    return 1;
+                                case INT8:
+                                    return 2;
+                                case INT16:
+                                    return 3;
+                                case INT32:
+                                    return 5;
+                                case INT64:
                                     return 9;
-                                }
-                                default: {
-                                    // TODO
+                                default:
                                     return -1;
-                                }
                             }
                         }
                     }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMPrimaryUpsertOperatorNodePushable.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMPrimaryUpsertOperatorNodePushable.java
index 7785978..24988d4 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMPrimaryUpsertOperatorNodePushable.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMPrimaryUpsertOperatorNodePushable.java
@@ -30,7 +30,7 @@
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.hyracks.api.comm.VSizeFrame;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -59,8 +59,8 @@
 
     private final PermutingFrameTupleReference key;
     private MultiComparator keySearchCmp;
-    private ArrayTupleBuilder nullTupleBuilder;
-    private final INullWriter nullWriter;
+    private ArrayTupleBuilder missingTupleBuilder;
+    private final IMissingWriter missingWriter;
     private ArrayTupleBuilder tb;
     private DataOutput dos;
     private RangePredicate searchPred;
@@ -79,8 +79,8 @@
             int partition, int[] fieldPermutation, IRecordDescriptorProvider recordDescProvider, int numOfPrimaryKeys,
             ARecordType recordType, int filterFieldIndex) {
         super(opDesc, ctx, partition, fieldPermutation, recordDescProvider, IndexOperation.UPSERT);
-        // initialize nullWriter
-        this.nullWriter = opDesc.getNullWriterFactory().createNullWriter();
+        // initialize missingWriter
+        this.missingWriter = opDesc.getMissingWriterFactory().createMissingWriter();
         // The search key should only have the primary index and not use the permutations.
         this.key = new PermutingFrameTupleReference();
         int[] searchKeyPermutations = new int[numOfPrimaryKeys];
@@ -114,14 +114,14 @@
         index = indexHelper.getIndexInstance();
 
         try {
-            nullTupleBuilder = new ArrayTupleBuilder(1);
-            DataOutput out = nullTupleBuilder.getDataOutput();
+            missingTupleBuilder = new ArrayTupleBuilder(1);
+            DataOutput out = missingTupleBuilder.getDataOutput();
             try {
-                nullWriter.writeNull(out);
+                missingWriter.writeMissing(out);
             } catch (IOException e) {
                 throw new HyracksDataException(e);
             }
-            nullTupleBuilder.addFieldEndOffset();
+            missingTupleBuilder.addFieldEndOffset();
             searchPred = createSearchPredicate();
             tb = new ArrayTupleBuilder(recordDesc.getFieldCount());
             dos = tb.getDataOutput();
@@ -180,11 +180,11 @@
     }
 
     public static boolean isNull(ITupleReference t1, int field) {
-        return t1.getFieldData(field)[t1.getFieldStart(field)] == ATypeTag.SERIALIZED_NULL_TYPE_TAG;
+        return t1.getFieldData(field)[t1.getFieldStart(field)] == ATypeTag.SERIALIZED_MISSING_TYPE_TAG;
     }
 
     private void addNullField() throws IOException {
-        dos.write(nullTupleBuilder.getByteArray());
+        dos.write(missingTupleBuilder.getByteArray());
         tb.addFieldEndOffset();
     }
 
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMTreeUpsertOperatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMTreeUpsertOperatorDescriptor.java
index 803e15d..0c1177f 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMTreeUpsertOperatorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/AsterixLSMTreeUpsertOperatorDescriptor.java
@@ -23,7 +23,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -50,12 +50,12 @@
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] fieldPermutation,
             IIndexDataflowHelperFactory dataflowHelperFactory, ITupleFilterFactory tupleFilterFactory,
-            boolean isPrimary, String indexName, INullWriterFactory nullWriterFactory,
+            boolean isPrimary, String indexName, IMissingWriterFactory missingWriterFactory,
             IModificationOperationCallbackFactory modificationOpCallbackProvider,
             ISearchOperationCallbackFactory searchOpCallbackProvider, int[] prevValuePermutation) {
         super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, bloomFilterKeyFields, fieldPermutation, IndexOperation.UPSERT,
-                dataflowHelperFactory, tupleFilterFactory, isPrimary, indexName, nullWriterFactory,
+                dataflowHelperFactory, tupleFilterFactory, isPrimary, indexName, missingWriterFactory,
                 modificationOpCallbackProvider, searchOpCallbackProvider);
         this.prevValuePermutation = prevValuePermutation;
     }
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 495e7b6..0883520 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
@@ -80,7 +80,7 @@
                 private final IPointable inputVal = new VoidPointable();
                 private final IScalarEvaluator argEval = listEvalFactory.createScalarEvaluator(ctx);
                 private int itemIndex;
-                private boolean metNull = false;
+                private boolean metUnknown = false;
 
                 @Override
                 public void init(IFrameTupleReference tuple) throws AlgebricksException {
@@ -88,8 +88,8 @@
                         argEval.evaluate(tuple, inputVal);
                         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
                                 .deserialize(inputVal.getByteArray()[inputVal.getStartOffset()]);
-                        if (typeTag == ATypeTag.NULL) {
-                            metNull = true;
+                        if (typeTag == ATypeTag.MISSING || typeTag == ATypeTag.NULL) {
+                            metUnknown = true;
                             return;
                         }
                         listAccessor.reset(inputVal.getByteArray(), inputVal.getStartOffset());
@@ -102,7 +102,7 @@
                 @Override
                 public boolean step(IPointable result) throws AlgebricksException {
                     try {
-                        if (!metNull) {
+                        if (!metUnknown) {
                             if (itemIndex < listAccessor.size()) {
                                 resultStorage.reset();
                                 listAccessor.writeItem(itemIndex, resultStorage.getDataOutput());
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 4ad01d8..b6f8b0b 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
@@ -73,7 +73,7 @@
                     private int posCrt;
                     private ATypeTag itemTag;
                     private boolean selfDescList = false;
-                    private boolean metNull = false;
+                    private boolean metUnknown = false;
 
                     @Override
                     public void init(IFrameTupleReference tuple) throws AlgebricksException {
@@ -89,11 +89,12 @@
                             evalList.evaluate(tuple, inputVal);
                             byte[] serList = inputVal.getByteArray();
                             int offset = inputVal.getStartOffset();
-                            metNull = false;
+                            metUnknown = false;
 
                             byte typeTag = serList[offset];
-                            if (typeTag == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
-                                metNull = true;
+                            if (typeTag == ATypeTag.SERIALIZED_MISSING_TYPE_TAG
+                                    || typeTag == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
+                                metUnknown = true;
                                 return;
                             }
 
@@ -121,7 +122,7 @@
 
                     @Override
                     public boolean step(IPointable result) throws AlgebricksException {
-                        if (!metNull && posCrt < posStart + numItems && posCrt < numItemsMax) {
+                        if (!metUnknown && posCrt < posStart + numItems && posCrt < numItemsMax) {
                             resultStorage.reset();
                             byte[] serList = inputVal.getByteArray();
                             int offset = inputVal.getStartOffset();
diff --git a/asterixdb/asterix-server/src/main/licenses/NOTICE b/asterixdb/asterix-server/src/main/licenses/NOTICE
index d9240eb..4686009 100644
--- a/asterixdb/asterix-server/src/main/licenses/NOTICE
+++ b/asterixdb/asterix-server/src/main/licenses/NOTICE
@@ -684,3 +684,51 @@
         * license/LICENSE.jzlib.txt (BSD Style License)
       * HOMEPAGE:
         * http://www.jcraft.com/jzlib/
+
+ - repo/asm-all-5.1.jar
+
+   Copyright (c) 2000-2011 INRIA, France Telecom
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+
+   3. Neither the name of the copyright holders nor the names of its
+      contributors may be used to endorse or promote products derived from
+      this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+   THE POSSIBILITY OF SUCH DAMAGE.
+
+ - repo/privilegedaccessor-1.2.2.jar
+
+   Copyright 2004-2012 Sebastian Dietrich (Sebastian.Dietrich@e-movimento.com)
+
+   Licensed 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.
diff --git a/asterixdb/asterix-tools/src/main/java/org/apache/asterix/tools/datagen/AdmDataGen.java b/asterixdb/asterix-tools/src/main/java/org/apache/asterix/tools/datagen/AdmDataGen.java
index 30fb4e9..2918575 100644
--- a/asterixdb/asterix-tools/src/main/java/org/apache/asterix/tools/datagen/AdmDataGen.java
+++ b/asterixdb/asterix-tools/src/main/java/org/apache/asterix/tools/datagen/AdmDataGen.java
@@ -673,7 +673,7 @@
                 for (int i = 0; i < m; i++) {
                     IAType ti = recType.getFieldTypes()[i];
                     if (NonTaggedFormatUtil.isOptional(ti)) {
-                        ti = ((AUnionType) ti).getNullableType();
+                        ti = ((AUnionType) ti).getActualType();
                         nullable[i] = true;
                     }
                     IRecordFieldDataGen rfdg = annot.getDeclaredFieldsDatagen()[i];
diff --git a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java
index 1bafe5c..6f28df3 100644
--- a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java
+++ b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java
@@ -27,7 +27,7 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionRuntimeProvider;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IMergeAggregationExpressionFactory;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IPartialAggregationTypeComputer;
 import org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController;
 import org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
@@ -41,7 +41,7 @@
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
 import org.apache.hyracks.algebricks.data.ISerializerDeserializerProvider;
 import org.apache.hyracks.algebricks.data.ITypeTraitProvider;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactoryProvider;
 
 public abstract class AbstractCompilerFactoryBuilder {
@@ -59,9 +59,9 @@
     protected IPredicateEvaluatorFactoryProvider predEvaluatorFactoryProvider;
     protected IExpressionRuntimeProvider expressionRuntimeProvider;
     protected IExpressionTypeComputer expressionTypeComputer;
-    protected INullableTypeComputer nullableTypeComputer;
+    protected IMissableTypeComputer missableTypeComputer;
     protected IExpressionEvalSizeComputer expressionEvalSizeComputer;
-    protected INullWriterFactory nullWriterFactory;
+    protected IMissingWriterFactory missingWriterFactory;
     protected INormalizedKeyComputerFactoryProvider normalizedKeyComputerFactoryProvider;
     protected IPartialAggregationTypeComputer partialAggregationTypeComputer;
     protected IMergeAggregationExpressionFactory mergeAggregationExpressionFactory;
@@ -174,12 +174,12 @@
         return clusterLocations;
     }
 
-    public void setNullWriterFactory(INullWriterFactory nullWriterFactory) {
-        this.nullWriterFactory = nullWriterFactory;
+    public void setMissingWriterFactory(IMissingWriterFactory missingWriterFactory) {
+        this.missingWriterFactory = missingWriterFactory;
     }
 
-    public INullWriterFactory getNullWriterFactory() {
-        return nullWriterFactory;
+    public IMissingWriterFactory getMissingWriterFactory() {
+        return missingWriterFactory;
     }
 
     public void setExpressionEvalSizeComputer(IExpressionEvalSizeComputer expressionEvalSizeComputer) {
@@ -224,12 +224,12 @@
         this.physicalOptimizationConfig = physicalOptimizationConfig;
     }
 
-    public void setNullableTypeComputer(INullableTypeComputer nullableTypeComputer) {
-        this.nullableTypeComputer = nullableTypeComputer;
+    public void setMissableTypeComputer(IMissableTypeComputer missableTypeComputer) {
+        this.missableTypeComputer = missableTypeComputer;
     }
 
-    public INullableTypeComputer getNullableTypeComputer() {
-        return nullableTypeComputer;
+    public IMissableTypeComputer getMissableTypeComputer() {
+        return missableTypeComputer;
     }
 
 }
diff --git a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java
index 1d3a55c..09982a0 100644
--- a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java
+++ b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java
@@ -25,7 +25,7 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionEvalSizeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IMergeAggregationExpressionFactory;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 import org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor;
 import org.apache.hyracks.algebricks.core.config.AlgebricksConfig;
@@ -51,11 +51,11 @@
         public IOptimizationContext createOptimizationContext(int varCounter,
                 IExpressionEvalSizeComputer expressionEvalSizeComputer,
                 IMergeAggregationExpressionFactory mergeAggregationExpressionFactory,
-                IExpressionTypeComputer expressionTypeComputer, INullableTypeComputer nullableTypeComputer,
+                IExpressionTypeComputer expressionTypeComputer, IMissableTypeComputer missableTypeComputer,
                 PhysicalOptimizationConfig physicalOptimizationConfig, AlgebricksPartitionConstraint clusterLocations) {
             LogicalOperatorPrettyPrintVisitor prettyPrintVisitor = new LogicalOperatorPrettyPrintVisitor();
             return new AlgebricksOptimizationContext(varCounter, expressionEvalSizeComputer,
-                    mergeAggregationExpressionFactory, expressionTypeComputer, nullableTypeComputer,
+                    mergeAggregationExpressionFactory, expressionTypeComputer, missableTypeComputer,
                     physicalOptimizationConfig, clusterLocations, prettyPrintVisitor);
         }
     }
@@ -78,7 +78,7 @@
                     int varCounter) {
                 final IOptimizationContext oc = optCtxFactory.createOptimizationContext(varCounter,
                         expressionEvalSizeComputer, mergeAggregationExpressionFactory, expressionTypeComputer,
-                        nullableTypeComputer, physicalOptimizationConfig, clusterLocations);
+                        missableTypeComputer, physicalOptimizationConfig, clusterLocations);
                 oc.setMetadataDeclarations(metadata);
                 final HeuristicOptimizer opt = new HeuristicOptimizer(plan, logicalRewrites, physicalRewrites, oc);
                 return new ICompiler() {
@@ -95,9 +95,9 @@
                         JobGenContext context = new JobGenContext(null, metadata, appContext,
                                 serializerDeserializerProvider, hashFunctionFactoryProvider, hashFunctionFamilyProvider,
                                 comparatorFactoryProvider, typeTraitProvider, binaryBooleanInspectorFactory,
-                                binaryIntegerInspectorFactory, printerProvider, nullWriterFactory,
+                                binaryIntegerInspectorFactory, printerProvider, missingWriterFactory,
                                 normalizedKeyComputerFactoryProvider, expressionRuntimeProvider, expressionTypeComputer,
-                                nullableTypeComputer, oc, expressionEvalSizeComputer, partialAggregationTypeComputer,
+                                oc, expressionEvalSizeComputer, partialAggregationTypeComputer,
                                 predEvaluatorFactoryProvider, physicalOptimizationConfig.getFrameSize(),
                                 clusterLocations);
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ConstantExpression.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ConstantExpression.java
index 449688b..33da4f9 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ConstantExpression.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/ConstantExpression.java
@@ -24,7 +24,6 @@
 import java.util.Map;
 
 import org.apache.commons.lang3.mutable.Mutable;
-
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
@@ -42,6 +41,11 @@
         }
 
         @Override
+        public boolean isMissing() {
+            return false;
+        }
+
+        @Override
         public boolean isNull() {
             return false;
         }
@@ -64,6 +68,11 @@
         }
 
         @Override
+        public boolean isMissing() {
+            return false;
+        }
+
+        @Override
         public boolean isNull() {
             return false;
         }
@@ -78,7 +87,7 @@
             return "FALSE";
         }
     });
-    public final static ConstantExpression NULL = new ConstantExpression(new IAlgebricksConstantValue() {
+    public final static ConstantExpression MISSING = new ConstantExpression(new IAlgebricksConstantValue() {
 
         @Override
         public boolean isTrue() {
@@ -86,18 +95,23 @@
         }
 
         @Override
-        public boolean isNull() {
+        public boolean isMissing() {
             return true;
         }
 
         @Override
+        public boolean isNull() {
+            return false;
+        }
+
+        @Override
         public boolean isFalse() {
             return false;
         }
 
         @Override
         public String toString() {
-            return "NULL";
+            return "MISSING";
         }
     });
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IAlgebricksConstantValue.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IAlgebricksConstantValue.java
index f80f82b..e6e2834 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IAlgebricksConstantValue.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IAlgebricksConstantValue.java
@@ -19,6 +19,8 @@
 package org.apache.hyracks.algebricks.core.algebra.expressions;
 
 public interface IAlgebricksConstantValue {
+    public boolean isMissing();
+
     public boolean isNull();
 
     public boolean isTrue();
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/INullableTypeComputer.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IMissableTypeComputer.java
similarity index 87%
rename from hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/INullableTypeComputer.java
rename to hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IMissableTypeComputer.java
index 2aea6b0..029f41a 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/INullableTypeComputer.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/IMissableTypeComputer.java
@@ -20,10 +20,10 @@
 
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 
-public interface INullableTypeComputer {
-    public Object makeNullableType(Object type) throws AlgebricksException;
+public interface IMissableTypeComputer {
+    public Object makeMissableType(Object type) throws AlgebricksException;
 
-    public boolean canBeNull(Object type);
+    public boolean canBeMissing(Object type);
 
     public Object getNonOptionalType(Object type);
 }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/functions/AlgebricksBuiltinFunctions.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/functions/AlgebricksBuiltinFunctions.java
index 874b751..07e4f98 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/functions/AlgebricksBuiltinFunctions.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/functions/AlgebricksBuiltinFunctions.java
@@ -50,6 +50,9 @@
     // numerics
     public final static FunctionIdentifier NUMERIC_ADD = new FunctionIdentifier(ALGEBRICKS_NS, "numeric-add", 2);
 
+    // missings
+    public final static FunctionIdentifier IS_MISSING = new FunctionIdentifier(ALGEBRICKS_NS, "is-missing", 1);
+
     // nulls
     public final static FunctionIdentifier IS_NULL = new FunctionIdentifier(ALGEBRICKS_NS, "is-null", 1);
 
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 61a2353..1a7e224 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
@@ -190,7 +190,7 @@
         for (int i = 0; i < n; i++) {
             envPointers[i] = new OpRefTypeEnvPointer(inputs.get(i), ctx);
         }
-        return new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(), ctx.getNullableTypeComputer(),
+        return new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(), ctx.getMissableTypeComputer(),
                 ctx.getMetadataProvider(), TypePropagationPolicy.ALL, envPointers);
     }
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/GroupByOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/GroupByOperator.java
index 1d26148..5b0fd14 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/GroupByOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/GroupByOperator.java
@@ -256,7 +256,7 @@
             }
         }
         IVariableTypeEnvironment env = new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(),
-                ctx.getNullableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.ALL, envPointers);
+                ctx.getMissableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.ALL, envPointers);
         ILogicalOperator child = inputs.get(0).getValue();
         IVariableTypeEnvironment env2 = ctx.getOutputTypeEnvironment(child);
         for (Pair<LogicalVariable, Mutable<ILogicalExpression>> p : getGroupByList()) {
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterJoinOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterJoinOperator.java
index b5e4330..9470ab8 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterJoinOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterJoinOperator.java
@@ -22,7 +22,6 @@
 import java.util.List;
 
 import org.apache.commons.lang3.mutable.Mutable;
-
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
@@ -66,7 +65,8 @@
             envPointers[i] = new OpRefTypeEnvPointer(inputs.get(i), ctx);
         }
         PropagatingTypeEnvironment env = new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(),
-                ctx.getNullableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.LEFT_OUTER, envPointers);
+                ctx.getMissableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.LEFT_OUTER,
+                envPointers);
         List<LogicalVariable> liveVars = new ArrayList<LogicalVariable>();
         VariableUtilities.getLiveVariables(inputs.get(1).getValue(), liveVars); // live variables from outer branch can be null together
         env.getCorrelatedNullableVariableLists().add(liveVars);
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterUnnestMapOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterUnnestMapOperator.java
index 56e2dfb..fbd8619 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterUnnestMapOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/LeftOuterUnnestMapOperator.java
@@ -65,7 +65,7 @@
         // For the variables from the inner branch, the output type is the union
         // of (original type + null).
         for (int i = 0; i < variables.size(); i++) {
-            env.setVarType(variables.get(i), ctx.getNullableTypeComputer().makeNullableType(variableTypes.get(i)));
+            env.setVarType(variables.get(i), ctx.getMissableTypeComputer().makeMissableType(variableTypes.get(i)));
         }
 
         return env;
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/NestedTupleSourceOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/NestedTupleSourceOperator.java
index 2b66e8f..35da55b 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/NestedTupleSourceOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/NestedTupleSourceOperator.java
@@ -103,7 +103,7 @@
                 return ctx.getOutputTypeEnvironment(op);
             }
         };
-        return new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(), ctx.getNullableTypeComputer(),
+        return new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(), ctx.getMissableTypeComputer(),
                 ctx.getMetadataProvider(), TypePropagationPolicy.ALL, p);
     }
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SelectOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SelectOperator.java
index 8a8d1f2..e8a9670 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SelectOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SelectOperator.java
@@ -21,7 +21,6 @@
 import java.util.ArrayList;
 
 import org.apache.commons.lang3.mutable.Mutable;
-
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
@@ -45,7 +44,8 @@
     private final boolean retainNull;
     private final LogicalVariable nullPlaceholderVar;
 
-    public SelectOperator(Mutable<ILogicalExpression> condition, boolean retainNull, LogicalVariable nullPlaceholderVar) {
+    public SelectOperator(Mutable<ILogicalExpression> condition, boolean retainNull,
+            LogicalVariable nullPlaceholderVar) {
         this.condition = condition;
         this.retainNull = retainNull;
         this.nullPlaceholderVar = nullPlaceholderVar;
@@ -98,20 +98,22 @@
         ITypeEnvPointer[] envPointers = new ITypeEnvPointer[1];
         envPointers[0] = new OpRefTypeEnvPointer(inputs.get(0), ctx);
         PropagatingTypeEnvironment env = new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(),
-                ctx.getNullableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.ALL, envPointers);
-        if (condition.getValue().getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
-            AbstractFunctionCallExpression f1 = (AbstractFunctionCallExpression) condition.getValue();
-            if (f1.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.NOT)) {
-                ILogicalExpression a1 = f1.getArguments().get(0).getValue();
-                if (a1.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
-                    AbstractFunctionCallExpression f2 = (AbstractFunctionCallExpression) a1;
-                    if (f2.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.IS_NULL)) {
-                        ILogicalExpression a2 = f2.getArguments().get(0).getValue();
-                        if (a2.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
-                            LogicalVariable var = ((VariableReferenceExpression) a2).getVariableReference();
-                            env.getNonNullVariables().add(var);
-                        }
-                    }
+                ctx.getMissableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.ALL, envPointers);
+        if (condition.getValue().getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
+            return env;
+        }
+        AbstractFunctionCallExpression f1 = (AbstractFunctionCallExpression) condition.getValue();
+        if (!f1.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.NOT)) {
+            return env;
+        }
+        ILogicalExpression a1 = f1.getArguments().get(0).getValue();
+        if (a1.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
+            AbstractFunctionCallExpression f2 = (AbstractFunctionCallExpression) a1;
+            if (f2.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.IS_MISSING)) {
+                ILogicalExpression a2 = f2.getArguments().get(0).getValue();
+                if (a2.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
+                    LogicalVariable var = ((VariableReferenceExpression) a2).getVariableReference();
+                    env.getNonNullVariables().add(var);
                 }
             }
         }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SinkOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SinkOperator.java
index af85fdd7..5205959 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SinkOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SinkOperator.java
@@ -75,7 +75,7 @@
             envPointers[i] = new OpRefTypeEnvPointer(inputs.get(i), ctx);
         }
         PropagatingTypeEnvironment env = new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(),
-                ctx.getNullableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.ALL, envPointers);
+                ctx.getMissableTypeComputer(), ctx.getMetadataProvider(), TypePropagationPolicy.ALL, envPointers);
         return env;
 
     }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SubplanOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SubplanOperator.java
index cf11b3e..9dcc402 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SubplanOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SubplanOperator.java
@@ -108,7 +108,7 @@
                 i++;
             }
         }
-        return new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(), ctx.getNullableTypeComputer(),
+        return new PropagatingTypeEnvironment(ctx.getExpressionTypeComputer(), ctx.getMissableTypeComputer(),
                 ctx.getMetadataProvider(), TypePropagationPolicy.LEFT_OUTER, envPointers);
     }
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/HybridHashJoinPOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/HybridHashJoinPOperator.java
index a24b87b..359cdb3 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/HybridHashJoinPOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/HybridHashJoinPOperator.java
@@ -48,7 +48,7 @@
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFamily;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactoryProvider;
 import org.apache.hyracks.api.dataflow.value.ITuplePairComparator;
@@ -110,7 +110,7 @@
     @Override
     public void contributeRuntimeOperator(IHyracksJobBuilder builder, JobGenContext context, ILogicalOperator op,
             IOperatorSchema propagatedSchema, IOperatorSchema[] inputSchemas, IOperatorSchema outerPlanSchema)
-                    throws AlgebricksException {
+            throws AlgebricksException {
         int[] keysLeft = JobGenHelper.variablesToFieldIndexes(keysLeftBranch, inputSchemas[0]);
         int[] keysRight = JobGenHelper.variablesToFieldIndexes(keysRightBranch, inputSchemas[1]);
         IVariableTypeEnvironment env = context.getTypeEnvironment(op);
@@ -128,14 +128,13 @@
 
         IPredicateEvaluatorFactoryProvider predEvaluatorFactoryProvider = context
                 .getPredicateEvaluatorFactoryProvider();
-        IPredicateEvaluatorFactory predEvaluatorFactory = (predEvaluatorFactoryProvider == null ? null
-                : predEvaluatorFactoryProvider.getPredicateEvaluatorFactory(keysLeft, keysRight));
+        IPredicateEvaluatorFactory predEvaluatorFactory = predEvaluatorFactoryProvider == null ? null
+                : predEvaluatorFactoryProvider.getPredicateEvaluatorFactory(keysLeft, keysRight);
 
         RecordDescriptor recDescriptor = JobGenHelper.mkRecordDescriptor(context.getTypeEnvironment(op),
                 propagatedSchema, context);
         IOperatorDescriptorRegistry spec = builder.getJobSpec();
-        IOperatorDescriptor opDesc = null;
-
+        IOperatorDescriptor opDesc;
         boolean optimizedHashJoin = true;
         for (IBinaryHashFunctionFamily family : hashFunFamilies) {
             if (family == null) {
@@ -144,65 +143,12 @@
             }
         }
 
-        if (!optimizedHashJoin) {
-            try {
-                switch (kind) {
-                    case INNER: {
-                        opDesc = new HybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(),
-                                maxInputBuildSizeInFrames, aveRecordsPerFrame, getFudgeFactor(), keysLeft, keysRight,
-                                hashFunFactories, comparatorFactories, recDescriptor, predEvaluatorFactory, false, null);
-                        break;
-                    }
-                    case LEFT_OUTER: {
-                        INullWriterFactory[] nullWriterFactories = new INullWriterFactory[inputSchemas[1].getSize()];
-                        for (int j = 0; j < nullWriterFactories.length; j++) {
-                            nullWriterFactories[j] = context.getNullWriterFactory();
-                        }
-                        opDesc = new HybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(),
-                                maxInputBuildSizeInFrames, aveRecordsPerFrame, getFudgeFactor(), keysLeft, keysRight,
-                                hashFunFactories, comparatorFactories, recDescriptor, predEvaluatorFactory, true,
-                                nullWriterFactories);
-                        break;
-                    }
-                    default: {
-                        throw new NotImplementedException();
-                    }
-                }
-            } catch (HyracksDataException e) {
-                throw new AlgebricksException(e);
-            }
+        if (optimizedHashJoin) {
+            opDesc = generateOptimizedHashJoinRuntime(context, inputSchemas, keysLeft, keysRight, hashFunFamilies,
+                    comparatorFactories, predEvaluatorFactory, recDescriptor, spec);
         } else {
-            try {
-                switch (kind) {
-                    case INNER: {
-                        opDesc = new OptimizedHybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(),
-                                maxInputBuildSizeInFrames, getFudgeFactor(), keysLeft, keysRight, hashFunFamilies,
-                                comparatorFactories, recDescriptor,
-                                new JoinMultiComparatorFactory(comparatorFactories, keysLeft, keysRight),
-                                new JoinMultiComparatorFactory(comparatorFactories, keysRight, keysLeft),
-                                predEvaluatorFactory);
-                        break;
-                    }
-                    case LEFT_OUTER: {
-                        INullWriterFactory[] nullWriterFactories = new INullWriterFactory[inputSchemas[1].getSize()];
-                        for (int j = 0; j < nullWriterFactories.length; j++) {
-                            nullWriterFactories[j] = context.getNullWriterFactory();
-                        }
-                        opDesc = new OptimizedHybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(),
-                                maxInputBuildSizeInFrames, getFudgeFactor(), keysLeft, keysRight, hashFunFamilies,
-                                comparatorFactories, recDescriptor,
-                                new JoinMultiComparatorFactory(comparatorFactories, keysLeft, keysRight),
-                                new JoinMultiComparatorFactory(comparatorFactories, keysRight, keysLeft),
-                                predEvaluatorFactory, true, nullWriterFactories);
-                        break;
-                    }
-                    default: {
-                        throw new NotImplementedException();
-                    }
-                }
-            } catch (HyracksDataException e) {
-                throw new AlgebricksException(e);
-            }
+            opDesc = generateHashJoinRuntime(context, inputSchemas, keysLeft, keysRight, hashFunFactories,
+                    comparatorFactories, predEvaluatorFactory, recDescriptor, spec);
         }
         contributeOpDesc(builder, (AbstractLogicalOperator) op, opDesc);
 
@@ -212,30 +158,101 @@
         builder.contributeGraphEdge(src2, 0, op, 1);
     }
 
+    private IOperatorDescriptor generateHashJoinRuntime(JobGenContext context, IOperatorSchema[] inputSchemas,
+            int[] keysLeft, int[] keysRight, IBinaryHashFunctionFactory[] hashFunFactories,
+            IBinaryComparatorFactory[] comparatorFactories, IPredicateEvaluatorFactory predEvaluatorFactory,
+            RecordDescriptor recDescriptor, IOperatorDescriptorRegistry spec) throws AlgebricksException {
+        IOperatorDescriptor opDesc;
+        try {
+            switch (kind) {
+                case INNER:
+                    opDesc = new HybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(), maxInputBuildSizeInFrames,
+                            aveRecordsPerFrame, getFudgeFactor(), keysLeft, keysRight, hashFunFactories,
+                            comparatorFactories, recDescriptor, predEvaluatorFactory, false, null);
+                    break;
+                case LEFT_OUTER:
+                    IMissingWriterFactory[] nonMatchWriterFactories = new IMissingWriterFactory[inputSchemas[1]
+                            .getSize()];
+                    for (int j = 0; j < nonMatchWriterFactories.length; j++) {
+                        nonMatchWriterFactories[j] = context.getNullWriterFactory();
+                    }
+                    opDesc = new HybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(), maxInputBuildSizeInFrames,
+                            aveRecordsPerFrame, getFudgeFactor(), keysLeft, keysRight, hashFunFactories,
+                            comparatorFactories, recDescriptor, predEvaluatorFactory, true, nonMatchWriterFactories);
+                    break;
+                default:
+                    throw new NotImplementedException();
+            }
+        } catch (HyracksDataException e) {
+            throw new AlgebricksException(e);
+        }
+        return opDesc;
+    }
+
+    private IOperatorDescriptor generateOptimizedHashJoinRuntime(JobGenContext context, IOperatorSchema[] inputSchemas,
+            int[] keysLeft, int[] keysRight, IBinaryHashFunctionFamily[] hashFunFamilies,
+            IBinaryComparatorFactory[] comparatorFactories, IPredicateEvaluatorFactory predEvaluatorFactory,
+            RecordDescriptor recDescriptor, IOperatorDescriptorRegistry spec) throws AlgebricksException {
+        IOperatorDescriptor opDesc;
+        try {
+            switch (kind) {
+                case INNER:
+                    opDesc = new OptimizedHybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(),
+                            maxInputBuildSizeInFrames, getFudgeFactor(), keysLeft, keysRight, hashFunFamilies,
+                            comparatorFactories, recDescriptor,
+                            new JoinMultiComparatorFactory(comparatorFactories, keysLeft, keysRight),
+                            new JoinMultiComparatorFactory(comparatorFactories, keysRight, keysLeft),
+                            predEvaluatorFactory);
+                    break;
+                case LEFT_OUTER:
+                    IMissingWriterFactory[] nonMatchWriterFactories = new IMissingWriterFactory[inputSchemas[1]
+                            .getSize()];
+                    for (int j = 0; j < nonMatchWriterFactories.length; j++) {
+                        nonMatchWriterFactories[j] = context.getNullWriterFactory();
+                    }
+                    opDesc = new OptimizedHybridHashJoinOperatorDescriptor(spec, getMemSizeInFrames(),
+                            maxInputBuildSizeInFrames, getFudgeFactor(), keysLeft, keysRight, hashFunFamilies,
+                            comparatorFactories, recDescriptor,
+                            new JoinMultiComparatorFactory(comparatorFactories, keysLeft, keysRight),
+                            new JoinMultiComparatorFactory(comparatorFactories, keysRight, keysLeft),
+                            predEvaluatorFactory, true, nonMatchWriterFactories);
+                    break;
+                default:
+                    throw new NotImplementedException();
+            }
+        } catch (HyracksDataException e) {
+            throw new AlgebricksException(e);
+        }
+        return opDesc;
+    }
+
     @Override
     protected List<ILocalStructuralProperty> deliveredLocalProperties(ILogicalOperator op, IOptimizationContext context)
             throws AlgebricksException {
-        List<ILocalStructuralProperty> deliveredLocalProperties = new ArrayList<ILocalStructuralProperty>();
+        List<ILocalStructuralProperty> deliveredLocalProperties = new ArrayList<>();
         // Inner join can kick off the "role reversal" optimization, which can kill data properties for the probe side.
-        if (kind == JoinKind.LEFT_OUTER) {
-            AbstractLogicalOperator probeOp = (AbstractLogicalOperator) op.getInputs().get(0).getValue();
-            IPhysicalPropertiesVector probeSideProperties = probeOp.getPhysicalOperator().getDeliveredProperties();
-            List<ILocalStructuralProperty> probeSideLocalProperties = probeSideProperties.getLocalProperties();
-            if (probeSideLocalProperties != null) {
-                // The local grouping property in the probe side will be maintained
-                // and the local ordering property in the probe side will be turned into a local grouping property
-                // if the grouping variables (or sort columns) in the local property contain all the join key variables
-                // for the left branch:
-                // 1. in case spilling is not kicked off, the ordering property is maintained and hence local grouping property is maintained.
-                // 2. if spilling is kicked off, the grouping property is still maintained though the ordering property is destroyed.
-                for (ILocalStructuralProperty property : probeSideLocalProperties) {
-                    Set<LogicalVariable> groupingVars = new ListSet<LogicalVariable>();
-                    Set<LogicalVariable> leftBranchVars = new ListSet<LogicalVariable>();
-                    property.getVariables(groupingVars);
-                    leftBranchVars.addAll(getKeysLeftBranch());
-                    if (groupingVars.containsAll(leftBranchVars)) {
-                        deliveredLocalProperties.add(new LocalGroupingProperty(groupingVars));
-                    }
+        if (kind != JoinKind.LEFT_OUTER) {
+            return deliveredLocalProperties;
+        }
+        AbstractLogicalOperator probeOp = (AbstractLogicalOperator) op.getInputs().get(0).getValue();
+        IPhysicalPropertiesVector probeSideProperties = probeOp.getPhysicalOperator().getDeliveredProperties();
+        List<ILocalStructuralProperty> probeSideLocalProperties = probeSideProperties.getLocalProperties();
+        if (probeSideLocalProperties != null) {
+            // The local grouping property in the probe side will be maintained
+            // and the local ordering property in the probe side will be turned into a local grouping property
+            // if the grouping variables (or sort columns) in the local property contain all the join key variables
+            // for the left branch:
+            // 1. in case spilling is not kicked off, the ordering property is maintained and hence local grouping
+            // property is maintained.
+            // 2. if spilling is kicked off, the grouping property is still maintained though the ordering property
+            // is destroyed.
+            for (ILocalStructuralProperty property : probeSideLocalProperties) {
+                Set<LogicalVariable> groupingVars = new ListSet<>();
+                Set<LogicalVariable> leftBranchVars = new ListSet<>();
+                property.getVariables(groupingVars);
+                leftBranchVars.addAll(getKeysLeftBranch());
+                if (groupingVars.containsAll(leftBranchVars)) {
+                    deliveredLocalProperties.add(new LocalGroupingProperty(groupingVars));
                 }
             }
         }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/InMemoryHashJoinPOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/InMemoryHashJoinPOperator.java
index a92bd70..49a087f 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/InMemoryHashJoinPOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/InMemoryHashJoinPOperator.java
@@ -40,7 +40,7 @@
 import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactoryProvider;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -108,7 +108,7 @@
                 break;
             }
             case LEFT_OUTER: {
-                INullWriterFactory[] nullWriterFactories = new INullWriterFactory[inputSchemas[1].getSize()];
+                IMissingWriterFactory[] nullWriterFactories = new IMissingWriterFactory[inputSchemas[1].getSize()];
                 for (int j = 0; j < nullWriterFactories.length; j++) {
                     nullWriterFactories[j] = context.getNullWriterFactory();
                 }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/NLJoinPOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/NLJoinPOperator.java
index 99acddb..c2b78a0 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/NLJoinPOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/NLJoinPOperator.java
@@ -44,7 +44,7 @@
 import org.apache.hyracks.api.comm.IFrameTupleAccessor;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.ITuplePairComparator;
 import org.apache.hyracks.api.dataflow.value.ITuplePairComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -145,7 +145,7 @@
                 break;
             }
             case LEFT_OUTER: {
-                INullWriterFactory[] nullWriterFactories = new INullWriterFactory[inputSchemas[1].getSize()];
+                IMissingWriterFactory[] nullWriterFactories = new IMissingWriterFactory[inputSchemas[1].getSize()];
                 for (int j = 0; j < nullWriterFactories.length; j++) {
                     nullWriterFactories[j] = context.getNullWriterFactory();
                 }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/SubplanPOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/SubplanPOperator.java
index 9fc0dd4..a67efd6 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/SubplanPOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/SubplanPOperator.java
@@ -40,7 +40,7 @@
 import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenHelper;
 import org.apache.hyracks.algebricks.runtime.base.AlgebricksPipeline;
 import org.apache.hyracks.algebricks.runtime.operators.meta.SubplanRuntimeFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 
 public class SubplanPOperator extends AbstractPhysicalOperator {
@@ -94,7 +94,7 @@
         AlgebricksPipeline np = subplans[0];
         RecordDescriptor inputRecordDesc = JobGenHelper.mkRecordDescriptor(
                 context.getTypeEnvironment(op.getInputs().get(0).getValue()), inputSchemas[0], context);
-        INullWriterFactory[] nullWriterFactories = new INullWriterFactory[np.getOutputWidth()];
+        IMissingWriterFactory[] nullWriterFactories = new IMissingWriterFactory[np.getOutputWidth()];
         for (int i = 0; i < nullWriterFactories.length; i++) {
             nullWriterFactories[i] = context.getNullWriterFactory();
         }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/TypePropagationPolicy.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/TypePropagationPolicy.java
index e011a7f..061b272 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/TypePropagationPolicy.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/TypePropagationPolicy.java
@@ -22,7 +22,7 @@
 
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.typing.ITypeEnvPointer;
 
@@ -30,7 +30,7 @@
     public static final TypePropagationPolicy ALL = new TypePropagationPolicy() {
 
         @Override
-        public Object getVarType(LogicalVariable var, INullableTypeComputer ntc,
+        public Object getVarType(LogicalVariable var, IMissableTypeComputer ntc,
                 List<LogicalVariable> nonNullVariableList, List<List<LogicalVariable>> correlatedNullableVariableLists,
                 ITypeEnvPointer... typeEnvs) throws AlgebricksException {
             for (ITypeEnvPointer p : typeEnvs) {
@@ -41,7 +41,7 @@
                 }
                 Object t = env.getVarType(var, nonNullVariableList, correlatedNullableVariableLists);
                 if (t != null) {
-                    if (ntc != null && ntc.canBeNull(t)) {
+                    if (ntc != null && ntc.canBeMissing(t)) {
                         for (List<LogicalVariable> list : correlatedNullableVariableLists) {
                             if (list.contains(var)) {
                                 for (LogicalVariable v : list) {
@@ -62,41 +62,46 @@
     public static final TypePropagationPolicy LEFT_OUTER = new TypePropagationPolicy() {
 
         @Override
-        public Object getVarType(LogicalVariable var, INullableTypeComputer ntc,
+        public Object getVarType(LogicalVariable var, IMissableTypeComputer ntc,
                 List<LogicalVariable> nonNullVariableList, List<List<LogicalVariable>> correlatedNullableVariableLists,
                 ITypeEnvPointer... typeEnvs) throws AlgebricksException {
             int n = typeEnvs.length;
             for (int i = 0; i < n; i++) {
                 Object t = typeEnvs[i].getTypeEnv().getVarType(var, nonNullVariableList,
                         correlatedNullableVariableLists);
-                if (t != null) {
-                    if (i == 0) { // outer branch
-                        return t;
-                    } else { // inner branch
-                        boolean nonNullVarIsProduced = false;
-                        for (LogicalVariable v : nonNullVariableList) {
-                            if (v == var) {
-                                nonNullVarIsProduced = true;
-                                break;
-                            }
-                            if (typeEnvs[i].getTypeEnv().getVarType(v) != null) {
-                                nonNullVarIsProduced = true;
-                                break;
-                            }
-                        }
-                        if (nonNullVarIsProduced) {
-                            return t;
-                        } else {
-                            return ntc.makeNullableType(t);
-                        }
+                if (t == null) {
+                    continue;
+                }
+                if (i == 0) { // outer branch
+                    return t;
+                }
+
+                // inner branch
+                boolean nonMissingVarIsProduced = false;
+                for (LogicalVariable v : nonNullVariableList) {
+                    boolean toBreak = false;
+                    if (v == var) {
+                        nonMissingVarIsProduced = true;
+                        toBreak = true;
+                    } else if (typeEnvs[i].getTypeEnv().getVarType(v) != null) {
+                        nonMissingVarIsProduced = true;
+                        toBreak = true;
                     }
+                    if (toBreak) {
+                        break;
+                    }
+                }
+                if (nonMissingVarIsProduced) {
+                    return t;
+                } else {
+                    return ntc.makeMissableType(t);
                 }
             }
             return null;
         }
     };
 
-    public abstract Object getVarType(LogicalVariable var, INullableTypeComputer ntc,
+    public abstract Object getVarType(LogicalVariable var, IMissableTypeComputer ntc,
             List<LogicalVariable> nonNullVariableList, List<List<LogicalVariable>> correlatedNullableVariableLists,
             ITypeEnvPointer... typeEnvs) throws AlgebricksException;
 }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/ITypingContext.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/ITypingContext.java
index 4d85111..7b77083 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/ITypingContext.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/ITypingContext.java
@@ -21,7 +21,7 @@
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 
@@ -32,7 +32,7 @@
 
     public IExpressionTypeComputer getExpressionTypeComputer();
 
-    public INullableTypeComputer getNullableTypeComputer();
+    public IMissableTypeComputer getMissableTypeComputer();
 
     public IMetadataProvider<?, ?> getMetadataProvider();
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/PropagatingTypeEnvironment.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/PropagatingTypeEnvironment.java
index 076992f..a1be35d 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/PropagatingTypeEnvironment.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/typing/PropagatingTypeEnvironment.java
@@ -24,7 +24,7 @@
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
 import org.apache.hyracks.algebricks.core.algebra.properties.TypePropagationPolicy;
 
@@ -32,7 +32,7 @@
 
     private final TypePropagationPolicy policy;
 
-    private final INullableTypeComputer nullableTypeComputer;
+    private final IMissableTypeComputer nullableTypeComputer;
 
     private final ITypeEnvPointer[] envPointers;
 
@@ -41,7 +41,7 @@
     private final List<List<LogicalVariable>> correlatedNullableVariableLists = new ArrayList<List<LogicalVariable>>();
 
     public PropagatingTypeEnvironment(IExpressionTypeComputer expressionTypeComputer,
-            INullableTypeComputer nullableTypeComputer, IMetadataProvider<?, ?> metadataProvider,
+            IMissableTypeComputer nullableTypeComputer, IMetadataProvider<?, ?> metadataProvider,
             TypePropagationPolicy policy, ITypeEnvPointer[] envPointers) {
         super(expressionTypeComputer, metadataProvider);
         this.nullableTypeComputer = nullableTypeComputer;
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorPropertiesUtil.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorPropertiesUtil.java
index e78db9b..353a782 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorPropertiesUtil.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorPropertiesUtil.java
@@ -210,7 +210,7 @@
         }
     }
 
-    public static boolean isNullTest(AbstractLogicalOperator op) {
+    public static boolean isMissingTest(AbstractLogicalOperator op) {
         if (op.getOperatorTag() != LogicalOperatorTag.SELECT) {
             return false;
         }
@@ -231,7 +231,7 @@
             return false;
         }
         AbstractFunctionCallExpression f2 = (AbstractFunctionCallExpression) a1;
-        if (!f2.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.IS_NULL)) {
+        if (!f2.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.IS_MISSING)) {
             return false;
         }
         return true;
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java
index 4b94dcf..caa46c8 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java
@@ -29,7 +29,6 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionEvalSizeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionRuntimeProvider;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IPartialAggregationTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
@@ -44,7 +43,7 @@
 import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
 import org.apache.hyracks.algebricks.data.ISerializerDeserializerProvider;
 import org.apache.hyracks.algebricks.data.ITypeTraitProvider;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactoryProvider;
 
 public class JobGenContext {
@@ -57,7 +56,7 @@
     private final IPrinterFactoryProvider printerFactoryProvider;
     private final ITypeTraitProvider typeTraitProvider;
     private final IMetadataProvider<?, ?> metadataProvider;
-    private final INullWriterFactory nullWriterFactory;
+    private final IMissingWriterFactory nonMatchWriterFactory;
     private final INormalizedKeyComputerFactoryProvider normalizedKeyComputerFactoryProvider;
     private final Object appContext;
     private final IBinaryBooleanInspectorFactory booleanInspectorFactory;
@@ -79,11 +78,10 @@
             IBinaryComparatorFactoryProvider comparatorFactoryProvider, ITypeTraitProvider typeTraitProvider,
             IBinaryBooleanInspectorFactory booleanInspectorFactory,
             IBinaryIntegerInspectorFactory integerInspectorFactory, IPrinterFactoryProvider printerFactoryProvider,
-            INullWriterFactory nullWriterFactory,
+            IMissingWriterFactory nullWriterFactory,
             INormalizedKeyComputerFactoryProvider normalizedKeyComputerFactoryProvider,
             IExpressionRuntimeProvider expressionRuntimeProvider, IExpressionTypeComputer expressionTypeComputer,
-            INullableTypeComputer nullableTypeComputer, ITypingContext typingContext,
-            IExpressionEvalSizeComputer expressionEvalSizeComputer,
+            ITypingContext typingContext, IExpressionEvalSizeComputer expressionEvalSizeComputer,
             IPartialAggregationTypeComputer partialAggregationTypeComputer,
             IPredicateEvaluatorFactoryProvider predEvaluatorFactoryProvider, int frameSize,
             AlgebricksAbsolutePartitionConstraint clusterLocations) {
@@ -100,7 +98,7 @@
         this.printerFactoryProvider = printerFactoryProvider;
         this.clusterLocations = clusterLocations;
         this.normalizedKeyComputerFactoryProvider = normalizedKeyComputerFactoryProvider;
-        this.nullWriterFactory = nullWriterFactory;
+        this.nonMatchWriterFactory = nullWriterFactory;
         this.expressionRuntimeProvider = expressionRuntimeProvider;
         this.expressionTypeComputer = expressionTypeComputer;
         this.typingContext = typingContext;
@@ -185,8 +183,8 @@
         return expressionTypeComputer.getType(expr, typingContext.getMetadataProvider(), env);
     }
 
-    public INullWriterFactory getNullWriterFactory() {
-        return nullWriterFactory;
+    public IMissingWriterFactory getNullWriterFactory() {
+        return nonMatchWriterFactory;
     }
 
     public INormalizedKeyComputerFactoryProvider getNormalizedKeyComputerFactoryProvider() {
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java
index 154f4a1..86f61ad 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java
@@ -33,7 +33,7 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionEvalSizeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IMergeAggregationExpressionFactory;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableEvalSizeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
 import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
@@ -79,13 +79,13 @@
 
     protected final Map<ILogicalOperator, ILogicalPropertiesVector> logicalProps = new HashMap<ILogicalOperator, ILogicalPropertiesVector>();
     private final IExpressionTypeComputer expressionTypeComputer;
-    private final INullableTypeComputer nullableTypeComputer;
+    private final IMissableTypeComputer nullableTypeComputer;
     private final INodeDomain defaultNodeDomain;
     private final LogicalOperatorPrettyPrintVisitor prettyPrintVisitor;
 
     public AlgebricksOptimizationContext(int varCounter, IExpressionEvalSizeComputer expressionEvalSizeComputer,
             IMergeAggregationExpressionFactory mergeAggregationExpressionFactory,
-            IExpressionTypeComputer expressionTypeComputer, INullableTypeComputer nullableTypeComputer,
+            IExpressionTypeComputer expressionTypeComputer, IMissableTypeComputer nullableTypeComputer,
             PhysicalOptimizationConfig physicalOptimizationConfig, AlgebricksPartitionConstraint clusterLocations) {
         this(varCounter, expressionEvalSizeComputer, mergeAggregationExpressionFactory, expressionTypeComputer,
                 nullableTypeComputer, physicalOptimizationConfig, clusterLocations,
@@ -94,7 +94,7 @@
 
     public AlgebricksOptimizationContext(int varCounter, IExpressionEvalSizeComputer expressionEvalSizeComputer,
             IMergeAggregationExpressionFactory mergeAggregationExpressionFactory,
-            IExpressionTypeComputer expressionTypeComputer, INullableTypeComputer nullableTypeComputer,
+            IExpressionTypeComputer expressionTypeComputer, IMissableTypeComputer nullableTypeComputer,
             PhysicalOptimizationConfig physicalOptimizationConfig, AlgebricksPartitionConstraint clusterLocations,
             LogicalOperatorPrettyPrintVisitor prettyPrintVisitor) {
         this.varCounter = varCounter;
@@ -281,7 +281,7 @@
     }
 
     @Override
-    public INullableTypeComputer getNullableTypeComputer() {
+    public IMissableTypeComputer getMissableTypeComputer() {
         return nullableTypeComputer;
     }
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/IOptimizationContextFactory.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/IOptimizationContextFactory.java
index ce77942..0e5cf9c 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/IOptimizationContextFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/IOptimizationContextFactory.java
@@ -23,12 +23,12 @@
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionEvalSizeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionTypeComputer;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IMergeAggregationExpressionFactory;
-import org.apache.hyracks.algebricks.core.algebra.expressions.INullableTypeComputer;
+import org.apache.hyracks.algebricks.core.algebra.expressions.IMissableTypeComputer;
 
 public interface IOptimizationContextFactory {
     public IOptimizationContext createOptimizationContext(int varCounter,
             IExpressionEvalSizeComputer expressionEvalSizeComputer,
             IMergeAggregationExpressionFactory mergeAggregationExpressionFactory,
-            IExpressionTypeComputer expressionTypeComputer, INullableTypeComputer nullableTypeComputer,
+            IExpressionTypeComputer expressionTypeComputer, IMissableTypeComputer missableTypeComputer,
             PhysicalOptimizationConfig physicalOptimizationConfig, AlgebricksPartitionConstraint clusterLocations);
 }
diff --git a/hyracks-fullstack/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/NoopNullWriterFactory.java b/hyracks-fullstack/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/NoopMissingWriterFactory.java
similarity index 63%
rename from hyracks-fullstack/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/NoopNullWriterFactory.java
rename to hyracks-fullstack/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/NoopMissingWriterFactory.java
index 841891a..5ca8d3b 100644
--- a/hyracks-fullstack/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/NoopNullWriterFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-data/src/main/java/org/apache/hyracks/algebricks/data/impl/NoopMissingWriterFactory.java
@@ -18,30 +18,25 @@
  */
 package org.apache.hyracks.algebricks.data.impl;
 
-import java.io.DataOutput;
-
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
-public class NoopNullWriterFactory implements INullWriterFactory {
+public class NoopMissingWriterFactory implements IMissingWriterFactory {
 
     private static final long serialVersionUID = 1L;
-    public static final NoopNullWriterFactory INSTANCE = new NoopNullWriterFactory();
+    public static final NoopMissingWriterFactory INSTANCE = new NoopMissingWriterFactory();
 
-    private NoopNullWriterFactory() {
+    private NoopMissingWriterFactory() {
     }
 
     @Override
-    public INullWriter createNullWriter() {
+    public IMissingWriter createMissingWriter() {
+        return out -> writeMissing();
+    }
 
-        return new INullWriter() {
-
-            @Override
-            public void writeNull(DataOutput out) throws HyracksDataException {
-                // do nothing
-            }
-        };
+    private static void writeMissing() throws HyracksDataException {
+        // do nothing
     }
 
 }
diff --git a/hyracks-fullstack/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/ConstantValue.java b/hyracks-fullstack/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/ConstantValue.java
index 278a585..90d5b83 100644
--- a/hyracks-fullstack/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/ConstantValue.java
+++ b/hyracks-fullstack/algebricks/algebricks-examples/piglet-example/src/main/java/org/apache/hyracks/algebricks/examples/piglet/compiler/ConstantValue.java
@@ -45,6 +45,11 @@
     }
 
     @Override
+    public boolean isMissing() {
+        return false;
+    }
+
+    @Override
     public boolean isNull() {
         return false;
     }
diff --git a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushSelectIntoJoinRule.java b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushSelectIntoJoinRule.java
index 3ebbea1..44c76e0 100644
--- a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushSelectIntoJoinRule.java
+++ b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushSelectIntoJoinRule.java
@@ -169,23 +169,23 @@
             for (int j = 0; j < intersectsBranch.length; j++) {
                 Mutable<ILogicalOperator> branch = branchIter.next();
                 boolean inter = intersectsBranch[j];
-                if (inter) {
-                    if (j > 0 && isLoj) {
-                        // if a left outer join, if the select condition is not-null filtering,
-                        // we rewrite left outer join
-                        // to inner join for this case.
-                        if (containsNotNullFiltering(selectCondition)) {
-                            lojToInner = true;
-                        }
-                    }
-                    if ((j > 0 && isLoj) && containsNullFiltering(selectCondition)) {
-                        // Select is-null($$var) cannot be pushed in the right branch of a LOJ;
-                        notPushedStack.addFirst(select);
-                    } else {
-                        // Conditions for the left branch can always be pushed.
-                        // Other conditions can be pushed to the right branch of a LOJ.
-                        copySelectToBranch(select, branch, context);
-                    }
+                if (!inter) {
+                    continue;
+                }
+
+                // if a left outer join, if the select condition is not-missing filtering,
+                // we rewrite left outer join
+                // to inner join for this case.
+                if (j > 0 && isLoj && containsNotMissingFiltering(selectCondition)) {
+                    lojToInner = true;
+                }
+                if ((j > 0 && isLoj) && containsMissingFiltering(selectCondition)) {
+                    // Select "is-not-missing($$var)" cannot be pushed in the right branch of a LOJ;
+                    notPushedStack.addFirst(select);
+                } else {
+                    // Conditions for the left branch can always be pushed.
+                    // Other conditions can be pushed to the right branch of a LOJ.
+                    copySelectToBranch(select, branch, context);
                 }
             }
             if (lojToInner) {
@@ -262,19 +262,19 @@
     }
 
     /**
-     * Whether the expression contains a not-null filtering
+     * Whether the expression contains a not-missing filtering
      *
      * @param expr
-     * @return true if the expression contains a not-null filtering function call; false otherwise.
+     * @return true if the expression contains a not-missing filtering function call; false otherwise.
      */
-    private boolean containsNotNullFiltering(ILogicalExpression expr) {
+    private boolean containsNotMissingFiltering(ILogicalExpression expr) {
         if (expr.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
             return false;
         }
         ScalarFunctionCallExpression func = (ScalarFunctionCallExpression) expr;
         if (func.getFunctionIdentifier() == AlgebricksBuiltinFunctions.AND) {
             for (Mutable<ILogicalExpression> argumentRef : func.getArguments()) {
-                if (containsNotNullFiltering(argumentRef.getValue())) {
+                if (containsNotMissingFiltering(argumentRef.getValue())) {
                     return true;
                 }
             }
@@ -288,32 +288,32 @@
             return false;
         }
         ScalarFunctionCallExpression func2 = (ScalarFunctionCallExpression) arg;
-        if (func2.getFunctionIdentifier() != AlgebricksBuiltinFunctions.IS_NULL) {
+        if (func2.getFunctionIdentifier() != AlgebricksBuiltinFunctions.IS_MISSING) {
             return false;
         }
         return true;
     }
 
     /**
-     * Whether the expression contains a null filtering
+     * Whether the expression contains a missing filtering
      *
      * @param expr
-     * @return true if the expression contains a null filtering function call; false otherwise.
+     * @return true if the expression contains a missing filtering function call; false otherwise.
      */
-    private boolean containsNullFiltering(ILogicalExpression expr) {
+    private boolean containsMissingFiltering(ILogicalExpression expr) {
         if (expr.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
             return false;
         }
         ScalarFunctionCallExpression func = (ScalarFunctionCallExpression) expr;
         if (func.getFunctionIdentifier() == AlgebricksBuiltinFunctions.AND) {
             for (Mutable<ILogicalExpression> argumentRef : func.getArguments()) {
-                if (containsNullFiltering(argumentRef.getValue())) {
+                if (containsMissingFiltering(argumentRef.getValue())) {
                     return true;
                 }
             }
             return false;
         }
-        if (func.getFunctionIdentifier() != AlgebricksBuiltinFunctions.IS_NULL) {
+        if (func.getFunctionIdentifier() != AlgebricksBuiltinFunctions.IS_MISSING) {
             return false;
         }
         return true;
diff --git a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceGroupByForSubplanRule.java b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceGroupByForSubplanRule.java
index 3e65d91..836f266 100644
--- a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceGroupByForSubplanRule.java
+++ b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceGroupByForSubplanRule.java
@@ -243,7 +243,7 @@
             context.computeAndSetTypeEnvironmentForOperator(tmpAsgn);
         }
 
-        IFunctionInfo finfoEq = context.getMetadataProvider().lookupFunction(AlgebricksBuiltinFunctions.IS_NULL);
+        IFunctionInfo finfoEq = context.getMetadataProvider().lookupFunction(AlgebricksBuiltinFunctions.IS_MISSING);
         ILogicalExpression isNullTest = new ScalarFunctionCallExpression(finfoEq,
                 new MutableObject<ILogicalExpression>(new VariableReferenceExpression(testForNull)));
         IFunctionInfo finfoNot = context.getMetadataProvider().lookupFunction(AlgebricksBuiltinFunctions.NOT);
diff --git a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceLeftOuterJoinForSubplanRule.java b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceLeftOuterJoinForSubplanRule.java
index 93af981..f809e96 100644
--- a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceLeftOuterJoinForSubplanRule.java
+++ b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/IntroduceLeftOuterJoinForSubplanRule.java
@@ -65,7 +65,7 @@
         AbstractLogicalOperator op1 = (AbstractLogicalOperator) subplanRoot.getValue();
         Mutable<ILogicalOperator> opUnder = subplan.getInputs().get(0);
 
-        if (OperatorPropertiesUtil.isNullTest((AbstractLogicalOperator) opUnder.getValue())) {
+        if (OperatorPropertiesUtil.isMissingTest((AbstractLogicalOperator) opUnder.getValue())) {
             return false;
         }
 
diff --git a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/SubplanOutOfGroupRule.java b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/SubplanOutOfGroupRule.java
index 0aba194..049e853 100644
--- a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/SubplanOutOfGroupRule.java
+++ b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/subplan/SubplanOutOfGroupRule.java
@@ -82,7 +82,7 @@
             if (op1.getOperatorTag() == LogicalOperatorTag.SUBPLAN) {
                 SubplanOperator subplan = (SubplanOperator) op1;
                 AbstractLogicalOperator op2 = (AbstractLogicalOperator) subplan.getInputs().get(0).getValue();
-                if (OperatorPropertiesUtil.isNullTest(op2)) {
+                if (OperatorPropertiesUtil.isMissingTest(op2)) {
                     if (subplan.getNestedPlans().size() == 1) {
                         ILogicalPlan p1 = subplan.getNestedPlans().get(0);
                         if (p1.getRoots().size() == 1) {
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
index ac9bae2..9a9fb72 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/SubplanRuntimeFactory.java
@@ -31,8 +31,8 @@
 import org.apache.hyracks.algebricks.runtime.operators.std.NestedTupleSourceRuntimeFactory.NestedTupleSourceRuntime;
 import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -44,13 +44,13 @@
 
     private final AlgebricksPipeline pipeline;
     private final RecordDescriptor inputRecordDesc;
-    private final INullWriterFactory[] nullWriterFactories;
+    private final IMissingWriterFactory[] missingWriterFactories;
 
-    public SubplanRuntimeFactory(AlgebricksPipeline pipeline, INullWriterFactory[] nullWriterFactories,
+    public SubplanRuntimeFactory(AlgebricksPipeline pipeline, IMissingWriterFactory[] missingWriterFactories,
             RecordDescriptor inputRecordDesc, int[] projectionList) {
         super(projectionList);
         this.pipeline = pipeline;
-        this.nullWriterFactories = nullWriterFactories;
+        this.missingWriterFactories = missingWriterFactories;
         this.inputRecordDesc = inputRecordDesc;
         if (projectionList != null) {
             throw new NotImplementedException();
@@ -76,9 +76,9 @@
 
         final PipelineAssembler pa = new PipelineAssembler(pipeline, 1, 1, inputRecordDesc,
                 pipelineOutputRecordDescriptor);
-        final INullWriter[] nullWriters = new INullWriter[nullWriterFactories.length];
-        for (int i = 0; i < nullWriterFactories.length; i++) {
-            nullWriters[i] = nullWriterFactories[i].createNullWriter();
+        final IMissingWriter[] nullWriters = new IMissingWriter[missingWriterFactories.length];
+        for (int i = 0; i < missingWriterFactories.length; i++) {
+            nullWriters[i] = missingWriterFactories[i].createMissingWriter();
         }
 
         return new AbstractOneInputOneOutputOneFramePushRuntime() {
@@ -132,7 +132,7 @@
                     }
                     DataOutput dos = tb.getDataOutput();
                     for (int i = 0; i < nullWriters.length; i++) {
-                        nullWriters[i].writeNull(dos);
+                        nullWriters[i].writeMissing(dos);
                         tb.addFieldEndOffset();
                     }
                 }
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
index 5eb4604..1bc5d51 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamSelectRuntimeFactory.java
@@ -30,8 +30,8 @@
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime;
 import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputRuntimeFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.api.IPointable;
 import org.apache.hyracks.data.std.primitive.VoidPointable;
@@ -45,30 +45,30 @@
 
     private final IBinaryBooleanInspectorFactory binaryBooleanInspectorFactory;
 
-    private final boolean retainNull;
+    private final boolean retainMissing;
 
-    private final int nullPlaceholderVariableIndex;
+    private final int missingPlaceholderVariableIndex;
 
-    private final INullWriterFactory nullWriterFactory;
+    private final IMissingWriterFactory missingWriterFactory;
 
     /**
      * @param cond
      * @param projectionList
      *            if projectionList is null, then no projection is performed
-     * @param retainNull
-     * @param nullPlaceholderVariableIndex
-     * @param nullWriterFactory
+     * @param retainMissing
+     * @param missingPlaceholderVariableIndex
+     * @param missingWriterFactory
      * @throws HyracksDataException
      */
     public StreamSelectRuntimeFactory(IScalarEvaluatorFactory cond, int[] projectionList,
-            IBinaryBooleanInspectorFactory binaryBooleanInspectorFactory, boolean retainNull,
-            int nullPlaceholderVariableIndex, INullWriterFactory nullWriterFactory) {
+            IBinaryBooleanInspectorFactory binaryBooleanInspectorFactory, boolean retainMissing,
+            int missingPlaceholderVariableIndex, IMissingWriterFactory missingWriterFactory) {
         super(projectionList);
         this.cond = cond;
         this.binaryBooleanInspectorFactory = binaryBooleanInspectorFactory;
-        this.retainNull = retainNull;
-        this.nullPlaceholderVariableIndex = nullPlaceholderVariableIndex;
-        this.nullWriterFactory = nullWriterFactory;
+        this.retainMissing = retainMissing;
+        this.missingPlaceholderVariableIndex = missingPlaceholderVariableIndex;
+        this.missingWriterFactory = missingWriterFactory;
     }
 
     @Override
@@ -82,8 +82,8 @@
         return new AbstractOneInputOneOutputOneFieldFramePushRuntime() {
             private IPointable p = VoidPointable.FACTORY.createPointable();
             private IScalarEvaluator eval;
-            private INullWriter nullWriter = null;
-            private ArrayTupleBuilder nullTupleBuilder = null;
+            private IMissingWriter missingWriter = null;
+            private ArrayTupleBuilder missingTupleBuilder = null;
             private boolean isOpen = false;
 
             @Override
@@ -100,12 +100,12 @@
                 writer.open();
 
                 //prepare nullTupleBuilder
-                if (retainNull && nullWriter == null) {
-                    nullWriter = nullWriterFactory.createNullWriter();
-                    nullTupleBuilder = new ArrayTupleBuilder(1);
-                    DataOutput out = nullTupleBuilder.getDataOutput();
-                    nullWriter.writeNull(out);
-                    nullTupleBuilder.addFieldEndOffset();
+                if (retainMissing && missingWriter == null) {
+                    missingWriter = missingWriterFactory.createMissingWriter();
+                    missingTupleBuilder = new ArrayTupleBuilder(1);
+                    DataOutput out = missingTupleBuilder.getDataOutput();
+                    missingWriter.writeMissing(out);
+                    missingTupleBuilder.addFieldEndOffset();
                 }
             }
 
@@ -145,10 +145,10 @@
                             appendTupleToFrame(t);
                         }
                     } else {
-                        if (retainNull) {
+                        if (retainMissing) {
                             for (int i = 0; i < tRef.getFieldCount(); i++) {
-                                if (i == nullPlaceholderVariableIndex) {
-                                    appendField(nullTupleBuilder.getByteArray(), 0, nullTupleBuilder.getSize());
+                                if (i == missingPlaceholderVariableIndex) {
+                                    appendField(missingTupleBuilder.getByteArray(), 0, missingTupleBuilder.getSize());
                                 } else {
                                     appendField(tAccess, t, i);
                                 }
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java b/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java
index 0dc1961..4dafd0e 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java
@@ -33,7 +33,7 @@
 import org.apache.hyracks.algebricks.data.impl.BinaryBooleanInspectorImpl;
 import org.apache.hyracks.algebricks.data.impl.BinaryIntegerInspectorImpl;
 import org.apache.hyracks.algebricks.data.impl.IntegerPrinterFactory;
-import org.apache.hyracks.algebricks.data.impl.NoopNullWriterFactory;
+import org.apache.hyracks.algebricks.data.impl.NoopMissingWriterFactory;
 import org.apache.hyracks.algebricks.data.impl.UTF8StringPrinterFactory;
 import org.apache.hyracks.algebricks.runtime.aggregators.TupleCountAggregateFunctionFactory;
 import org.apache.hyracks.algebricks.runtime.aggregators.TupleCountRunningAggregateFunctionFactory;
@@ -66,7 +66,7 @@
 import org.apache.hyracks.api.constraints.PartitionConstraintHelper;
 import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.io.FileReference;
@@ -701,7 +701,7 @@
                 new RecordDescriptor[] { assign1Desc, assign2Desc, project1Desc });
 
         SubplanRuntimeFactory subplan = new SubplanRuntimeFactory(pipeline,
-                new INullWriterFactory[] { NoopNullWriterFactory.INSTANCE }, assign1Desc, null);
+                new IMissingWriterFactory[] { NoopMissingWriterFactory.INSTANCE }, assign1Desc, null);
 
         RecordDescriptor subplanDesc = new RecordDescriptor(new ISerializerDeserializer[] {
                 IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE });
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/BinaryComparatorConstant.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/BinaryComparatorConstant.java
deleted file mode 100644
index de0e3ee..0000000
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/BinaryComparatorConstant.java
+++ /dev/null
@@ -1,34 +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.hyracks.api.dataflow.value;
-
-public final class BinaryComparatorConstant {
-
-    // Result code for isComparable()
-    // TRUE: can be comparable
-    // FALSE: can not be comparable
-    // UNKNOWN: can not be decided whether two arguments are comparable or not - usually NULL
-
-    public static enum ComparableResultCode {
-        TRUE,
-        FALSE,
-        UNKNOWN
-    }
-
-}
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/INullWriter.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/IMissingWriter.java
similarity index 87%
rename from hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/INullWriter.java
rename to hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/IMissingWriter.java
index 9105146..1309233 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/INullWriter.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/IMissingWriter.java
@@ -22,6 +22,7 @@
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
-public interface INullWriter {
-    public void writeNull(DataOutput out) throws HyracksDataException;
+@FunctionalInterface
+public interface IMissingWriter {
+    public void writeMissing(DataOutput out) throws HyracksDataException;
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/INullWriterFactory.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/IMissingWriterFactory.java
similarity index 87%
rename from hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/INullWriterFactory.java
rename to hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/IMissingWriterFactory.java
index 9cd46e5..bf15489 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/INullWriterFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/value/IMissingWriterFactory.java
@@ -20,6 +20,7 @@
 
 import java.io.Serializable;
 
-public interface INullWriterFactory extends Serializable {
-    public INullWriter createNullWriter();
+@FunctionalInterface
+public interface IMissingWriterFactory extends Serializable {
+    public IMissingWriter createMissingWriter();
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorDescriptor.java
index 4e4256e..2f7b1c2 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorDescriptor.java
@@ -25,7 +25,7 @@
 import org.apache.hyracks.api.dataflow.TaskId;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
@@ -50,7 +50,7 @@
     private final IBinaryComparatorFactory[] comparatorFactories;
     private final IPredicateEvaluatorFactory predEvaluatorFactory;
     private final boolean isLeftOuter;
-    private final INullWriterFactory[] nullWriterFactories1;
+    private final IMissingWriterFactory[] nullWriterFactories1;
 
     public GraceHashJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int memsize, int inputsize0,
             int recordsPerFrame, double factor, int[] keys0, int[] keys1,
@@ -74,7 +74,8 @@
     public GraceHashJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int memsize, int inputsize0,
             int recordsPerFrame, double factor, int[] keys0, int[] keys1,
             IBinaryHashFunctionFactory[] hashFunctionFactories, IBinaryComparatorFactory[] comparatorFactories,
-            RecordDescriptor recordDescriptor, boolean isLeftOuter, INullWriterFactory[] nullWriterFactories1, IPredicateEvaluatorFactory predEvalFactory) {
+            RecordDescriptor recordDescriptor, boolean isLeftOuter, IMissingWriterFactory[] nullWriterFactories1,
+            IPredicateEvaluatorFactory predEvalFactory) {
         super(spec, 2, 1);
         this.memsize = memsize;
         this.inputsize0 = inputsize0;
@@ -117,9 +118,9 @@
 
     private class HashPartitionActivityNode extends AbstractActivityNode {
         private static final long serialVersionUID = 1L;
-        private int keys[];
+        private int[] keys;
 
-        public HashPartitionActivityNode(ActivityId id, int keys[]) {
+        public HashPartitionActivityNode(ActivityId id, int[] keys) {
             super(id);
             this.keys = keys;
         }
@@ -128,8 +129,9 @@
         public IOperatorNodePushable createPushRuntime(IHyracksTaskContext ctx,
                 IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions) {
             return new GraceHashJoinPartitionBuildOperatorNodePushable(ctx, new TaskId(getActivityId(), partition),
-                    keys, hashFunctionFactories, comparatorFactories, (int) Math.ceil(Math.sqrt(inputsize0 * factor
-                            / nPartitions)), recordDescProvider.getInputRecordDescriptor(getActivityId(), 0));
+                    keys, hashFunctionFactories, comparatorFactories,
+                    (int) Math.ceil(Math.sqrt(inputsize0 * factor / nPartitions)),
+                    recordDescProvider.getInputRecordDescriptor(getActivityId(), 0));
         }
     }
 
@@ -152,13 +154,14 @@
             final RecordDescriptor rd0 = recordDescProvider.getInputRecordDescriptor(rpartAid, 0);
             final RecordDescriptor rd1 = recordDescProvider.getInputRecordDescriptor(spartAid, 0);
             int numPartitions = (int) Math.ceil(Math.sqrt(inputsize0 * factor / nPartitions));
-            final IPredicateEvaluator predEvaluator = ( predEvaluatorFactory == null ? null : predEvaluatorFactory.createPredicateEvaluator() );
+            final IPredicateEvaluator predEvaluator = predEvaluatorFactory == null ? null
+                    : predEvaluatorFactory.createPredicateEvaluator();
 
-            return new GraceHashJoinOperatorNodePushable(ctx, new TaskId(new ActivityId(getOperatorId(),
-                    RPARTITION_ACTIVITY_ID), partition), new TaskId(new ActivityId(getOperatorId(),
-                    SPARTITION_ACTIVITY_ID), partition), recordsPerFrame, factor, keys0, keys1, hashFunctionFactories,
-                    comparatorFactories, nullWriterFactories1, rd1, rd0, recordDescriptors[0], numPartitions,
-                    predEvaluator, isLeftOuter);
+            return new GraceHashJoinOperatorNodePushable(ctx,
+                    new TaskId(new ActivityId(getOperatorId(), RPARTITION_ACTIVITY_ID), partition),
+                    new TaskId(new ActivityId(getOperatorId(), SPARTITION_ACTIVITY_ID), partition), recordsPerFrame,
+                    factor, keys0, keys1, hashFunctionFactories, comparatorFactories, nullWriterFactories1, rd1, rd0,
+                    recordDescriptors[0], numPartitions, predEvaluator, isLeftOuter);
         }
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorNodePushable.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorNodePushable.java
index 69e9e6a..2de8e6c 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorNodePushable.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/GraceHashJoinOperatorNodePushable.java
@@ -26,8 +26,8 @@
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.ITuplePartitionComputer;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -51,7 +51,7 @@
     private final int[] keys1;
     private final IBinaryHashFunctionFactory[] hashFunctionFactories;
     private final IBinaryComparatorFactory[] comparatorFactories;
-    private final INullWriterFactory[] nullWriterFactories;
+    private final IMissingWriterFactory[] nonMatchWriterFactories;
     private final RecordDescriptor rd0;
     private final RecordDescriptor rd1;
     private final int recordsPerFrame;
@@ -62,7 +62,7 @@
 
     GraceHashJoinOperatorNodePushable(IHyracksTaskContext ctx, Object state0Id, Object state1Id, int recordsPerFrame,
             double factor, int[] keys0, int[] keys1, IBinaryHashFunctionFactory[] hashFunctionFactories,
-            IBinaryComparatorFactory[] comparatorFactories, INullWriterFactory[] nullWriterFactories,
+            IBinaryComparatorFactory[] comparatorFactories, IMissingWriterFactory[] nullWriterFactories,
             RecordDescriptor rd1, RecordDescriptor rd0, RecordDescriptor outRecordDescriptor, int numPartitions,
             IPredicateEvaluator predEval, boolean isLeftOuter) {
         this.ctx = ctx;
@@ -72,7 +72,7 @@
         this.keys1 = keys1;
         this.hashFunctionFactories = hashFunctionFactories;
         this.comparatorFactories = comparatorFactories;
-        this.nullWriterFactories = nullWriterFactories;
+        this.nonMatchWriterFactories = nullWriterFactories;
         this.rd0 = rd0;
         this.rd1 = rd1;
         this.numPartitions = numPartitions;
@@ -98,10 +98,10 @@
         ITuplePartitionComputer hpcRep1 = new RepartitionComputerFactory(numPartitions,
                 new FieldHashPartitionComputerFactory(keys1, hashFunctionFactories)).createPartitioner();
 
-        final INullWriter[] nullWriters1 = isLeftOuter ? new INullWriter[nullWriterFactories.length] : null;
+        final IMissingWriter[] nullWriters1 = isLeftOuter ? new IMissingWriter[nonMatchWriterFactories.length] : null;
         if (isLeftOuter) {
-            for (int i = 0; i < nullWriterFactories.length; i++) {
-                nullWriters1[i] = nullWriterFactories[i].createNullWriter();
+            for (int i = 0; i < nonMatchWriterFactories.length; i++) {
+                nullWriters1[i] = nonMatchWriterFactories[i].createMissingWriter();
             }
         }
         try {
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/HybridHashJoinOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/HybridHashJoinOperatorDescriptor.java
index d0a81ee..4354367 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/HybridHashJoinOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/HybridHashJoinOperatorDescriptor.java
@@ -33,8 +33,8 @@
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
@@ -47,7 +47,6 @@
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
 import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
-import org.apache.hyracks.dataflow.std.util.FrameTuplePairComparator;
 import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
 import org.apache.hyracks.dataflow.common.data.partition.FieldHashPartitionComputerFactory;
 import org.apache.hyracks.dataflow.common.data.partition.RepartitionComputerFactory;
@@ -60,6 +59,7 @@
 import org.apache.hyracks.dataflow.std.base.AbstractUnaryInputUnaryOutputOperatorNodePushable;
 import org.apache.hyracks.dataflow.std.structures.ISerializableTable;
 import org.apache.hyracks.dataflow.std.structures.SerializableHashTable;
+import org.apache.hyracks.dataflow.std.util.FrameTuplePairComparator;
 
 public class HybridHashJoinOperatorDescriptor extends AbstractOperatorDescriptor {
     private static final int BUILD_AND_PARTITION_ACTIVITY_ID = 0;
@@ -76,7 +76,7 @@
     private final IBinaryComparatorFactory[] comparatorFactories;
     private final IPredicateEvaluatorFactory predEvaluatorFactory;
     private final boolean isLeftOuter;
-    private final INullWriterFactory[] nullWriterFactories1;
+    private final IMissingWriterFactory[] nonMatchWriterFactories1;
 
     /**
      * @param spec
@@ -97,7 +97,7 @@
             int recordsPerFrame, double factor, int[] keys0, int[] keys1,
             IBinaryHashFunctionFactory[] hashFunctionFactories, IBinaryComparatorFactory[] comparatorFactories,
             RecordDescriptor recordDescriptor, IPredicateEvaluatorFactory predEvalFactory, boolean isLeftOuter,
-            INullWriterFactory[] nullWriterFactories1) throws HyracksDataException {
+            IMissingWriterFactory[] nullWriterFactories1) throws HyracksDataException {
         super(spec, 2, 1);
         this.memsize = memsize;
         this.inputsize0 = inputsize0;
@@ -109,7 +109,7 @@
         this.comparatorFactories = comparatorFactories;
         this.predEvaluatorFactory = predEvalFactory;
         this.isLeftOuter = isLeftOuter;
-        this.nullWriterFactories1 = nullWriterFactories1;
+        this.nonMatchWriterFactories1 = nullWriterFactories1;
         recordDescriptors[0] = recordDescriptor;
     }
 
@@ -169,17 +169,18 @@
         @Override
         public IOperatorNodePushable createPushRuntime(final IHyracksTaskContext ctx,
                 IRecordDescriptorProvider recordDescProvider, final int partition, final int nPartitions)
-                        throws HyracksDataException {
+                throws HyracksDataException {
             final RecordDescriptor rd0 = recordDescProvider.getInputRecordDescriptor(joinAid, 0);
             final RecordDescriptor rd1 = recordDescProvider.getInputRecordDescriptor(getActivityId(), 0);
             final IBinaryComparator[] comparators = new IBinaryComparator[comparatorFactories.length];
             for (int i = 0; i < comparatorFactories.length; ++i) {
                 comparators[i] = comparatorFactories[i].createBinaryComparator();
             }
-            final INullWriter[] nullWriters1 = isLeftOuter ? new INullWriter[nullWriterFactories1.length] : null;
+            final IMissingWriter[] nullWriters1 = isLeftOuter ? new IMissingWriter[nonMatchWriterFactories1.length]
+                    : null;
             if (isLeftOuter) {
-                for (int i = 0; i < nullWriterFactories1.length; i++) {
-                    nullWriters1[i] = nullWriterFactories1[i].createNullWriter();
+                for (int i = 0; i < nonMatchWriterFactories1.length; i++) {
+                    nullWriters1[i] = nonMatchWriterFactories1[i].createMissingWriter();
                 }
             }
             final IPredicateEvaluator predEvaluator = (predEvaluatorFactory == null ? null
@@ -198,8 +199,9 @@
 
                 @Override
                 public void close() throws HyracksDataException {
-                    if (state.memoryForHashtable != 0)
+                    if (state.memoryForHashtable != 0) {
                         build(inBuffer.getBuffer());
+                    }
 
                     for (int i = 0; i < state.nPartitions; i++) {
                         ByteBuffer buf = bufferForPartitions[i].getBuffer();
@@ -359,17 +361,18 @@
         @Override
         public IOperatorNodePushable createPushRuntime(final IHyracksTaskContext ctx,
                 IRecordDescriptorProvider recordDescProvider, final int partition, final int nPartitions)
-                        throws HyracksDataException {
+                throws HyracksDataException {
             final RecordDescriptor rd0 = recordDescProvider.getInputRecordDescriptor(getActivityId(), 0);
             final RecordDescriptor rd1 = recordDescProvider.getInputRecordDescriptor(buildAid, 0);
             final IBinaryComparator[] comparators = new IBinaryComparator[comparatorFactories.length];
             for (int i = 0; i < comparatorFactories.length; ++i) {
                 comparators[i] = comparatorFactories[i].createBinaryComparator();
             }
-            final INullWriter[] nullWriters1 = isLeftOuter ? new INullWriter[nullWriterFactories1.length] : null;
+            final IMissingWriter[] nullWriters1 = isLeftOuter ? new IMissingWriter[nonMatchWriterFactories1.length]
+                    : null;
             if (isLeftOuter) {
-                for (int i = 0; i < nullWriterFactories1.length; i++) {
-                    nullWriters1[i] = nullWriterFactories1[i].createNullWriter();
+                for (int i = 0; i < nonMatchWriterFactories1.length; i++) {
+                    nullWriters1[i] = nonMatchWriterFactories1[i].createMissingWriter();
                 }
             }
             final IPredicateEvaluator predEvaluator = (predEvaluatorFactory == null ? null
@@ -436,8 +439,9 @@
                                         if (!ftap.append(accessorProbe, i)) {
                                             state.joiner.join(inBuffer.getBuffer(), writer);
                                             ftap.reset(inBuffer, true);
-                                        } else
+                                        } else {
                                             break;
+                                        }
                                     }
 
                                 } else {
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoin.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoin.java
index fee7dd8..486821b 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoin.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoin.java
@@ -28,7 +28,7 @@
 import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.comm.VSizeFrame;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.ITuplePartitionComputer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -51,7 +51,7 @@
     private final FrameTupleAppender appender;
     private final FrameTuplePairComparator tpComparator;
     private final boolean isLeftOuter;
-    private final ArrayTupleBuilder nullTupleBuild;
+    private final ArrayTupleBuilder missingTupleBuild;
     private final ISerializableTable table;
     private final int tableSize;
     private final TuplePointer storedTuplePointer;
@@ -62,16 +62,16 @@
 
     public InMemoryHashJoin(IHyracksTaskContext ctx, int tableSize, FrameTupleAccessor accessorProbe,
             ITuplePartitionComputer tpcProbe, FrameTupleAccessor accessorBuild, ITuplePartitionComputer tpcBuild,
-            FrameTuplePairComparator comparator, boolean isLeftOuter, INullWriter[] nullWritersBuild,
+            FrameTuplePairComparator comparator, boolean isLeftOuter, IMissingWriter[] missingWritersBuild,
             ISerializableTable table, IPredicateEvaluator predEval) throws HyracksDataException {
         this(ctx, tableSize, accessorProbe, tpcProbe, accessorBuild, tpcBuild, comparator, isLeftOuter,
-                nullWritersBuild, table, predEval,
+                missingWritersBuild, table, predEval,
                 false);
     }
 
     public InMemoryHashJoin(IHyracksTaskContext ctx, int tableSize, FrameTupleAccessor accessorProbe,
             ITuplePartitionComputer tpcProbe, FrameTupleAccessor accessorBuild, ITuplePartitionComputer tpcBuild,
-            FrameTuplePairComparator comparator, boolean isLeftOuter, INullWriter[] nullWritersBuild,
+            FrameTuplePairComparator comparator, boolean isLeftOuter, IMissingWriter[] missingWritersBuild,
             ISerializableTable table, IPredicateEvaluator predEval, boolean reverse) throws HyracksDataException {
         this.ctx = ctx;
         this.tableSize = tableSize;
@@ -88,14 +88,14 @@
         this.isLeftOuter = isLeftOuter;
         if (isLeftOuter) {
             int fieldCountOuter = accessorBuild.getFieldCount();
-            nullTupleBuild = new ArrayTupleBuilder(fieldCountOuter);
-            DataOutput out = nullTupleBuild.getDataOutput();
+            missingTupleBuild = new ArrayTupleBuilder(fieldCountOuter);
+            DataOutput out = missingTupleBuild.getDataOutput();
             for (int i = 0; i < fieldCountOuter; i++) {
-                nullWritersBuild[i].writeNull(out);
-                nullTupleBuild.addFieldEndOffset();
+                missingWritersBuild[i].writeMissing(out);
+                missingTupleBuild.addFieldEndOffset();
             }
         } else {
-            nullTupleBuild = null;
+            missingTupleBuild = null;
         }
         reverseOutputOrder = reverse;
         LOGGER.fine("InMemoryHashJoin has been created for a table size of " + tableSize + " for Thread ID "
@@ -140,8 +140,8 @@
         }
         if (!matchFound && isLeftOuter) {
             FrameUtils.appendConcatToWriter(writer, appender, accessorProbe, tid,
-                    nullTupleBuild.getFieldEndOffsets(), nullTupleBuild.getByteArray(), 0,
-                    nullTupleBuild.getSize());
+                    missingTupleBuild.getFieldEndOffsets(), missingTupleBuild.getByteArray(), 0,
+                    missingTupleBuild.getSize());
         }
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java
index be8d319f..0d6d163 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/InMemoryHashJoinOperatorDescriptor.java
@@ -31,8 +31,8 @@
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
@@ -42,7 +42,6 @@
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
-import org.apache.hyracks.dataflow.std.util.FrameTuplePairComparator;
 import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
 import org.apache.hyracks.dataflow.common.data.partition.FieldHashPartitionComputerFactory;
 import org.apache.hyracks.dataflow.std.base.AbstractActivityNode;
@@ -52,6 +51,7 @@
 import org.apache.hyracks.dataflow.std.base.AbstractUnaryInputUnaryOutputOperatorNodePushable;
 import org.apache.hyracks.dataflow.std.structures.ISerializableTable;
 import org.apache.hyracks.dataflow.std.structures.SerializableHashTable;
+import org.apache.hyracks.dataflow.std.util.FrameTuplePairComparator;
 
 public class InMemoryHashJoinOperatorDescriptor extends AbstractOperatorDescriptor {
     private static final long serialVersionUID = 1L;
@@ -61,7 +61,7 @@
     private final IBinaryComparatorFactory[] comparatorFactories;
     private final IPredicateEvaluatorFactory predEvaluatorFactory;
     private final boolean isLeftOuter;
-    private final INullWriterFactory[] nullWriterFactories1;
+    private final IMissingWriterFactory[] nonMatchWriterFactories;
     private final int tableSize;
 
     public InMemoryHashJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int[] keys0, int[] keys1,
@@ -75,14 +75,14 @@
         this.predEvaluatorFactory = predEvalFactory;
         recordDescriptors[0] = recordDescriptor;
         this.isLeftOuter = false;
-        this.nullWriterFactories1 = null;
+        this.nonMatchWriterFactories = null;
         this.tableSize = tableSize;
     }
 
     public InMemoryHashJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int[] keys0, int[] keys1,
             IBinaryHashFunctionFactory[] hashFunctionFactories, IBinaryComparatorFactory[] comparatorFactories,
             IPredicateEvaluatorFactory predEvalFactory, RecordDescriptor recordDescriptor, boolean isLeftOuter,
-            INullWriterFactory[] nullWriterFactories1, int tableSize) {
+            IMissingWriterFactory[] missingWriterFactories1, int tableSize) {
         super(spec, 2, 1);
         this.keys0 = keys0;
         this.keys1 = keys1;
@@ -91,7 +91,7 @@
         this.predEvaluatorFactory = predEvalFactory;
         recordDescriptors[0] = recordDescriptor;
         this.isLeftOuter = isLeftOuter;
-        this.nullWriterFactories1 = nullWriterFactories1;
+        this.nonMatchWriterFactories = missingWriterFactories1;
         this.tableSize = tableSize;
     }
 
@@ -103,7 +103,7 @@
 
     public InMemoryHashJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int[] keys0, int[] keys1,
             IBinaryHashFunctionFactory[] hashFunctionFactories, IBinaryComparatorFactory[] comparatorFactories,
-            RecordDescriptor recordDescriptor, boolean isLeftOuter, INullWriterFactory[] nullWriterFactories1,
+            RecordDescriptor recordDescriptor, boolean isLeftOuter, IMissingWriterFactory[] nullWriterFactories1,
             int tableSize) {
         this(spec, keys0, keys1, hashFunctionFactories, comparatorFactories, null, recordDescriptor, isLeftOuter,
                 nullWriterFactories1, tableSize);
@@ -167,10 +167,11 @@
             for (int i = 0; i < comparatorFactories.length; ++i) {
                 comparators[i] = comparatorFactories[i].createBinaryComparator();
             }
-            final INullWriter[] nullWriters1 = isLeftOuter ? new INullWriter[nullWriterFactories1.length] : null;
+            final IMissingWriter[] nullWriters1 = isLeftOuter ? new IMissingWriter[nonMatchWriterFactories.length]
+                    : null;
             if (isLeftOuter) {
-                for (int i = 0; i < nullWriterFactories1.length; i++) {
-                    nullWriters1[i] = nullWriterFactories1[i].createNullWriter();
+                for (int i = 0; i < nonMatchWriterFactories.length; i++) {
+                    nullWriters1[i] = nonMatchWriterFactories[i].createMissingWriter();
                 }
             }
             final IPredicateEvaluator predEvaluator = (predEvaluatorFactory == null ? null
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoin.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoin.java
index 2ad89cf..202aac6 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoin.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoin.java
@@ -25,7 +25,7 @@
 import org.apache.hyracks.api.comm.IFrameWriter;
 import org.apache.hyracks.api.comm.VSizeFrame;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.ITuplePairComparator;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -53,14 +53,14 @@
     private RunFileReader runFileReader;
     private final RunFileWriter runFileWriter;
     private final boolean isLeftOuter;
-    private final ArrayTupleBuilder nullTupleBuilder;
+    private final ArrayTupleBuilder missingTupleBuilder;
     private final IPredicateEvaluator predEvaluator;
     private boolean isReversed; //Added for handling correct calling for predicate-evaluator upon recursive calls (in OptimizedHybridHashJoin) that cause role-reversal
     private BufferInfo tempInfo = new BufferInfo(null, -1, -1);
 
     public NestedLoopJoin(IHyracksTaskContext ctx, FrameTupleAccessor accessorOuter, FrameTupleAccessor accessorInner,
             ITuplePairComparator comparatorsOuter2Inner, int memSize, IPredicateEvaluator predEval, boolean isLeftOuter,
-            INullWriter[] nullWriters1) throws HyracksDataException {
+            IMissingWriter[] missingWriters) throws HyracksDataException {
         this.accessorInner = accessorInner;
         this.accessorOuter = accessorOuter;
         this.appender = new FrameTupleAppender();
@@ -81,14 +81,14 @@
         this.isLeftOuter = isLeftOuter;
         if (isLeftOuter) {
             int innerFieldCount = this.accessorInner.getFieldCount();
-            nullTupleBuilder = new ArrayTupleBuilder(innerFieldCount);
-            DataOutput out = nullTupleBuilder.getDataOutput();
+            missingTupleBuilder = new ArrayTupleBuilder(innerFieldCount);
+            DataOutput out = missingTupleBuilder.getDataOutput();
             for (int i = 0; i < innerFieldCount; i++) {
-                nullWriters1[i].writeNull(out);
-                nullTupleBuilder.addFieldEndOffset();
+                missingWriters[i].writeMissing(out);
+                missingTupleBuilder.addFieldEndOffset();
             }
         } else {
-            nullTupleBuilder = null;
+            missingTupleBuilder = null;
         }
 
         FileReference file = ctx.getJobletContext()
@@ -138,9 +138,9 @@
             }
 
             if (!matchFound && isLeftOuter) {
-                final int[] ntFieldEndOffsets = nullTupleBuilder.getFieldEndOffsets();
-                final byte[] ntByteArray = nullTupleBuilder.getByteArray();
-                final int ntSize = nullTupleBuilder.getSize();
+                final int[] ntFieldEndOffsets = missingTupleBuilder.getFieldEndOffsets();
+                final byte[] ntByteArray = missingTupleBuilder.getByteArray();
+                final int ntSize = missingTupleBuilder.getSize();
                 FrameUtils.appendConcatToWriter(writer, appender, accessorOuter, i, ntFieldEndOffsets, ntByteArray, 0,
                         ntSize);
             }
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
index dc7d256..09207b9 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/NestedLoopJoinOperatorDescriptor.java
@@ -29,8 +29,8 @@
 import org.apache.hyracks.api.dataflow.IActivityGraphBuilder;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.TaskId;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
@@ -57,18 +57,18 @@
     private final int memSize;
     private final IPredicateEvaluatorFactory predEvaluatorFactory;
     private final boolean isLeftOuter;
-    private final INullWriterFactory[] nullWriterFactories1;
+    private final IMissingWriterFactory[] nullWriterFactories1;
 
     public NestedLoopJoinOperatorDescriptor(IOperatorDescriptorRegistry spec,
             ITuplePairComparatorFactory comparatorFactory, RecordDescriptor recordDescriptor, int memSize,
-            boolean isLeftOuter, INullWriterFactory[] nullWriterFactories1) {
+            boolean isLeftOuter, IMissingWriterFactory[] nullWriterFactories1) {
         this(spec, comparatorFactory, recordDescriptor, memSize, null, isLeftOuter, nullWriterFactories1);
     }
 
     public NestedLoopJoinOperatorDescriptor(IOperatorDescriptorRegistry spec,
             ITuplePairComparatorFactory comparatorFactory, RecordDescriptor recordDescriptor, int memSize,
             IPredicateEvaluatorFactory predEvalFactory, boolean isLeftOuter,
-            INullWriterFactory[] nullWriterFactories1) {
+            IMissingWriterFactory[] nullWriterFactories1) {
         super(spec, 2, 1);
         this.comparatorFactory = comparatorFactory;
         this.recordDescriptors[0] = recordDescriptor;
@@ -135,10 +135,10 @@
             final IPredicateEvaluator predEvaluator = ((predEvaluatorFactory != null)
                     ? predEvaluatorFactory.createPredicateEvaluator() : null);
 
-            final INullWriter[] nullWriters1 = isLeftOuter ? new INullWriter[nullWriterFactories1.length] : null;
+            final IMissingWriter[] nullWriters1 = isLeftOuter ? new IMissingWriter[nullWriterFactories1.length] : null;
             if (isLeftOuter) {
                 for (int i = 0; i < nullWriterFactories1.length; i++) {
-                    nullWriters1[i] = nullWriterFactories1[i].createNullWriter();
+                    nullWriters1[i] = nullWriterFactories1[i].createMissingWriter();
                 }
             }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoin.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoin.java
index 810039b..b80059b 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoin.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoin.java
@@ -28,8 +28,8 @@
 import org.apache.hyracks.api.comm.VSizeFrame;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.ITuplePartitionComputer;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -82,7 +82,7 @@
 
     private final IPredicateEvaluator predEvaluator;
     private final boolean isLeftOuter;
-    private final INullWriter[] nullWriters;
+    private final IMissingWriter[] nonMatchWriters;
 
     private final BitSet spilledStatus; //0=resident, 1=spilled
     private final int numOfPartitions;
@@ -108,7 +108,7 @@
             String buildRelName, int[] probeKeys, int[] buildKeys, IBinaryComparator[] comparators,
             RecordDescriptor probeRd, RecordDescriptor buildRd, ITuplePartitionComputer probeHpc,
             ITuplePartitionComputer buildHpc, IPredicateEvaluator predEval, boolean isLeftOuter,
-            INullWriterFactory[] nullWriterFactories1) {
+            IMissingWriterFactory[] nullWriterFactories1) {
         this.ctx = ctx;
         this.memForJoin = memForJoin;
         this.buildRd = buildRd;
@@ -134,10 +134,10 @@
 
         this.spilledStatus = new BitSet(numOfPartitions);
 
-        this.nullWriters = isLeftOuter ? new INullWriter[nullWriterFactories1.length] : null;
+        this.nonMatchWriters = isLeftOuter ? new IMissingWriter[nullWriterFactories1.length] : null;
         if (isLeftOuter) {
             for (int i = 0; i < nullWriterFactories1.length; i++) {
-                nullWriters[i] = nullWriterFactories1[i].createNullWriter();
+                nonMatchWriters[i] = nullWriterFactories1[i].createMissingWriter();
             }
         }
     }
@@ -313,7 +313,7 @@
         ISerializableTable table = new SerializableHashTable(inMemTupCount, ctx);
         this.inMemJoiner = new InMemoryHashJoin(ctx, inMemTupCount, new FrameTupleAccessor(probeRd), probeHpc,
                 new FrameTupleAccessor(buildRd), buildHpc,
-                new FrameTuplePairComparator(probeKeys, buildKeys, comparators), isLeftOuter, nullWriters, table,
+                new FrameTuplePairComparator(probeKeys, buildKeys, comparators), isLeftOuter, nonMatchWriters, table,
                 predEvaluator, isReversed);
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
index 22ad91f..183d7f6 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
@@ -36,8 +36,8 @@
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFamily;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluator;
 import org.apache.hyracks.api.dataflow.value.IPredicateEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
@@ -124,7 +124,7 @@
     private final IPredicateEvaluatorFactory predEvaluatorFactory;
 
     private final boolean isLeftOuter;
-    private final INullWriterFactory[] nullWriterFactories1;
+    private final IMissingWriterFactory[] nonMatchWriterFactories;
 
     //Flags added for test purpose
     private static boolean skipInMemoryHJ = false;
@@ -138,7 +138,7 @@
             IBinaryComparatorFactory[] comparatorFactories, RecordDescriptor recordDescriptor,
             ITuplePairComparatorFactory tupPaircomparatorFactory01,
             ITuplePairComparatorFactory tupPaircomparatorFactory10, IPredicateEvaluatorFactory predEvaluatorFactory,
-            boolean isLeftOuter, INullWriterFactory[] nullWriterFactories1) throws HyracksDataException {
+            boolean isLeftOuter, IMissingWriterFactory[] nonMatchWriterFactories) throws HyracksDataException {
 
         super(spec, 2, 1);
         this.frameLimit = frameLimit;
@@ -153,7 +153,7 @@
         recordDescriptors[0] = recordDescriptor;
         this.predEvaluatorFactory = predEvaluatorFactory;
         this.isLeftOuter = isLeftOuter;
-        this.nullWriterFactories1 = nullWriterFactories1;
+        this.nonMatchWriterFactories = nonMatchWriterFactories;
     }
 
     public OptimizedHybridHashJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int frameLimit, int inputsize0,
@@ -162,9 +162,9 @@
             ITuplePairComparatorFactory tupPaircomparatorFactory01,
             ITuplePairComparatorFactory tupPaircomparatorFactory10, IPredicateEvaluatorFactory predEvaluatorFactory)
             throws HyracksDataException {
-        this(spec, frameLimit, inputsize0, factor, keys0, keys1, hashFunctionGeneratorFactories,
-                comparatorFactories, recordDescriptor, tupPaircomparatorFactory01, tupPaircomparatorFactory10,
-                predEvaluatorFactory, false, null);
+        this(spec, frameLimit, inputsize0, factor, keys0, keys1, hashFunctionGeneratorFactories, comparatorFactories,
+                recordDescriptor, tupPaircomparatorFactory01, tupPaircomparatorFactory10, predEvaluatorFactory, false,
+                null);
     }
 
     @Override
@@ -284,7 +284,7 @@
                             nPartitions);
                     state.hybridHJ = new OptimizedHybridHashJoin(ctx, state.memForJoin, state.numOfPartitions,
                             PROBE_REL, BUILD_REL, probeKeys, buildKeys, comparators, probeRd, buildRd, probeHpc,
-                            buildHpc, predEvaluator, isLeftOuter, nullWriterFactories1);
+                            buildHpc, predEvaluator, isLeftOuter, nonMatchWriterFactories);
 
                     state.hybridHJ.initBuild();
                     if (LOGGER.isLoggable(Level.FINE)) {
@@ -301,7 +301,7 @@
                 @Override
                 public void close() throws HyracksDataException {
                     state.hybridHJ.closeBuild();
-                    if (isFailed){
+                    if (isFailed) {
                         state.hybridHJ.clearBuildTempFiles();
                     } else {
                         ctx.setStateObject(state);
@@ -343,7 +343,7 @@
         @Override
         public IOperatorNodePushable createPushRuntime(final IHyracksTaskContext ctx,
                 IRecordDescriptorProvider recordDescProvider, final int partition, final int nPartitions)
-                        throws HyracksDataException {
+                throws HyracksDataException {
 
             final RecordDescriptor buildRd = recordDescProvider.getInputRecordDescriptor(buildAid, 0);
             final RecordDescriptor probeRd = recordDescProvider.getInputRecordDescriptor(getActivityId(), 0);
@@ -352,22 +352,22 @@
                     .createTuplePairComparator(ctx);
             final ITuplePairComparator nljComparatorBuild2Probe = tuplePairComparatorFactoryBuild2Probe
                     .createTuplePairComparator(ctx);
-            final IPredicateEvaluator predEvaluator = (predEvaluatorFactory == null ? null : predEvaluatorFactory
-                    .createPredicateEvaluator());
+            final IPredicateEvaluator predEvaluator = predEvaluatorFactory == null ? null
+                    : predEvaluatorFactory.createPredicateEvaluator();
 
             for (int i = 0; i < comparatorFactories.length; i++) {
                 comparators[i] = comparatorFactories[i].createBinaryComparator();
             }
 
-            final INullWriter[] nullWriters1 = isLeftOuter ? new INullWriter[nullWriterFactories1.length] : null;
-            final ArrayTupleBuilder nullTupleBuild = isLeftOuter ?
-                    new ArrayTupleBuilder(buildRd.getFieldCount()) :
-                    null;
+            final IMissingWriter[] nonMatchWriter = isLeftOuter ? new IMissingWriter[nonMatchWriterFactories.length]
+                    : null;
+            final ArrayTupleBuilder nullTupleBuild = isLeftOuter ? new ArrayTupleBuilder(buildRd.getFieldCount())
+                    : null;
             if (isLeftOuter) {
                 DataOutput out = nullTupleBuild.getDataOutput();
-                for (int i = 0; i < nullWriterFactories1.length; i++) {
-                    nullWriters1[i] = nullWriterFactories1[i].createNullWriter();
-                    nullWriters1[i].writeNull(out);
+                for (int i = 0; i < nonMatchWriterFactories.length; i++) {
+                    nonMatchWriter[i] = nonMatchWriterFactories[i].createMissingWriter();
+                    nonMatchWriter[i].writeMissing(out);
                     nullTupleBuild.addFieldEndOffset();
                 }
             }
@@ -381,8 +381,8 @@
 
                 @Override
                 public void open() throws HyracksDataException {
-                    state = (BuildAndPartitionTaskState) ctx.getStateObject(new TaskId(new ActivityId(getOperatorId(),
-                            BUILD_AND_PARTITION_ACTIVITY_ID), partition));
+                    state = (BuildAndPartitionTaskState) ctx.getStateObject(
+                            new TaskId(new ActivityId(getOperatorId(), BUILD_AND_PARTITION_ACTIVITY_ID), partition));
 
                     writer.open();
                     state.hybridHJ.initProbe();
@@ -410,7 +410,8 @@
                         BitSet partitionStatus = state.hybridHJ.getPartitionStatus();
 
                         rPartbuff.reset();
-                        for (int pid = partitionStatus.nextSetBit(0); pid >= 0; pid = partitionStatus.nextSetBit(pid + 1)) {
+                        for (int pid = partitionStatus.nextSetBit(0); pid >= 0; pid = partitionStatus
+                                .nextSetBit(pid + 1)) {
 
                             RunFileReader bReader = state.hybridHJ.getBuildRFReader(pid);
                             RunFileReader pReader = state.hybridHJ.getProbeRFReader(pid);
@@ -435,8 +436,7 @@
 
                 //The buildSideReader should be always the original buildSideReader, so should the probeSideReader
                 private void joinPartitionPair(RunFileReader buildSideReader, RunFileReader probeSideReader,
-                        int buildSizeInTuple, int probeSizeInTuple, int level)
-                        throws HyracksDataException {
+                        int buildSizeInTuple, int probeSizeInTuple, int level) throws HyracksDataException {
                     ITuplePartitionComputer probeHpc = new FieldHashPartitionComputerFamily(probeKeys,
                             hashFunctionGeneratorFactories).createPartitioner(level);
                     ITuplePartitionComputer buildHpc = new FieldHashPartitionComputerFamily(buildKeys,
@@ -447,21 +447,18 @@
                     int beforeMax = Math.max(buildSizeInTuple, probeSizeInTuple);
 
                     if (LOGGER.isLoggable(Level.FINE)) {
-                        LOGGER.fine(
-                                "\n>>>Joining Partition Pairs (thread_id " + Thread.currentThread().getId() + ") (pid "
-                                        + ") - (level " + level + ")"
-                                        + " - BuildSize:\t" + buildPartSize + "\tProbeSize:\t" + probePartSize
-                                        + " - MemForJoin "
-                                        + (state.memForJoin)
-                                        + "  - LeftOuter is " + isLeftOuter);
+                        LOGGER.fine("\n>>>Joining Partition Pairs (thread_id " + Thread.currentThread().getId()
+                                + ") (pid " + ") - (level " + level + ")" + " - BuildSize:\t" + buildPartSize
+                                + "\tProbeSize:\t" + probePartSize + " - MemForJoin " + (state.memForJoin)
+                                + "  - LeftOuter is " + isLeftOuter);
                     }
 
                     //Apply in-Mem HJ if possible
                     if (!skipInMemoryHJ && ((buildPartSize < state.memForJoin)
                             || (probePartSize < state.memForJoin && !isLeftOuter))) {
                         int tabSize = -1;
-                        if (!forceRR && (isLeftOuter || (buildPartSize
-                                < probePartSize))) { //Case 1.1 - InMemHJ (wout Role-Reversal)
+                        if (!forceRR && (isLeftOuter || (buildPartSize < probePartSize))) {
+                            //Case 1.1 - InMemHJ (wout Role-Reversal)
                             if (LOGGER.isLoggable(Level.FINE)) {
                                 LOGGER.fine("\t>>>Case 1.1 (IsLeftOuter || buildSize<probe) AND ApplyInMemHJ - [Level "
                                         + level + "]");
@@ -472,8 +469,8 @@
                                         "Trying to join an empty partition. Invalid table size for inMemoryHashJoin.");
                             }
                             //Build Side is smaller
-                            applyInMemHashJoin(buildKeys, probeKeys, tabSize, buildRd, probeRd, buildHpc,
-                                    probeHpc, buildSideReader, probeSideReader); // checked-confirmed
+                            applyInMemHashJoin(buildKeys, probeKeys, tabSize, buildRd, probeRd, buildHpc, probeHpc,
+                                    buildSideReader, probeSideReader); // checked-confirmed
                         } else { //Case 1.2 - InMemHJ with Role Reversal
                             if (LOGGER.isLoggable(Level.FINE)) {
                                 LOGGER.fine(
@@ -486,8 +483,8 @@
                                         "Trying to join an empty partition. Invalid table size for inMemoryHashJoin.");
                             }
                             //Probe Side is smaller
-                            applyInMemHashJoin(probeKeys, buildKeys, tabSize, probeRd, buildRd, probeHpc,
-                                    buildHpc, probeSideReader, buildSideReader); // checked-confirmed
+                            applyInMemHashJoin(probeKeys, buildKeys, tabSize, probeRd, buildRd, probeHpc, buildHpc,
+                                    probeSideReader, buildSideReader); // checked-confirmed
                         }
                     }
                     //Apply (Recursive) HHJ
@@ -495,8 +492,8 @@
                         if (LOGGER.isLoggable(Level.FINE)) {
                             LOGGER.fine("\t>>>Case 2. ApplyRecursiveHHJ - [Level " + level + "]");
                         }
-                        if (!forceRR && (isLeftOuter
-                                || buildPartSize < probePartSize)) { //Case 2.1 - Recursive HHJ (wout Role-Reversal)
+                        if (!forceRR && (isLeftOuter || buildPartSize < probePartSize)) {
+                            //Case 2.1 - Recursive HHJ (wout Role-Reversal)
                             if (LOGGER.isLoggable(Level.FINE)) {
                                 LOGGER.fine("\t\t>>>Case 2.1 - RecursiveHHJ WITH (isLeftOuter || build<probe) - [Level "
                                         + level + "]");
@@ -519,13 +516,11 @@
                     }
                 }
 
-                private void applyHybridHashJoin(int tableSize,
-                        final String PROBE_REL, final String BUILD_REL,
-                        final int[] probeKeys, final int[] buildKeys,
-                        final RecordDescriptor probeRd, final RecordDescriptor buildRd,
-                        final ITuplePartitionComputer probeHpc, final ITuplePartitionComputer buildHpc,
-                        RunFileReader probeSideReader, RunFileReader buildSideReader,
-                        final int level, final long beforeMax)
+                private void applyHybridHashJoin(int tableSize, final String PROBE_REL, final String BUILD_REL,
+                        final int[] probeKeys, final int[] buildKeys, final RecordDescriptor probeRd,
+                        final RecordDescriptor buildRd, final ITuplePartitionComputer probeHpc,
+                        final ITuplePartitionComputer buildHpc, RunFileReader probeSideReader,
+                        RunFileReader buildSideReader, final int level, final long beforeMax)
                         throws HyracksDataException {
 
                     boolean isReversed = probeKeys == OptimizedHybridHashJoinOperatorDescriptor.this.buildKeys
@@ -534,11 +529,10 @@
                     assert isLeftOuter ? !isReversed : true : "LeftOut Join can not reverse roles";
 
                     OptimizedHybridHashJoin rHHj;
-                    int n = getNumberOfPartitions(state.memForJoin, tableSize, fudgeFactor,
-                            nPartitions);
-                    rHHj = new OptimizedHybridHashJoin(ctx, state.memForJoin, n, PROBE_REL, BUILD_REL,
-                            probeKeys, buildKeys, comparators, probeRd, buildRd, probeHpc, buildHpc,
-                            predEvaluator, isLeftOuter, nullWriterFactories1); //checked-confirmed
+                    int n = getNumberOfPartitions(state.memForJoin, tableSize, fudgeFactor, nPartitions);
+                    rHHj = new OptimizedHybridHashJoin(ctx, state.memForJoin, n, PROBE_REL, BUILD_REL, probeKeys,
+                            buildKeys, comparators, probeRd, buildRd, probeHpc, buildHpc, predEvaluator, isLeftOuter,
+                            nonMatchWriterFactories); //checked-confirmed
 
                     rHHj.setIsReversed(isReversed);
                     buildSideReader.open();
@@ -564,8 +558,7 @@
                     int afterMax = Math.max(maxAfterBuildSize, maxAfterProbeSize);
 
                     BitSet rPStatus = rHHj.getPartitionStatus();
-                    if (!forceNLJ && (afterMax < (NLJ_SWITCH_THRESHOLD
-                            * beforeMax))) { //Case 2.1.1 - Keep applying HHJ
+                    if (!forceNLJ && (afterMax < (NLJ_SWITCH_THRESHOLD * beforeMax))) { //Case 2.1.1 - Keep applying HHJ
                         if (LOGGER.isLoggable(Level.FINE)) {
                             LOGGER.fine(
                                     "\t\t>>>Case 2.1.1 - KEEP APPLYING RecursiveHHJ WITH (isLeftOuter || build<probe) - [Level "
@@ -652,7 +645,7 @@
                     ISerializableTable table = new SerializableHashTable(tabSize, ctx);
                     InMemoryHashJoin joiner = new InMemoryHashJoin(ctx, tabSize, new FrameTupleAccessor(probeRDesc),
                             hpcRepProbe, new FrameTupleAccessor(buildRDesc), hpcRepBuild,
-                            new FrameTuplePairComparator(pKeys, bKeys, comparators), isLeftOuter, nullWriters1, table,
+                            new FrameTuplePairComparator(pKeys, bKeys, comparators), isLeftOuter, nonMatchWriter, table,
                             predEvaluator, isReversed);
 
                     bReader.open();
@@ -677,18 +670,15 @@
                 }
 
                 private void applyNestedLoopJoin(RecordDescriptor outerRd, RecordDescriptor innerRd, int memorySize,
-                        RunFileReader outerReader, RunFileReader innerReader)
-                        throws HyracksDataException {
+                        RunFileReader outerReader, RunFileReader innerReader) throws HyracksDataException {
                     // The nested loop join result is outer + inner. All the other operator is probe + build. Hence the reverse relation is different
                     boolean isReversed = outerRd == buildRd && innerRd == probeRd;
                     assert isLeftOuter ? !isReversed : true : "LeftOut Join can not reverse roles";
-                    ITuplePairComparator nljComptorOuterInner = isReversed ?
-                            nljComparatorBuild2Probe :
-                            nljComparatorProbe2Build;
-                    NestedLoopJoin nlj = new NestedLoopJoin(ctx,
-                            new FrameTupleAccessor(outerRd),
-                            new FrameTupleAccessor(innerRd), nljComptorOuterInner, memorySize,
-                            predEvaluator, isLeftOuter, nullWriters1);
+                    ITuplePairComparator nljComptorOuterInner = isReversed ? nljComparatorBuild2Probe
+                            : nljComparatorProbe2Build;
+                    NestedLoopJoin nlj = new NestedLoopJoin(ctx, new FrameTupleAccessor(outerRd),
+                            new FrameTupleAccessor(innerRd), nljComptorOuterInner, memorySize, predEvaluator,
+                            isLeftOuter, nonMatchWriter);
                     nlj.setIsReversed(isReversed);
 
                     IFrame cacheBuff = new VSizeFrame(ctx);
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderHashJoinTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderHashJoinTest.java
index 8232a62..c8e6f59 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderHashJoinTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderHashJoinTest.java
@@ -27,7 +27,7 @@
 import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 import org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.dataset.ResultSetId;
@@ -53,7 +53,7 @@
 import org.apache.hyracks.dataflow.std.join.InMemoryHashJoinOperatorDescriptor;
 import org.apache.hyracks.dataflow.std.misc.MaterializingOperatorDescriptor;
 import org.apache.hyracks.dataflow.std.result.ResultWriterOperatorDescriptor;
-import org.apache.hyracks.tests.util.NoopNullWriterFactory;
+import org.apache.hyracks.tests.util.NoopMissingWriterFactory;
 import org.apache.hyracks.tests.util.ResultSerializerFactoryProvider;
 
 public class TPCHCustomerOrderHashJoinTest extends AbstractIntegrationTest {
@@ -365,9 +365,9 @@
                         UTF8StringParserFactory.INSTANCE }, '|'), custDesc);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, custScanner, NC1_ID);
 
-        INullWriterFactory[] nullWriterFactories = new INullWriterFactory[ordersDesc.getFieldCount()];
-        for (int j = 0; j < nullWriterFactories.length; j++) {
-            nullWriterFactories[j] = NoopNullWriterFactory.INSTANCE;
+        IMissingWriterFactory[] nonMatchWriterFactories = new IMissingWriterFactory[ordersDesc.getFieldCount()];
+        for (int j = 0; j < nonMatchWriterFactories.length; j++) {
+            nonMatchWriterFactories[j] = NoopMissingWriterFactory.INSTANCE;
         }
 
         InMemoryHashJoinOperatorDescriptor join = new InMemoryHashJoinOperatorDescriptor(
@@ -376,7 +376,7 @@
                 new int[] { 1 },
                 new IBinaryHashFunctionFactory[] { PointableBinaryHashFunctionFactory.of(UTF8StringPointable.FACTORY) },
                 new IBinaryComparatorFactory[] { PointableBinaryComparatorFactory.of(UTF8StringPointable.FACTORY) },
-                null, custOrderJoinDesc, true, nullWriterFactories, 128);
+                null, custOrderJoinDesc, true, nonMatchWriterFactories, 128);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, join, NC1_ID);
 
         ResultSetId rsId = new ResultSetId(1);
@@ -449,9 +449,9 @@
                         UTF8StringParserFactory.INSTANCE }, '|'), custDesc);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, custScanner, NC1_ID);
 
-        INullWriterFactory[] nullWriterFactories = new INullWriterFactory[ordersDesc.getFieldCount()];
-        for (int j = 0; j < nullWriterFactories.length; j++) {
-            nullWriterFactories[j] = NoopNullWriterFactory.INSTANCE;
+        IMissingWriterFactory[] nonMatchWriterFactories = new IMissingWriterFactory[ordersDesc.getFieldCount()];
+        for (int j = 0; j < nonMatchWriterFactories.length; j++) {
+            nonMatchWriterFactories[j] = NoopMissingWriterFactory.INSTANCE;
         }
 
         GraceHashJoinOperatorDescriptor join = new GraceHashJoinOperatorDescriptor(
@@ -464,7 +464,7 @@
                 new int[] { 1 },
                 new IBinaryHashFunctionFactory[] { PointableBinaryHashFunctionFactory.of(UTF8StringPointable.FACTORY) },
                 new IBinaryComparatorFactory[] { PointableBinaryComparatorFactory.of(UTF8StringPointable.FACTORY) },
-                custOrderJoinDesc, true, nullWriterFactories, null);
+                custOrderJoinDesc, true, nonMatchWriterFactories, null);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, join, NC1_ID);
 
         ResultSetId rsId = new ResultSetId(1);
@@ -537,9 +537,9 @@
                         UTF8StringParserFactory.INSTANCE }, '|'), custDesc);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, custScanner, NC1_ID);
 
-        INullWriterFactory[] nullWriterFactories = new INullWriterFactory[ordersDesc.getFieldCount()];
-        for (int j = 0; j < nullWriterFactories.length; j++) {
-            nullWriterFactories[j] = NoopNullWriterFactory.INSTANCE;
+        IMissingWriterFactory[] nonMatchWriterFactories = new IMissingWriterFactory[ordersDesc.getFieldCount()];
+        for (int j = 0; j < nonMatchWriterFactories.length; j++) {
+            nonMatchWriterFactories[j] = NoopMissingWriterFactory.INSTANCE;
         }
 
         HybridHashJoinOperatorDescriptor join = new HybridHashJoinOperatorDescriptor(
@@ -552,7 +552,7 @@
                 new int[] { 1 },
                 new IBinaryHashFunctionFactory[] { PointableBinaryHashFunctionFactory.of(UTF8StringPointable.FACTORY) },
                 new IBinaryComparatorFactory[] { PointableBinaryComparatorFactory.of(UTF8StringPointable.FACTORY) },
-                custOrderJoinDesc, null, true, nullWriterFactories);
+                custOrderJoinDesc, null, true, nonMatchWriterFactories);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, join, NC1_ID);
 
         ResultSetId rsId = new ResultSetId(1);
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderNestedLoopJoinTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderNestedLoopJoinTest.java
index c28e496..c568306 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderNestedLoopJoinTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TPCHCustomerOrderNestedLoopJoinTest.java
@@ -29,7 +29,7 @@
 import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.dataflow.value.ITuplePairComparator;
 import org.apache.hyracks.api.dataflow.value.ITuplePairComparatorFactory;
@@ -52,7 +52,7 @@
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.dataflow.std.join.NestedLoopJoinOperatorDescriptor;
 import org.apache.hyracks.dataflow.std.result.ResultWriterOperatorDescriptor;
-import org.apache.hyracks.tests.util.NoopNullWriterFactory;
+import org.apache.hyracks.tests.util.NoopMissingWriterFactory;
 import org.apache.hyracks.tests.util.ResultSerializerFactoryProvider;
 
 public class TPCHCustomerOrderNestedLoopJoinTest extends AbstractIntegrationTest {
@@ -405,14 +405,14 @@
                         UTF8StringParserFactory.INSTANCE }, '|'), custDesc);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, custScanner, NC1_ID, NC2_ID);
 
-        INullWriterFactory[] nullWriterFactories = new INullWriterFactory[ordersDesc.getFieldCount()];
-        for (int j = 0; j < nullWriterFactories.length; j++) {
-            nullWriterFactories[j] = NoopNullWriterFactory.INSTANCE;
+        IMissingWriterFactory[] nonMatchWriterFactories = new IMissingWriterFactory[ordersDesc.getFieldCount()];
+        for (int j = 0; j < nonMatchWriterFactories.length; j++) {
+            nonMatchWriterFactories[j] = NoopMissingWriterFactory.INSTANCE;
         }
 
         NestedLoopJoinOperatorDescriptor join = new NestedLoopJoinOperatorDescriptor(spec, new JoinComparatorFactory(
                 PointableBinaryComparatorFactory.of(UTF8StringPointable.FACTORY), 1, 0), custOrderJoinDesc, 5, true,
-                nullWriterFactories);
+                nonMatchWriterFactories);
         PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, join, NC1_ID, NC2_ID);
 
         ResultSetId rsId = new ResultSetId(1);
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/NoopNullWriterFactory.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/NoopMissingWriterFactory.java
similarity index 71%
rename from hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/NoopNullWriterFactory.java
rename to hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/NoopMissingWriterFactory.java
index e86d3ff..a71be20 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/NoopNullWriterFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/NoopMissingWriterFactory.java
@@ -21,23 +21,23 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
-public class NoopNullWriterFactory implements INullWriterFactory {
+public class NoopMissingWriterFactory implements IMissingWriterFactory {
 
     private static final long serialVersionUID = 1L;
-    public static final NoopNullWriterFactory INSTANCE = new NoopNullWriterFactory();
+    public static final NoopMissingWriterFactory INSTANCE = new NoopMissingWriterFactory();
 
-    private NoopNullWriterFactory() {
+    private NoopMissingWriterFactory() {
     }
 
     @Override
-    public INullWriter createNullWriter() {
-        return new INullWriter() {
+    public IMissingWriter createMissingWriter() {
+        return new IMissingWriter() {
             @Override
-            public void writeNull(DataOutput out) throws HyracksDataException {
+            public void writeMissing(DataOutput out) throws HyracksDataException {
                 try {
                     out.writeShort(0);
                 } catch (IOException e) {
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java
index 5a079b1..21a2441 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/dataflow/BTreeSearchOperatorDescriptor.java
@@ -22,7 +22,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -52,12 +52,12 @@
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] lowKeyFields,
             int[] highKeyFields, boolean lowKeyInclusive, boolean highKeyInclusive,
-            IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainNull,
-            INullWriterFactory nullWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider,
+            IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainMissing,
+            IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider,
             int[] minFilterFieldIndexes, int[] maxFilterFieldIndexes) {
         super(spec, 1, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
-                comparatorFactories, bloomFilterKeyFields, dataflowHelperFactory, null, retainInput, retainNull,
-                nullWriterFactory, NoOpLocalResourceFactoryProvider.INSTANCE, searchOpCallbackProvider,
+                comparatorFactories, bloomFilterKeyFields, dataflowHelperFactory, null, retainInput, retainMissing,
+                missingWriterFactory, NoOpLocalResourceFactoryProvider.INSTANCE, searchOpCallbackProvider,
                 NoOpOperationCallbackFactory.INSTANCE);
         this.lowKeyFields = lowKeyFields;
         this.highKeyFields = highKeyFields;
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/test/java/org/apache/hyracks/storage/am/btree/test/FramewriterTest.java b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/test/java/org/apache/hyracks/storage/am/btree/test/FramewriterTest.java
index 378ea65..d713a92 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/test/java/org/apache/hyracks/storage/am/btree/test/FramewriterTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/test/java/org/apache/hyracks/storage/am/btree/test/FramewriterTest.java
@@ -436,7 +436,7 @@
                 AbstractTreeIndexOperatorDescriptor opDesc = Mockito.mock(AbstractTreeIndexOperatorDescriptor.class);
                 Mockito.when(opDesc.getIndexDataflowHelperFactory()).thenReturn(indexDataflowHelperFactories[i]);
                 Mockito.when(opDesc.getRetainInput()).thenReturn(false);
-                Mockito.when(opDesc.getRetainNull()).thenReturn(false);
+                Mockito.when(opDesc.getRetainMissing()).thenReturn(false);
                 Mockito.when(opDesc.getSearchOpCallbackFactory()).thenReturn(searchOpCallbackFactories[j]);
                 opDescs[k] = opDesc;
                 k++;
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java
index 8590014..ebe6383 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractIndexOperatorDescriptor.java
@@ -19,7 +19,7 @@
 
 package org.apache.hyracks.storage.am.common.dataflow;
 
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
 import org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor;
@@ -43,7 +43,7 @@
     protected final ITupleFilterFactory tupleFilterFactory;
     protected final boolean retainInput;
     protected final boolean retainNull;
-    protected final INullWriterFactory nullWriterFactory;
+    protected final IMissingWriterFactory nullWriterFactory;
     protected final ISearchOperationCallbackFactory searchOpCallbackFactory;
     protected final IModificationOperationCallbackFactory modificationOpCallbackFactory;
     protected final ILocalResourceFactoryProvider localResourceFactoryProvider;
@@ -52,7 +52,7 @@
             RecordDescriptor recDesc, IStorageManagerInterface storageManager,
             IIndexLifecycleManagerProvider lifecycleManagerProvider, IFileSplitProvider fileSplitProvider,
             IIndexDataflowHelperFactory dataflowHelperFactory, ITupleFilterFactory tupleFilterFactory,
-            boolean retainInput, boolean retainNull, INullWriterFactory nullWriterFactory,
+            boolean retainInput, boolean retainNull, IMissingWriterFactory nullWriterFactory,
             ILocalResourceFactoryProvider localResourceFactoryProvider,
             ISearchOperationCallbackFactory searchOpCallbackFactory,
             IModificationOperationCallbackFactory modificationOpCallbackFactory) {
@@ -104,12 +104,12 @@
     }
 
     @Override
-    public boolean getRetainNull() {
+    public boolean getRetainMissing() {
         return retainNull;
     }
 
     @Override
-    public INullWriterFactory getNullWriterFactory() {
+    public IMissingWriterFactory getMissingWriterFactory() {
         return nullWriterFactory;
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java
index 868725e..2020a15 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/AbstractTreeIndexOperatorDescriptor.java
@@ -20,7 +20,7 @@
 package org.apache.hyracks.storage.am.common.dataflow;
 
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
@@ -45,7 +45,7 @@
             IIndexLifecycleManagerProvider lifecycleManagerProvider, IFileSplitProvider fileSplitProvider,
             ITypeTraits[] typeTraits, IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields,
             IIndexDataflowHelperFactory dataflowHelperFactory, ITupleFilterFactory tupleFilterFactory,
-            boolean retainInput, boolean retainNull, INullWriterFactory nullWriterFactory,
+            boolean retainInput, boolean retainNull, IMissingWriterFactory nullWriterFactory,
             ILocalResourceFactoryProvider localResourceFactoryProvider,
             ISearchOperationCallbackFactory searchOpCallbackFactory,
             IModificationOperationCallbackFactory modificationOpCallbackFactory) {
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java
index c90c466..f59c5fd 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IIndexOperatorDescriptor.java
@@ -20,7 +20,7 @@
 package org.apache.hyracks.storage.am.common.dataflow;
 
 import org.apache.hyracks.api.dataflow.IActivity;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManagerProvider;
@@ -43,9 +43,9 @@
 
     public boolean getRetainInput();
 
-    public boolean getRetainNull();
+    public boolean getRetainMissing();
 
-    public INullWriterFactory getNullWriterFactory();
+    public IMissingWriterFactory getMissingWriterFactory();
 
     public ISearchOperationCallbackFactory getSearchOpCallbackFactory();
 
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java
index 650dcfa..4f9e6c4 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexSearchOperatorNodePushable.java
@@ -24,7 +24,7 @@
 
 import org.apache.hyracks.api.comm.VSizeFrame;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -63,9 +63,9 @@
     protected final boolean retainInput;
     protected FrameTupleReference frameTuple;
 
-    protected final boolean retainNull;
-    protected ArrayTupleBuilder nullTupleBuild;
-    protected INullWriter nullWriter;
+    protected final boolean retainMissing;
+    protected ArrayTupleBuilder nonMatchTupleBuild;
+    protected IMissingWriter nonMatchWriter;
 
     protected final int[] minFilterFieldIndexes;
     protected final int[] maxFilterFieldIndexes;
@@ -78,9 +78,9 @@
         this.ctx = ctx;
         this.indexHelper = opDesc.getIndexDataflowHelperFactory().createIndexDataflowHelper(opDesc, ctx, partition);
         this.retainInput = opDesc.getRetainInput();
-        this.retainNull = opDesc.getRetainNull();
-        if (this.retainNull) {
-            this.nullWriter = opDesc.getNullWriterFactory().createNullWriter();
+        this.retainMissing = opDesc.getRetainMissing();
+        if (this.retainMissing) {
+            this.nonMatchWriter = opDesc.getMissingWriterFactory().createMissingWriter();
         }
         this.inputRecDesc = recordDescProvider.getInputRecordDescriptor(opDesc.getActivityId(), 0);
         this.minFilterFieldIndexes = minFilterFieldIndexes;
@@ -111,20 +111,20 @@
         indexHelper.open();
         index = indexHelper.getIndexInstance();
         accessor = new FrameTupleAccessor(inputRecDesc);
-        if (retainNull) {
+        if (retainMissing) {
             int fieldCount = getFieldCount();
-            nullTupleBuild = new ArrayTupleBuilder(fieldCount);
-            DataOutput out = nullTupleBuild.getDataOutput();
+            nonMatchTupleBuild = new ArrayTupleBuilder(fieldCount);
+            DataOutput out = nonMatchTupleBuild.getDataOutput();
             for (int i = 0; i < fieldCount; i++) {
                 try {
-                    nullWriter.writeNull(out);
+                    nonMatchWriter.writeMissing(out);
                 } catch (IOException e) {
                     e.printStackTrace();
                 }
-                nullTupleBuild.addFieldEndOffset();
+                nonMatchTupleBuild.addFieldEndOffset();
             }
         } else {
-            nullTupleBuild = null;
+            nonMatchTupleBuild = null;
         }
 
         try {
@@ -165,9 +165,10 @@
             FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
         }
 
-        if (!matched && retainInput && retainNull) {
-            FrameUtils.appendConcatToWriter(writer, appender, accessor, tupleIndex, nullTupleBuild.getFieldEndOffsets(),
-                    nullTupleBuild.getByteArray(), 0, nullTupleBuild.getSize());
+        if (!matched && retainInput && retainMissing) {
+            FrameUtils.appendConcatToWriter(writer, appender, accessor, tupleIndex,
+                    nonMatchTupleBuild.getFieldEndOffsets(), nonMatchTupleBuild.getByteArray(), 0,
+                    nonMatchTupleBuild.getSize());
         }
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/dataflow/LSMTreeIndexInsertUpdateDeleteOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/dataflow/LSMTreeIndexInsertUpdateDeleteOperatorDescriptor.java
index 2a088d0..9d1deaf 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/dataflow/LSMTreeIndexInsertUpdateDeleteOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/dataflow/LSMTreeIndexInsertUpdateDeleteOperatorDescriptor.java
@@ -22,7 +22,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -51,12 +51,12 @@
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] fieldPermutation,
             IndexOperation op, IIndexDataflowHelperFactory dataflowHelperFactory,
-            ITupleFilterFactory tupleFilterFactory, INullWriterFactory nullWriterFactory,
+            ITupleFilterFactory tupleFilterFactory, IMissingWriterFactory missingWriterFactory,
             IModificationOperationCallbackFactory modificationOpCallbackProvider,
             ISearchOperationCallbackFactory searchOpCallbackProvider) {
         super(spec, 1, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
                 comparatorFactories, bloomFilterKeyFields, dataflowHelperFactory, tupleFilterFactory, false, false,
-                nullWriterFactory, NoOpLocalResourceFactoryProvider.INSTANCE, searchOpCallbackProvider,
+                missingWriterFactory, NoOpLocalResourceFactoryProvider.INSTANCE, searchOpCallbackProvider,
                 modificationOpCallbackProvider);
         this.fieldPermutation = fieldPermutation;
         this.op = op;
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java
index 1c16dfe..34037c7 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/AbstractLSMInvertedIndexOperatorDescriptor.java
@@ -20,7 +20,7 @@
 package org.apache.hyracks.storage.am.lsm.invertedindex.dataflow;
 
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
 import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
@@ -54,7 +54,7 @@
             ITypeTraits[] invListsTypeTraits, IBinaryComparatorFactory[] invListComparatorFactories,
             IBinaryTokenizerFactory tokenizerFactory, IIndexDataflowHelperFactory dataflowHelperFactory,
             ITupleFilterFactory tupleFilterFactory, boolean retainInput, boolean retainNull,
-            INullWriterFactory nullWriterFactory, ILocalResourceFactoryProvider localResourceFactoryProvider,
+            IMissingWriterFactory nullWriterFactory, ILocalResourceFactoryProvider localResourceFactoryProvider,
             ISearchOperationCallbackFactory searchOpCallbackFactory,
             IModificationOperationCallbackFactory modificationOpCallbackFactory) {
         super(spec, inputArity, outputArity, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider,
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java
index a9afb54..bec95d5 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/dataflow/LSMInvertedIndexSearchOperatorDescriptor.java
@@ -22,7 +22,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -54,7 +54,7 @@
             IBinaryComparatorFactory[] invListComparatorFactories,
             IIndexDataflowHelperFactory btreeDataflowHelperFactory, IBinaryTokenizerFactory queryTokenizerFactory,
             IInvertedIndexSearchModifierFactory searchModifierFactory, RecordDescriptor recDesc, boolean retainInput,
-            boolean retainNull, INullWriterFactory nullWriterFactory,
+            boolean retainNull, IMissingWriterFactory nullWriterFactory,
             ISearchOperationCallbackFactory searchOpCallbackProvider, int[] minFilterFieldIndexes,
             int[] maxFilterFieldIndexes) {
 
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-rtree/src/main/java/org/apache/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-storage-am-rtree/src/main/java/org/apache/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java
index e1922d0..42cd4a2 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-rtree/src/main/java/org/apache/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-rtree/src/main/java/org/apache/hyracks/storage/am/rtree/dataflow/RTreeSearchOperatorDescriptor.java
@@ -22,7 +22,7 @@
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
 import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -49,7 +49,7 @@
             IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] comparatorFactories, int[] keyFields,
             IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainNull,
-            INullWriterFactory nullWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory,
+            IMissingWriterFactory nullWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory,
             int[] minFilterFieldIndexes, int[] maxFilterFieldIndexes) {
 
         super(spec, 1, 1, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
