asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [3/5] asterixdb git commit: Rename several type tags to improve error messages:
Date Wed, 10 May 2017 17:52:00 GMT
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
index 95937e2..6f281bd 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/SerializerDeserializerProvider.java
@@ -116,13 +116,13 @@ public class SerializerDeserializerProvider implements ISerializerDeserializerPr
                 return AFloatSerializerDeserializer.INSTANCE;
             case BOOLEAN:
                 return ABooleanSerializerDeserializer.INSTANCE;
-            case INT8:
+            case TINYINT:
                 return AInt8SerializerDeserializer.INSTANCE;
-            case INT16:
+            case SMALLINT:
                 return AInt16SerializerDeserializer.INSTANCE;
-            case INT32:
+            case INTEGER:
                 return AInt32SerializerDeserializer.INSTANCE;
-            case INT64:
+            case BIGINT:
                 return AInt64SerializerDeserializer.INSTANCE;
             case LINE:
                 return ALineSerializerDeserializer.INSTANCE;
@@ -144,7 +144,7 @@ public class SerializerDeserializerProvider implements ISerializerDeserializerPr
                 return ADayTimeDurationSerializerDeserializer.INSTANCE;
             case INTERVAL:
                 return AIntervalSerializerDeserializer.INSTANCE;
-            case ORDEREDLIST:
+            case ARRAY:
                 return new AOrderedListSerializerDeserializer((AOrderedListType) aqlType);
             case POINT:
                 return APointSerializerDeserializer.INSTANCE;
@@ -154,9 +154,9 @@ public class SerializerDeserializerProvider implements ISerializerDeserializerPr
                 return ARectangleSerializerDeserializer.INSTANCE;
             case POLYGON:
                 return APolygonSerializerDeserializer.INSTANCE;
-            case RECORD:
+            case OBJECT:
                 return new ARecordSerializerDeserializer((ARecordType) aqlType);
-            case UNORDEREDLIST:
+            case MULTISET:
                 return new AUnorderedListSerializerDeserializer((AUnorderedListType) aqlType);
             case UUID:
                 return AUUIDSerializerDeserializer.INSTANCE;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/TypeTraitProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/TypeTraitProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/TypeTraitProvider.java
index 81bd060..9ec5a08 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/TypeTraitProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/TypeTraitProvider.java
@@ -48,16 +48,16 @@ public class TypeTraitProvider implements ITypeTraitProvider {
         }
         switch (aqlType.getTypeTag()) {
             case BOOLEAN:
-            case INT8:
+            case TINYINT:
                 return ONEBYTETYPETRAIT;
-            case INT16:
+            case SMALLINT:
                 return TWOBYTETYPETRAIT;
-            case INT32:
+            case INTEGER:
             case FLOAT:
             case DATE:
             case TIME:
                 return FOURBYTETYPETRAIT;
-            case INT64:
+            case BIGINT:
             case DOUBLE:
             case DATETIME:
             case DURATION:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
index c88b95c..3322924 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
@@ -81,9 +81,9 @@ public class PointableAllocator {
     public IVisitablePointable allocateFieldValue(IAType type) {
         if (type == null)
             return flatValueAllocator.allocate(null);
-        else if (type.getTypeTag().equals(ATypeTag.RECORD))
+        else if (type.getTypeTag().equals(ATypeTag.OBJECT))
             return recordValueAllocator.allocate(type);
-        else if (type.getTypeTag().equals(ATypeTag.UNORDEREDLIST) || type.getTypeTag().equals(ATypeTag.ORDEREDLIST))
+        else if (type.getTypeTag().equals(ATypeTag.MULTISET) || type.getTypeTag().equals(ATypeTag.ARRAY))
             return listValueAllocator.allocate(type);
         else
             return flatValueAllocator.allocate(null);
@@ -98,9 +98,9 @@ public class PointableAllocator {
     public IVisitablePointable allocateFieldValue(ATypeTag typeTag, byte[] b, int offset) throws AsterixException {
         if (typeTag == null)
             return flatValueAllocator.allocate(null);
-        else if (typeTag.equals(ATypeTag.RECORD))
+        else if (typeTag.equals(ATypeTag.OBJECT))
             return recordValueAllocator.allocate(DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE);
-        else if (typeTag.equals(ATypeTag.UNORDEREDLIST)) {
+        else if (typeTag.equals(ATypeTag.MULTISET)) {
             ATypeTag listItemType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b[offset]);
             if (listItemType == ATypeTag.ANY)
                 return listValueAllocator.allocate(DefaultOpenFieldType.NESTED_OPEN_AUNORDERED_LIST_TYPE);
@@ -111,7 +111,7 @@ public class PointableAllocator {
                     return listValueAllocator.allocate(
                             unorederedListTypeAllocator.allocate(TypeTagUtil.getBuiltinTypeByTag(listItemType)));
             }
-        } else if (typeTag.equals(ATypeTag.ORDEREDLIST)) {
+        } else if (typeTag.equals(ATypeTag.ARRAY)) {
             ATypeTag listItemType = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b[offset]);
             if (listItemType == ATypeTag.ANY)
                 return listValueAllocator.allocate(DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/base/DefaultOpenFieldType.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/base/DefaultOpenFieldType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/base/DefaultOpenFieldType.java
index cf1dfe4..3b8f233 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/base/DefaultOpenFieldType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/base/DefaultOpenFieldType.java
@@ -50,11 +50,11 @@ public class DefaultOpenFieldType {
             "nested-unordered-list");
 
     public static IAType getDefaultOpenFieldType(ATypeTag tag) {
-        if (tag.equals(ATypeTag.RECORD))
+        if (tag.equals(ATypeTag.OBJECT))
             return NESTED_OPEN_RECORD_TYPE;
-        if (tag.equals(ATypeTag.ORDEREDLIST))
+        if (tag.equals(ATypeTag.ARRAY))
             return NESTED_OPEN_AORDERED_LIST_TYPE;
-        if (tag.equals(ATypeTag.UNORDEREDLIST))
+        if (tag.equals(ATypeTag.MULTISET))
             return NESTED_OPEN_AUNORDERED_LIST_TYPE;
         else
             return null;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/AListCaster.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/AListCaster.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/AListCaster.java
index 94cfe75..52d5b9f 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/AListCaster.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/AListCaster.java
@@ -58,11 +58,11 @@ class AListCaster {
 
     public void castList(AListVisitablePointable listAccessor, IVisitablePointable resultAccessor,
             AbstractCollectionType reqType, ACastVisitor visitor) throws IOException, AsterixException {
-        if (reqType.getTypeTag().equals(ATypeTag.UNORDEREDLIST)) {
+        if (reqType.getTypeTag().equals(ATypeTag.MULTISET)) {
             unOrderedListBuilder.reset(reqType);
             reqItemType = reqType.getItemType();
         }
-        if (reqType.getTypeTag().equals(ATypeTag.ORDEREDLIST)) {
+        if (reqType.getTypeTag().equals(ATypeTag.ARRAY)) {
             orderedListBuilder.reset(reqType);
             reqItemType = reqType.getItemType();
         }
@@ -83,17 +83,17 @@ class AListCaster {
                 itemVisitorArg.second = reqItemType;
             }
             item.accept(visitor, itemVisitorArg);
-            if (reqType.getTypeTag().equals(ATypeTag.ORDEREDLIST)) {
+            if (reqType.getTypeTag().equals(ATypeTag.ARRAY)) {
                 orderedListBuilder.addItem(itemVisitorArg.first);
             }
-            if (reqType.getTypeTag().equals(ATypeTag.UNORDEREDLIST)) {
+            if (reqType.getTypeTag().equals(ATypeTag.MULTISET)) {
                 unOrderedListBuilder.addItem(itemVisitorArg.first);
             }
         }
-        if (reqType.getTypeTag().equals(ATypeTag.ORDEREDLIST)) {
+        if (reqType.getTypeTag().equals(ATypeTag.ARRAY)) {
             orderedListBuilder.write(dataDos, true);
         }
-        if (reqType.getTypeTag().equals(ATypeTag.UNORDEREDLIST)) {
+        if (reqType.getTypeTag().equals(ATypeTag.MULTISET)) {
             unOrderedListBuilder.write(dataDos, true);
         }
         int end = dataBos.size();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionMemberResultType.java
----------------------------------------------------------------------
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
index 1792f68..f8f6925 100644
--- 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
@@ -36,9 +36,9 @@ public class CollectionMemberResultType extends AbstractResultTypeComputer {
     @Override
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag actualTypeTag = type.getTypeTag();
-        if (type.getTypeTag() != ATypeTag.UNORDEREDLIST && type.getTypeTag() != ATypeTag.ORDEREDLIST) {
-            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.UNORDEREDLIST,
-                    ATypeTag.ORDEREDLIST);
+        if (type.getTypeTag() != ATypeTag.MULTISET && type.getTypeTag() != ATypeTag.ARRAY) {
+            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.MULTISET,
+                    ATypeTag.ARRAY);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/CollectionToSequenceTypeComputer.java
----------------------------------------------------------------------
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 60d783d..535b3df 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
@@ -39,7 +39,7 @@ public class CollectionToSequenceTypeComputer extends AbstractResultTypeComputer
     protected IAType getResultType(ILogicalExpression expr, IAType... strippedInputTypes) throws AlgebricksException {
         IAType argType = strippedInputTypes[0];
         ATypeTag argTypeTag = argType.getTypeTag();
-        if (argTypeTag == ATypeTag.ORDEREDLIST || argTypeTag == ATypeTag.UNORDEREDLIST) {
+        if (argTypeTag == ATypeTag.ARRAY || argTypeTag == ATypeTag.MULTISET) {
             /** if the input is a singleton list, return it's item type if any */
             AbstractCollectionType collectionType = (AbstractCollectionType) argType;
             return collectionType.getItemType();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByIndexResultType.java
----------------------------------------------------------------------
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 0e04480..73c019c 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
@@ -39,18 +39,18 @@ public class FieldAccessByIndexResultType extends AbstractResultTypeComputer {
     @Override
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag actualTypeTag = type.getTypeTag();
-        if (argIndex == 0 && actualTypeTag != ATypeTag.RECORD) {
-            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.RECORD);
+        if (argIndex == 0 && actualTypeTag != ATypeTag.OBJECT) {
+            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.OBJECT);
         }
-        if (argIndex == 1 && actualTypeTag != ATypeTag.INT32) {
-            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.INT32);
+        if (argIndex == 1 && actualTypeTag != ATypeTag.INTEGER) {
+            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.INTEGER);
         }
     }
 
     @Override
     protected IAType getResultType(ILogicalExpression expr, IAType... strippedInputTypes) throws AlgebricksException {
         IAType firstArgType = strippedInputTypes[0];
-        if (firstArgType.getTypeTag() != ATypeTag.RECORD) {
+        if (firstArgType.getTypeTag() != ATypeTag.OBJECT) {
             return BuiltinType.ANY;
         }
         AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java
index ffa3029..e9af1ab 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessByNameResultType.java
@@ -39,8 +39,8 @@ public class FieldAccessByNameResultType extends AbstractResultTypeComputer {
     @Override
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag actualTypeTag = type.getTypeTag();
-        if (argIndex == 0 && actualTypeTag != ATypeTag.RECORD) {
-            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.RECORD);
+        if (argIndex == 0 && actualTypeTag != ATypeTag.OBJECT) {
+            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.OBJECT);
         }
         if (argIndex == 1 && actualTypeTag != ATypeTag.STRING) {
             throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING);
@@ -50,7 +50,7 @@ public class FieldAccessByNameResultType extends AbstractResultTypeComputer {
     @Override
     protected IAType getResultType(ILogicalExpression expr, IAType... strippedInputTypes) throws AlgebricksException {
         IAType firstArgType = strippedInputTypes[0];
-        if (firstArgType.getTypeTag() != ATypeTag.RECORD) {
+        if (firstArgType.getTypeTag() != ATypeTag.OBJECT) {
             return BuiltinType.ANY;
         }
         AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FieldAccessNestedResultType.java
----------------------------------------------------------------------
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 03a6dc7..21593d9 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
@@ -48,19 +48,19 @@ public class FieldAccessNestedResultType extends AbstractResultTypeComputer {
     @Override
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag actualTypeTag = type.getTypeTag();
-        if (argIndex == 0 && actualTypeTag != ATypeTag.RECORD) {
-            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.RECORD);
+        if (argIndex == 0 && actualTypeTag != ATypeTag.OBJECT) {
+            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.OBJECT);
         }
         if (argIndex == 1) {
             switch (actualTypeTag) {
                 case STRING:
                     break;
-                case ORDEREDLIST:
+                case ARRAY:
                     checkOrderedList(funcName, type);
                     break;
                 default:
                     throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING,
-                            ATypeTag.ORDEREDLIST);
+                            ATypeTag.ARRAY);
             }
         }
     }
@@ -76,7 +76,7 @@ public class FieldAccessNestedResultType extends AbstractResultTypeComputer {
     @Override
     protected IAType getResultType(ILogicalExpression expr, IAType... strippedInputTypes) throws AlgebricksException {
         IAType firstArgType = strippedInputTypes[0];
-        if (firstArgType.getTypeTag() != ATypeTag.RECORD) {
+        if (firstArgType.getTypeTag() != ATypeTag.OBJECT) {
             return BuiltinType.ANY;
         }
         AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;
@@ -87,7 +87,7 @@ public class FieldAccessNestedResultType extends AbstractResultTypeComputer {
         ConstantExpression ce = (ConstantExpression) arg1;
         IAObject v = ((AsterixConstantValue) ce.getValue()).getObject();
         List<String> fieldPath = new ArrayList<>();
-        if (v.getType().getTypeTag() == ATypeTag.ORDEREDLIST) {
+        if (v.getType().getTypeTag() == ATypeTag.ARRAY) {
             for (int i = 0; i < ((AOrderedList) v).size(); i++) {
                 fieldPath.add(((AString) ((AOrderedList) v).getItem(i)).getStringValue());
             }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FullTextContainsResultTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FullTextContainsResultTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FullTextContainsResultTypeComputer.java
index f2398e1..0748745 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FullTextContainsResultTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FullTextContainsResultTypeComputer.java
@@ -41,17 +41,17 @@ public class FullTextContainsResultTypeComputer extends AbstractResultTypeComput
             throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING);
         }
         // Expression2 should be a string, or an (un)ordered list.
-        if (argIndex == 1 && (actualTypeTag != ATypeTag.STRING && actualTypeTag != ATypeTag.UNORDEREDLIST
-                && actualTypeTag != ATypeTag.ORDEREDLIST && actualTypeTag != ATypeTag.ANY)) {
-            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING, ATypeTag.UNORDEREDLIST,
-                    ATypeTag.ORDEREDLIST);
+        if (argIndex == 1 && (actualTypeTag != ATypeTag.STRING && actualTypeTag != ATypeTag.MULTISET
+                && actualTypeTag != ATypeTag.ARRAY && actualTypeTag != ATypeTag.ANY)) {
+            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING, ATypeTag.MULTISET,
+                    ATypeTag.ARRAY);
         }
         // Each option name should be a string if it is already processed by FullTextContainsParameterCheckRule.
         // Before, the third argument should be a record if exists.
         // The structure is: arg2 = optionName1, arg3 = optionValue1, arg4 = optionName1, arg5 = optionValue2, ...
-        if (argIndex > 1 && argIndex % 2 == 0 && (actualTypeTag != ATypeTag.STRING && actualTypeTag != ATypeTag.RECORD
+        if (argIndex > 1 && argIndex % 2 == 0 && (actualTypeTag != ATypeTag.STRING && actualTypeTag != ATypeTag.OBJECT
                 && actualTypeTag != ATypeTag.ANY)) {
-            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING, ATypeTag.RECORD);
+            throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING, ATypeTag.OBJECT);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/MinMaxAggTypeComputer.java
----------------------------------------------------------------------
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
index 0c0c2f9..0526e7d 100644
--- 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
@@ -39,10 +39,10 @@ public class MinMaxAggTypeComputer extends AbstractResultTypeComputer {
         switch (tag) {
             case DOUBLE:
             case FLOAT:
-            case INT64:
-            case INT32:
-            case INT16:
-            case INT8:
+            case BIGINT:
+            case INTEGER:
+            case SMALLINT:
+            case TINYINT:
             case STRING:
             case DATE:
             case TIME:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NonTaggedGetItemResultType.java
----------------------------------------------------------------------
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 677507e..a81ef34 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
@@ -40,13 +40,13 @@ public class NonTaggedGetItemResultType extends AbstractResultTypeComputer {
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag actualTypeTag = type.getTypeTag();
         if (argIndex == 0) {
-            if (type.getTypeTag() != ATypeTag.UNORDEREDLIST && type.getTypeTag() != ATypeTag.ORDEREDLIST) {
+            if (type.getTypeTag() != ATypeTag.MULTISET && type.getTypeTag() != ATypeTag.ARRAY) {
                 throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.STRING,
-                        ATypeTag.ORDEREDLIST);
+                        ATypeTag.ARRAY);
             }
         } else {
-            if (!ATypeHierarchy.isCompatible(type.getTypeTag(), ATypeTag.INT32)) {
-                throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.INT32);
+            if (!ATypeHierarchy.isCompatible(type.getTypeTag(), ATypeTag.INTEGER)) {
+                throw new TypeMismatchException(funcName, argIndex, actualTypeTag, ATypeTag.INTEGER);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java
index d4812c0..034309b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAddSubMulDivTypeComputer.java
@@ -47,10 +47,10 @@ public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer
         switch (tag1) {
             case DOUBLE:
                 switch (tag2) {
-                    case INT8:
-                    case INT16:
-                    case INT32:
-                    case INT64:
+                    case TINYINT:
+                    case SMALLINT:
+                    case INTEGER:
+                    case BIGINT:
                     case FLOAT:
                     case DOUBLE:
                         type = BuiltinType.ADOUBLE;
@@ -64,10 +64,10 @@ public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer
                 break;
             case FLOAT:
                 switch (tag2) {
-                    case INT8:
-                    case INT16:
-                    case INT32:
-                    case INT64:
+                    case TINYINT:
+                    case SMALLINT:
+                    case INTEGER:
+                    case BIGINT:
                     case FLOAT:
                         type = BuiltinType.AFLOAT;
                         break;
@@ -81,12 +81,12 @@ public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer
                         throw new IncompatibleTypeException(funcName, tag1, tag2);
                 }
                 break;
-            case INT64:
+            case BIGINT:
                 switch (tag2) {
-                    case INT8:
-                    case INT16:
-                    case INT32:
-                    case INT64:
+                    case TINYINT:
+                    case SMALLINT:
+                    case INTEGER:
+                    case BIGINT:
                         type = BuiltinType.AINT64;
                         break;
                     case FLOAT:
@@ -102,14 +102,14 @@ public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer
                         throw new IncompatibleTypeException(funcName, tag1, tag2);
                 }
                 break;
-            case INT32:
+            case INTEGER:
                 switch (tag2) {
-                    case INT8:
-                    case INT16:
-                    case INT32:
+                    case TINYINT:
+                    case SMALLINT:
+                    case INTEGER:
                         type = BuiltinType.AINT32;
                         break;
-                    case INT64:
+                    case BIGINT:
                         type = BuiltinType.AINT64;
                         break;
                     case FLOAT:
@@ -125,16 +125,16 @@ public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer
                         throw new IncompatibleTypeException(funcName, tag1, tag2);
                 }
                 break;
-            case INT16:
+            case SMALLINT:
                 switch (tag2) {
-                    case INT8:
-                    case INT16:
+                    case TINYINT:
+                    case SMALLINT:
                         type = BuiltinType.AINT16;
                         break;
-                    case INT32:
+                    case INTEGER:
                         type = BuiltinType.AINT32;
                         break;
-                    case INT64:
+                    case BIGINT:
                         type = BuiltinType.AINT64;
                         break;
                     case FLOAT:
@@ -150,18 +150,18 @@ public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer
                         throw new IncompatibleTypeException(funcName, tag1, tag2);
                 }
                 break;
-            case INT8:
+            case TINYINT:
                 switch (tag2) {
-                    case INT8:
+                    case TINYINT:
                         type = BuiltinType.AINT8;
                         break;
-                    case INT16:
+                    case SMALLINT:
                         type = BuiltinType.AINT16;
                         break;
-                    case INT32:
+                    case INTEGER:
                         type = BuiltinType.AINT32;
                         break;
-                    case INT64:
+                    case BIGINT:
                         type = BuiltinType.AINT64;
                         break;
                     case FLOAT:
@@ -179,10 +179,10 @@ public class NumericAddSubMulDivTypeComputer extends AbstractResultTypeComputer
                 break;
             case ANY:
                 switch (tag2) {
-                    case INT8:
-                    case INT16:
-                    case INT32:
-                    case INT64:
+                    case TINYINT:
+                    case SMALLINT:
+                    case INTEGER:
+                    case BIGINT:
                     case FLOAT:
                     case ANY:
                     case DOUBLE:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericAggTypeComputer.java
----------------------------------------------------------------------
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
index 57b11b4..f2ae015 100644
--- 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
@@ -38,10 +38,10 @@ public class NumericAggTypeComputer extends AbstractResultTypeComputer {
         switch (tag) {
             case DOUBLE:
             case FLOAT:
-            case INT64:
-            case INT32:
-            case INT16:
-            case INT8:
+            case BIGINT:
+            case INTEGER:
+            case SMALLINT:
+            case TINYINT:
             case ANY:
                 break;
             default:
@@ -56,10 +56,10 @@ public class NumericAggTypeComputer extends AbstractResultTypeComputer {
         switch (tag) {
             case DOUBLE:
             case FLOAT:
-            case INT64:
-            case INT32:
-            case INT16:
-            case INT8:
+            case BIGINT:
+            case INTEGER:
+            case SMALLINT:
+            case TINYINT:
             case ANY:
                 type = strippedInputTypes[0];
                 break;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericDoubleOutputFunctionTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericDoubleOutputFunctionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericDoubleOutputFunctionTypeComputer.java
index 5045187..1e9678a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericDoubleOutputFunctionTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericDoubleOutputFunctionTypeComputer.java
@@ -39,16 +39,16 @@ public class NumericDoubleOutputFunctionTypeComputer extends AbstractResultTypeC
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag tag = type.getTypeTag();
         switch (tag) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
                 break;
             default:
-                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16, ATypeTag.INT32,
-                        ATypeTag.INT64, ATypeTag.FLOAT, ATypeTag.DOUBLE);
+                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                        ATypeTag.INTEGER, ATypeTag.BIGINT, ATypeTag.FLOAT, ATypeTag.DOUBLE);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericInt8OutputFunctionTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericInt8OutputFunctionTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericInt8OutputFunctionTypeComputer.java
index 25ead33..2081b9b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericInt8OutputFunctionTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericInt8OutputFunctionTypeComputer.java
@@ -38,16 +38,16 @@ public class NumericInt8OutputFunctionTypeComputer extends AbstractResultTypeCom
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag tag = type.getTypeTag();
         switch (tag) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
                 break;
             default:
-                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16, ATypeTag.INT32,
-                        ATypeTag.INT64, ATypeTag.FLOAT, ATypeTag.DOUBLE);
+                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                        ATypeTag.INTEGER, ATypeTag.BIGINT, ATypeTag.FLOAT, ATypeTag.DOUBLE);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRound2TypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRound2TypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRound2TypeComputer.java
index aa509e7..dbec30e 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRound2TypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericRound2TypeComputer.java
@@ -43,28 +43,28 @@ public class NumericRound2TypeComputer extends AbstractResultTypeComputer {
         ATypeTag tag = type.getTypeTag();
         if (argIndex == 0) {
             switch (tag) {
-                case INT8:
-                case INT16:
-                case INT32:
-                case INT64:
+                case TINYINT:
+                case SMALLINT:
+                case INTEGER:
+                case BIGINT:
                 case FLOAT:
                 case DOUBLE:
                     break;
                 default:
-                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16,
-                            ATypeTag.INT32, ATypeTag.INT64, ATypeTag.FLOAT, ATypeTag.DOUBLE);
+                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                            ATypeTag.INTEGER, ATypeTag.BIGINT, ATypeTag.FLOAT, ATypeTag.DOUBLE);
             }
         }
         if (argIndex == 1) {
             switch (tag) {
-                case INT8:
-                case INT16:
-                case INT32:
-                case INT64:
+                case TINYINT:
+                case SMALLINT:
+                case INTEGER:
+                case BIGINT:
                     break;
                 default:
-                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16,
-                            ATypeTag.INT32, ATypeTag.INT64);
+                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                            ATypeTag.INTEGER, ATypeTag.BIGINT);
             }
         }
     }
@@ -73,10 +73,10 @@ public class NumericRound2TypeComputer extends AbstractResultTypeComputer {
     protected IAType getResultType(ILogicalExpression expr, IAType... strippedInputTypes) throws AlgebricksException {
         ATypeTag tag = strippedInputTypes[0].getTypeTag();
         switch (tag) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
             case ANY:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NumericUnaryFunctionTypeComputer.java
----------------------------------------------------------------------
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
index bc68e10..ea5c2bb 100644
--- 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
@@ -40,17 +40,17 @@ public class NumericUnaryFunctionTypeComputer extends AbstractResultTypeComputer
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag tag = type.getTypeTag();
         switch (tag) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
             case ANY:
                 break;
             default:
-                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16, ATypeTag.INT32,
-                        ATypeTag.INT64, ATypeTag.FLOAT, ATypeTag.DOUBLE);
+                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                        ATypeTag.INTEGER, ATypeTag.BIGINT, ATypeTag.FLOAT, ATypeTag.DOUBLE);
         }
     }
 
@@ -58,10 +58,10 @@ public class NumericUnaryFunctionTypeComputer extends AbstractResultTypeComputer
     protected IAType getResultType(ILogicalExpression expr, IAType... strippedInputTypes) throws AlgebricksException {
         ATypeTag tag = strippedInputTypes[0].getTypeTag();
         switch (tag) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
             case ANY:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java
----------------------------------------------------------------------
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 cb6d90b..a1fb5b0 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,7 +63,7 @@ public class RecordAddFieldsTypeComputer implements IResultTypeComputer {
         IAType type0 = (IAType) env.getType(funcExpr.getArguments().get(0).getValue());
         ARecordType inputRecordType = TypeComputeUtils.extractRecordType(type0);
         if (inputRecordType == null) {
-            throw new TypeMismatchException(funcName, 0, type0.getTypeTag(), ATypeTag.RECORD);
+            throw new TypeMismatchException(funcName, 0, type0.getTypeTag(), ATypeTag.OBJECT);
         }
 
         ILogicalExpression arg1 = funcExpr.getArguments().get(1).getValue();
@@ -82,7 +82,7 @@ public class RecordAddFieldsTypeComputer implements IResultTypeComputer {
         Collections.sort(resultFieldNames);
 
         for (String fieldName : resultFieldNames) {
-            if (inputRecordType.getFieldType(fieldName).getTypeTag() == ATypeTag.RECORD) {
+            if (inputRecordType.getFieldType(fieldName).getTypeTag() == ATypeTag.OBJECT) {
                 ARecordType nestedType = (ARecordType) inputRecordType.getFieldType(fieldName);
                 //Deep Copy prevents altering of input types
                 resultFieldTypes.add(nestedType.deepCopy(nestedType));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordMergeTypeComputer.java
----------------------------------------------------------------------
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 c91a4e3..5167f30 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
@@ -56,12 +56,12 @@ public class RecordMergeTypeComputer implements IResultTypeComputer {
         boolean unknownable = TypeHelper.canBeUnknown(t0) || TypeHelper.canBeUnknown(t1);
         ARecordType recType0 = TypeComputeUtils.extractRecordType(t0);
         if (recType0 == null) {
-            throw new TypeMismatchException(funcName, 0, t0.getTypeTag(), ATypeTag.RECORD);
+            throw new TypeMismatchException(funcName, 0, t0.getTypeTag(), ATypeTag.OBJECT);
         }
 
         ARecordType recType1 = TypeComputeUtils.extractRecordType(t1);
         if (recType1 == null) {
-            throw new TypeMismatchException(funcName, 1, t1.getTypeTag(), ATypeTag.RECORD);
+            throw new TypeMismatchException(funcName, 1, t1.getTypeTag(), ATypeTag.OBJECT);
         }
 
         List<String> resultFieldNames = new ArrayList<>();
@@ -72,7 +72,7 @@ public class RecordMergeTypeComputer implements IResultTypeComputer {
 
         List<IAType> resultFieldTypes = new ArrayList<>();
         for (String fieldName : resultFieldNames) {
-            if (recType0.getFieldType(fieldName).getTypeTag() == ATypeTag.RECORD) {
+            if (recType0.getFieldType(fieldName).getTypeTag() == ATypeTag.OBJECT) {
                 ARecordType nestedType = (ARecordType) recType0.getFieldType(fieldName);
                 //Deep Copy prevents altering of input types
                 resultFieldTypes.add(nestedType.deepCopy(nestedType));
@@ -93,7 +93,7 @@ public class RecordMergeTypeComputer implements IResultTypeComputer {
                     throw new CompilationException(ErrorCode.COMPILATION_DUPLICATE_FIELD_NAME, fieldNames[i]);
                 }
                 // Assuming fieldTypes[i].getTypeTag() = resultFieldType.getTypeTag()
-                if (fieldTypes[i].getTypeTag() == ATypeTag.RECORD) {
+                if (fieldTypes[i].getTypeTag() == ATypeTag.OBJECT) {
                     resultFieldTypes.set(pos, mergedNestedType(fieldNames[i], fieldTypes[i], resultFieldType));
                 }
             } else {
@@ -117,7 +117,7 @@ public class RecordMergeTypeComputer implements IResultTypeComputer {
     }
 
     private IAType mergedNestedType(String fieldName, IAType fieldType1, IAType fieldType0) throws AlgebricksException {
-        if (fieldType1.getTypeTag() != ATypeTag.RECORD || fieldType0.getTypeTag() != ATypeTag.RECORD) {
+        if (fieldType1.getTypeTag() != ATypeTag.OBJECT || fieldType0.getTypeTag() != ATypeTag.OBJECT) {
             throw new CompilationException(ErrorCode.COMPILATION_DUPLICATE_FIELD_NAME, fieldName);
         }
 
@@ -129,7 +129,7 @@ public class RecordMergeTypeComputer implements IResultTypeComputer {
             int pos = resultType.getFieldIndex(fname);
             if (pos >= 0) {
                 // If a sub-record do merge, else ignore and let the values decide what to do
-                if (fieldType1Copy.getFieldTypes()[i].getTypeTag() == ATypeTag.RECORD) {
+                if (fieldType1Copy.getFieldTypes()[i].getTypeTag() == ATypeTag.OBJECT) {
                     IAType[] oldTypes = resultType.getFieldTypes();
                     oldTypes[pos] = mergedNestedType(fname, fieldType1Copy.getFieldTypes()[i],
                             resultType.getFieldTypes()[pos]);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java
index 660297c..ceba3fb 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java
@@ -36,8 +36,8 @@ public class RecordPairsTypeComputer extends AbstractResultTypeComputer {
     @Override
     protected void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag typeTag = type.getTypeTag();
-        if (typeTag != ATypeTag.RECORD) {
-            throw new TypeMismatchException(funcName, argIndex, typeTag, ATypeTag.RECORD);
+        if (typeTag != ATypeTag.OBJECT) {
+            throw new TypeMismatchException(funcName, argIndex, typeTag, ATypeTag.OBJECT);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordRemoveFieldsTypeComputer.java
----------------------------------------------------------------------
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 fc2ebff..3bd64d6 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
@@ -78,7 +78,7 @@ public class RecordRemoveFieldsTypeComputer implements IResultTypeComputer {
                 String fn = ((AString) item).getStringValue();
                 fieldNameSet.add(fn);
                 break;
-            case ORDEREDLIST:
+            case ARRAY:
                 AOrderedList pathOrdereList = (AOrderedList) item;
                 String fieldName = ((AString) pathOrdereList.getItem(0)).getStringValue();
                 fieldNameSet.add(fieldName);
@@ -169,7 +169,7 @@ public class RecordRemoveFieldsTypeComputer implements IResultTypeComputer {
         IAType inputListType = (IAType) env.getType(arg1);
         AOrderedListType inputOrderedListType = TypeComputeUtils.extractOrderedListType(inputListType);
         if (inputOrderedListType == null) {
-            throw new TypeMismatchException(funcName, 1, inputListType.getTypeTag(), ATypeTag.ORDEREDLIST);
+            throw new TypeMismatchException(funcName, 1, inputListType.getTypeTag(), ATypeTag.ARRAY);
         }
 
         ATypeTag tt = inputOrderedListType.getItemType().getTypeTag();
@@ -202,7 +202,7 @@ public class RecordRemoveFieldsTypeComputer implements IResultTypeComputer {
     private void addField(ARecordType inputRecordType, String fieldName, List<String> resultFieldNames,
             List<IAType> resultFieldTypes) throws AlgebricksException {
         resultFieldNames.add(fieldName);
-        if (inputRecordType.getFieldType(fieldName).getTypeTag() == ATypeTag.RECORD) {
+        if (inputRecordType.getFieldType(fieldName).getTypeTag() == ATypeTag.OBJECT) {
             ARecordType nestedType = (ARecordType) inputRecordType.getFieldType(fieldName);
             //Deep Copy prevents altering of input types
             resultFieldTypes.add(nestedType.deepCopy(nestedType));
@@ -222,17 +222,14 @@ public class RecordRemoveFieldsTypeComputer implements IResultTypeComputer {
         for (int i = 0; i < fieldNames.length; i++) {
             if (!fieldNameSet.contains(fieldNames[i])) { // The main field is to be kept
                 addField(inputRecordType, fieldNames[i], resultFieldNames, resultFieldTypes);
-            } else if (!pathList.isEmpty()) { // Further check needed for nested fields
-                if (fieldTypes[i].getTypeTag() == ATypeTag.RECORD) {
-                    ARecordType subRecord = (ARecordType) fieldTypes[i];
-
-                    fieldPathStack.push(fieldNames[i]);
-                    subRecord = deepCheckAndCopy(fieldPathStack, subRecord, pathList, inputRecordType.isOpen());
-                    fieldPathStack.pop();
-                    if (subRecord != null) {
-                        resultFieldNames.add(fieldNames[i]);
-                        resultFieldTypes.add(subRecord);
-                    }
+            } else if (!pathList.isEmpty() && fieldTypes[i].getTypeTag() == ATypeTag.OBJECT) {
+                ARecordType subRecord = (ARecordType) fieldTypes[i];
+                fieldPathStack.push(fieldNames[i]);
+                subRecord = deepCheckAndCopy(fieldPathStack, subRecord, pathList, inputRecordType.isOpen());
+                fieldPathStack.pop();
+                if (subRecord != null) {
+                    resultFieldNames.add(fieldNames[i]);
+                    resultFieldTypes.add(subRecord);
                 }
             }
         }
@@ -300,7 +297,7 @@ public class RecordRemoveFieldsTypeComputer implements IResultTypeComputer {
         for (int i = 0; i < srcFieldNames.length; i++) {
             fieldPath.push(srcFieldNames[i]);
             if (!isRemovePath(fieldPath, pathList)) {
-                if (srcFieldTypes[i].getTypeTag() == ATypeTag.RECORD) {
+                if (srcFieldTypes[i].getTypeTag() == ATypeTag.OBJECT) {
                     ARecordType subRecord = (ARecordType) srcFieldTypes[i];
                     subRecord = deepCheckAndCopy(fieldPath, subRecord, pathList, isOpen);
                     if (subRecord != null) {
@@ -326,20 +323,20 @@ public class RecordRemoveFieldsTypeComputer implements IResultTypeComputer {
     private static ARecordType getRecordTypeFromType(String funcName, IAType type0)
             throws AlgebricksException {
         switch (type0.getTypeTag()) {
-            case RECORD:
+            case OBJECT:
                 return (ARecordType) type0;
             case ANY:
                 return DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
             case UNION:
                 IAType t1 = ((AUnionType) type0).getActualType();
-                if (t1.getTypeTag() == ATypeTag.RECORD) {
+                if (t1.getTypeTag() == ATypeTag.OBJECT) {
                     return (ARecordType) t1;
                 } else if (t1.getTypeTag() == ATypeTag.ANY) {
                     return DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
                 }
                 // Falls through for other cases.
             default:
-                throw new TypeMismatchException(funcName, 0, type0.getTypeTag(), ATypeTag.RECORD);
+                throw new TypeMismatchException(funcName, 0, type0.getTypeTag(), ATypeTag.OBJECT);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/ScalarVersionOfAggregateResultType.java
----------------------------------------------------------------------
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 0eeba85..fae3d90 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
@@ -38,8 +38,8 @@ public class ScalarVersionOfAggregateResultType extends AbstractResultTypeComput
     @Override
     public void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag tag = type.getTypeTag();
-        if (tag != ATypeTag.ANY && tag != ATypeTag.ORDEREDLIST && tag != ATypeTag.UNORDEREDLIST) {
-            throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.ORDEREDLIST, ATypeTag.UNORDEREDLIST);
+        if (tag != ATypeTag.ANY && tag != ATypeTag.ARRAY && tag != ATypeTag.MULTISET) {
+            throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.ARRAY, ATypeTag.MULTISET);
         }
     }
 
@@ -49,7 +49,7 @@ public class ScalarVersionOfAggregateResultType extends AbstractResultTypeComput
         if (tag == ATypeTag.ANY) {
             return BuiltinType.ANY;
         }
-        if (tag != ATypeTag.ORDEREDLIST && tag != ATypeTag.UNORDEREDLIST) {
+        if (tag != ATypeTag.ARRAY && tag != ATypeTag.MULTISET) {
             return strippedInputTypes[0];
         }
         AbstractCollectionType act = (AbstractCollectionType) strippedInputTypes[0];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SleepTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SleepTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SleepTypeComputer.java
index 6b885e3..b93f215 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SleepTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SleepTypeComputer.java
@@ -32,14 +32,14 @@ public class SleepTypeComputer extends AbstractResultTypeComputer {
     public void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         if (argIndex == 1) {
             switch (type.getTypeTag()) {
-                case INT8:
-                case INT16:
-                case INT32:
-                case INT64:
+                case TINYINT:
+                case SMALLINT:
+                case INTEGER:
+                case BIGINT:
                     break;
                 default:
-                    throw new TypeMismatchException(funcName, argIndex, type.getTypeTag(), ATypeTag.INT8,
-                            ATypeTag.INT16, ATypeTag.INT32, ATypeTag.INT64);
+                    throw new TypeMismatchException(funcName, argIndex, type.getTypeTag(), ATypeTag.TINYINT,
+                            ATypeTag.SMALLINT, ATypeTag.INTEGER, ATypeTag.BIGINT);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringIntToStringTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringIntToStringTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringIntToStringTypeComputer.java
index 21fbed3..5b3cf54 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringIntToStringTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/StringIntToStringTypeComputer.java
@@ -37,14 +37,14 @@ public class StringIntToStringTypeComputer extends AbstractResultTypeComputer {
         }
         if (argIndex == 1) {
             switch (tag) {
-                case INT8:
-                case INT16:
-                case INT32:
-                case INT64:
+                case TINYINT:
+                case SMALLINT:
+                case INTEGER:
+                case BIGINT:
                     break;
                 default:
-                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16,
-                            ATypeTag.INT32, ATypeTag.INT64);
+                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                            ATypeTag.INTEGER, ATypeTag.BIGINT);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java
----------------------------------------------------------------------
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 cdfb723..7867cf6 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
@@ -47,31 +47,31 @@ public class SubsetCollectionTypeComputer implements IResultTypeComputer {
         IAType t = (IAType) env.getType(fun.getArguments().get(0).getValue());
         ATypeTag actualTypeTag = t.getTypeTag();
         switch (actualTypeTag) {
-            case UNORDEREDLIST:
-            case ORDEREDLIST: {
+            case MULTISET:
+            case ARRAY: {
                 AbstractCollectionType act = (AbstractCollectionType) t;
                 return act.getItemType();
             }
             case UNION: {
                 AUnionType ut = (AUnionType) t;
                 if (!ut.isUnknownableType()) {
-                    throw new TypeMismatchException(funcName, 0, actualTypeTag, ATypeTag.UNORDEREDLIST,
-                            ATypeTag.ORDEREDLIST);
+                    throw new TypeMismatchException(funcName, 0, actualTypeTag, ATypeTag.MULTISET,
+                            ATypeTag.ARRAY);
                 }
                 IAType t2 = ut.getActualType();
                 ATypeTag tag2 = t2.getTypeTag();
-                if (tag2 == ATypeTag.UNORDEREDLIST || tag2 == ATypeTag.ORDEREDLIST) {
+                if (tag2 == ATypeTag.MULTISET || tag2 == ATypeTag.ARRAY) {
                     AbstractCollectionType act = (AbstractCollectionType) t2;
                     return act.getItemType();
                 }
-                throw new TypeMismatchException(funcName, 0, actualTypeTag, ATypeTag.UNORDEREDLIST,
-                        ATypeTag.ORDEREDLIST);
+                throw new TypeMismatchException(funcName, 0, actualTypeTag, ATypeTag.MULTISET,
+                        ATypeTag.ARRAY);
             }
             case ANY:
                 return BuiltinType.ANY;
             default:
-                throw new TypeMismatchException(funcName, 0, actualTypeTag, ATypeTag.UNORDEREDLIST,
-                        ATypeTag.ORDEREDLIST);
+                throw new TypeMismatchException(funcName, 0, actualTypeTag, ATypeTag.MULTISET,
+                        ATypeTag.ARRAY);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubstringTypeComputer.java
----------------------------------------------------------------------
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 87a3790..74a9530 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
@@ -37,14 +37,14 @@ public class SubstringTypeComputer extends AbstractResultTypeComputer {
         }
         if (argIndex > 0 && argIndex <= 2) {
             switch (tag) {
-                case INT8:
-                case INT16:
-                case INT32:
-                case INT64:
+                case TINYINT:
+                case SMALLINT:
+                case INTEGER:
+                case BIGINT:
                     break;
                 default:
-                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16,
-                            ATypeTag.INT32, ATypeTag.INT64);
+                    throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                            ATypeTag.INTEGER, ATypeTag.BIGINT);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
----------------------------------------------------------------------
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
index 9110c12..a1bbb86 100644
--- 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
@@ -188,11 +188,11 @@ public class TypeComputeUtils {
 
     public static ARecordType extractRecordType(IAType t) {
         switch (t.getTypeTag()) {
-            case RECORD:
+            case OBJECT:
                 return (ARecordType) t;
             case UNION:
                 IAType innerType = ((AUnionType) t).getActualType();
-                if (innerType.getTypeTag() == ATypeTag.RECORD) {
+                if (innerType.getTypeTag() == ATypeTag.OBJECT) {
                     return (ARecordType) innerType;
                 } else {
                     return null;
@@ -205,13 +205,13 @@ public class TypeComputeUtils {
     }
 
     public static AOrderedListType extractOrderedListType(IAType t) {
-        if (t.getTypeTag() == ATypeTag.ORDEREDLIST) {
+        if (t.getTypeTag() == ATypeTag.ARRAY) {
             return (AOrderedListType) t;
         }
 
         if (t.getTypeTag() == ATypeTag.UNION) {
             IAType innerType = ((AUnionType) t).getActualType();
-            if (innerType.getTypeTag() == ATypeTag.ORDEREDLIST) {
+            if (innerType.getTypeTag() == ATypeTag.ARRAY) {
                 return (AOrderedListType) innerType;
             }
         }
@@ -219,13 +219,13 @@ public class TypeComputeUtils {
     }
 
     public static AUnorderedListType extractUnorderedListType(IAType t) {
-        if (t.getTypeTag() == ATypeTag.UNORDEREDLIST) {
+        if (t.getTypeTag() == ATypeTag.MULTISET) {
             return (AUnorderedListType) t;
         }
         if (t.getTypeTag() == ATypeTag.UNION) {
             AUnionType unionType = (AUnionType) t;
             IAType innerType = unionType.getActualType();
-            if (innerType.getTypeTag() == ATypeTag.UNORDEREDLIST) {
+            if (innerType.getTypeTag() == ATypeTag.MULTISET) {
                 return (AUnorderedListType) innerType;
             }
         }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/UnaryMinusTypeComputer.java
----------------------------------------------------------------------
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
index 5c734d2..f815f33 100644
--- 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
@@ -36,16 +36,16 @@ public class UnaryMinusTypeComputer extends AbstractResultTypeComputer {
     public void checkArgType(String funcName, int argIndex, IAType type) throws AlgebricksException {
         ATypeTag tag = type.getTypeTag();
         switch (tag) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
                 break;
             default:
-                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.INT8, ATypeTag.INT16, ATypeTag.INT32,
-                        ATypeTag.INT64, ATypeTag.FLOAT, ATypeTag.DOUBLE);
+                throw new TypeMismatchException(funcName, argIndex, tag, ATypeTag.TINYINT, ATypeTag.SMALLINT,
+                        ATypeTag.INTEGER, ATypeTag.BIGINT, ATypeTag.FLOAT, ATypeTag.DOUBLE);
         }
     }
 
@@ -53,10 +53,10 @@ public class UnaryMinusTypeComputer extends AbstractResultTypeComputer {
     public IAType getResultType(ILogicalExpression expr, IAType... knownTypes) throws AlgebricksException {
         ATypeTag tag = knownTypes[0].getTypeTag();
         switch (tag) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
             case ANY:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
index 9f7f360..1c1bdbc 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
@@ -18,8 +18,9 @@
  */
 package org.apache.asterix.om.types;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.om.base.IAObject;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AOrderedListType extends AbstractCollectionType {
@@ -38,12 +39,12 @@ public class AOrderedListType extends AbstractCollectionType {
 
     @Override
     public ATypeTag getTypeTag() {
-        return ATypeTag.ORDEREDLIST;
+        return ATypeTag.ARRAY;
     }
 
     @Override
     public String getDisplayName() {
-        return "AOrderedList";
+        return "array";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
----------------------------------------------------------------------
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 77c491f..baaed59 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
@@ -157,7 +157,7 @@ public class ARecordType extends AbstractComplexType {
 
     @Override
     public ATypeTag getTypeTag() {
-        return ATypeTag.RECORD;
+        return ATypeTag.OBJECT;
     }
 
     public boolean isOpen() {
@@ -214,7 +214,7 @@ public class ARecordType extends AbstractComplexType {
             if (subRecordType.getTypeTag().equals(ATypeTag.UNION)) {
                 //enforced SubType
                 subRecordType = ((AUnionType) subRecordType).getActualType();
-                if (subRecordType.getTypeTag() != ATypeTag.RECORD) {
+                if (subRecordType.getTypeTag() != ATypeTag.OBJECT) {
                     throw new AsterixException(
                             "Field accessor is not defined for values of type " + subRecordType.getTypeTag());
                 }
@@ -264,7 +264,7 @@ public class ARecordType extends AbstractComplexType {
     public ARecordType deepCopy(ARecordType type) {
         IAType[] newTypes = new IAType[type.fieldNames.length];
         for (int i = 0; i < type.fieldTypes.length; i++) {
-            if (type.fieldTypes[i].getTypeTag() == ATypeTag.RECORD) {
+            if (type.fieldTypes[i].getTypeTag() == ATypeTag.OBJECT) {
                 newTypes[i] = deepCopy((ARecordType) type.fieldTypes[i]);
             } else {
                 newTypes[i] = type.fieldTypes[i];
@@ -275,7 +275,7 @@ public class ARecordType extends AbstractComplexType {
 
     @Override
     public String getDisplayName() {
-        return "ARecord";
+        return "object";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ATypeTag.java
----------------------------------------------------------------------
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 ec1805f..4e1f7f6 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
@@ -27,10 +27,10 @@ import java.util.List;
  * non-primitive type in the object model
  */
 public enum ATypeTag implements IEnumSerializer {
-    INT8(1),
-    INT16(2),
-    INT32(3),
-    INT64(4),
+    TINYINT(1),
+    SMALLINT(2),
+    INTEGER(3),
+    BIGINT(4),
     UINT8(5),
     UINT16(6),
     UINT32(7),
@@ -48,10 +48,10 @@ public enum ATypeTag implements IEnumSerializer {
     DURATION(19),
     POINT(20),
     POINT3D(21),
-    ORDEREDLIST(22),
-    UNORDEREDLIST(23),
-    RECORD(24),
-    SPARSERECORD(25),
+    ARRAY(22),
+    MULTISET(23),
+    OBJECT(24),
+    SPARSOBJECT(25),
     UNION(26),
     ENUM(27),
     TYPE(28),
@@ -75,10 +75,10 @@ public enum ATypeTag implements IEnumSerializer {
     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();
-    public static final byte SERIALIZED_INT32_TYPE_TAG = INT32.serialize();
-    public static final byte SERIALIZED_ORDEREDLIST_TYPE_TAG = ORDEREDLIST.serialize();
-    public static final byte SERIALIZED_UNORDEREDLIST_TYPE_TAG = UNORDEREDLIST.serialize();
+    public static final byte SERIALIZED_RECORD_TYPE_TAG = OBJECT.serialize();
+    public static final byte SERIALIZED_INT32_TYPE_TAG = INTEGER.serialize();
+    public static final byte SERIALIZED_ORDEREDLIST_TYPE_TAG = ARRAY.serialize();
+    public static final byte SERIALIZED_UNORDEREDLIST_TYPE_TAG = MULTISET.serialize();
     public static final byte SERIALIZED_POLYGON_TYPE_TAG = POLYGON.serialize();
     public static final byte SERIALIZED_DATE_TYPE_TAG = DATE.serialize();
     public static final byte SERIALIZED_TIME_TYPE_TAG = TIME.serialize();
@@ -93,9 +93,9 @@ public enum ATypeTag implements IEnumSerializer {
     public static final byte SERIALIZED_LINE_TYPE_TAG = LINE.serialize();
     public static final byte SERIALIZED_RECTANGLE_TYPE_TAG = RECTANGLE.serialize();
     public static final byte SERIALIZED_BOOLEAN_TYPE_TAG = BOOLEAN.serialize();
-    public static final byte SERIALIZED_INT8_TYPE_TAG = INT8.serialize();
-    public static final byte SERIALIZED_INT16_TYPE_TAG = INT16.serialize();
-    public static final byte SERIALIZED_INT64_TYPE_TAG = INT64.serialize();
+    public static final byte SERIALIZED_INT8_TYPE_TAG = TINYINT.serialize();
+    public static final byte SERIALIZED_INT16_TYPE_TAG = SMALLINT.serialize();
+    public static final byte SERIALIZED_INT64_TYPE_TAG = BIGINT.serialize();
     public static final byte SERIALIZED_FLOAT_TYPE_TAG = FLOAT.serialize();
     public static final byte SERIALIZED_BINARY_TYPE_TAG = BINARY.serialize();
     public static final byte SERIALIZED_UUID_TYPE_TAG = UUID.serialize();
@@ -129,7 +129,7 @@ public enum ATypeTag implements IEnumSerializer {
     }
 
     public boolean isDerivedType() {
-        return this == ATypeTag.RECORD || this == ATypeTag.ORDEREDLIST || this == ATypeTag.UNORDEREDLIST
+        return this == ATypeTag.OBJECT || this == ATypeTag.ARRAY || this == ATypeTag.MULTISET
                 || this == ATypeTag.UNION;
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
----------------------------------------------------------------------
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 2a06976..ace3b6c 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
@@ -127,7 +127,7 @@ public class AUnionType extends AbstractComplexType {
 
     @Override
     public String getDisplayName() {
-        return "AUnion";
+        return "union";
     }
 
     @Override
@@ -138,7 +138,7 @@ public class AUnionType extends AbstractComplexType {
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
-        sb.append("UNION(");
+        sb.append("union(");
         Iterator<IAType> iter = unionList.iterator();
         if (iter.hasNext()) {
             IAType t0 = iter.next();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java
index b4705ac..6de918a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnorderedListType.java
@@ -18,9 +18,9 @@
  */
 package org.apache.asterix.om.types;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.om.base.AUnorderedList;
 import org.apache.asterix.om.base.IAObject;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 public class AUnorderedListType extends AbstractCollectionType {
@@ -39,12 +39,12 @@ public class AUnorderedListType extends AbstractCollectionType {
 
     @Override
     public ATypeTag getTypeTag() {
-        return ATypeTag.UNORDEREDLIST;
+        return ATypeTag.MULTISET;
     }
 
     @Override
     public String getDisplayName() {
-        return "AUnorderedList";
+        return "multiset";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
----------------------------------------------------------------------
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 661fd3c..3037e7c 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
@@ -80,7 +80,7 @@ public abstract class BuiltinType implements IAType {
 
         @Override
         public ATypeTag getTypeTag() {
-            return ATypeTag.INT8;
+            return ATypeTag.TINYINT;
         }
 
         @Override
@@ -108,7 +108,7 @@ public abstract class BuiltinType implements IAType {
 
         @Override
         public ATypeTag getTypeTag() {
-            return ATypeTag.INT16;
+            return ATypeTag.SMALLINT;
         }
 
         @Override
@@ -136,7 +136,7 @@ public abstract class BuiltinType implements IAType {
 
         @Override
         public ATypeTag getTypeTag() {
-            return ATypeTag.INT32;
+            return ATypeTag.INTEGER;
         }
 
         @Override
@@ -159,7 +159,7 @@ public abstract class BuiltinType implements IAType {
 
         @Override
         public ATypeTag getTypeTag() {
-            return ATypeTag.INT64;
+            return ATypeTag.BIGINT;
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/TypeTagUtil.java
----------------------------------------------------------------------
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 1b0beab..1af3578 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
@@ -25,13 +25,13 @@ public class TypeTagUtil {
 
     public static IAType getBuiltinTypeByTag(ATypeTag typeTag) throws AsterixException {
         switch (typeTag) {
-            case INT8:
+            case TINYINT:
                 return BuiltinType.AINT8;
-            case INT16:
+            case SMALLINT:
                 return BuiltinType.AINT16;
-            case INT32:
+            case INTEGER:
                 return BuiltinType.AINT32;
-            case INT64:
+            case BIGINT:
                 return BuiltinType.AINT64;
             case BINARY:
                 return BuiltinType.ABINARY;
@@ -81,11 +81,11 @@ public class TypeTagUtil {
                 return BuiltinType.ADAYTIMEDURATION;
             case UUID:
                 return BuiltinType.AUUID;
-            case RECORD:
+            case OBJECT:
                 return RecordUtil.FULLY_OPEN_RECORD_TYPE;
-            case UNORDEREDLIST:
+            case MULTISET:
                 return AUnorderedListType.FULLY_OPEN_UNORDEREDLIST_TYPE;
-            case ORDEREDLIST:
+            case ARRAY:
                 return AOrderedListType.FULL_OPEN_ORDEREDLIST_TYPE;
             default:
                 throw new AsterixException("Typetag " + typeTag + " is not a built-in type");


Mime
View raw message