asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [5/5] asterixdb git commit: Rename several type tags to improve error messages:
Date Wed, 10 May 2017 17:52:02 GMT
Rename several type tags to improve error messages:

- orderedlist -> array
- unorderedlist -> multiset
- record -> object
- int8 -> tinyint
- int16 -> smallint
- int32 -> integer
- int64 -> bigint

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


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

Branch: refs/heads/master
Commit: ac5108eca1dfa52a03e43b1daec81aa8a76d0822
Parents: 049d541
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Tue May 9 17:31:08 2017 -0700
Committer: Yingyi Bu <buyingyi@gmail.com>
Committed: Wed May 10 10:51:33 2017 -0700

----------------------------------------------------------------------
 .../physical/InvertedIndexPOperator.java        |   2 +-
 .../asterix/optimizer/base/FuzzyUtils.java      |   4 +-
 .../rules/ByNameToByIndexFieldAccessRule.java   |   4 +-
 .../FullTextContainsParameterCheckRule.java     |   4 +-
 .../rules/IntroduceDynamicTypeCastRule.java     |   2 +-
 ...IntroduceSecondaryIndexInsertDeleteRule.java |   6 +-
 .../rules/MetaFunctionToMetaVariableRule.java   |   2 +-
 .../optimizer/rules/PushFieldAccessRule.java    |   4 +-
 .../optimizer/rules/ResolveVariableRule.java    |   2 +-
 .../optimizer/rules/SimilarityCheckRule.java    |   2 +-
 .../am/AbstractIntroduceAccessMethodRule.java   |   4 +-
 .../optimizer/rules/am/AccessMethodUtils.java   |  12 +-
 .../am/IntroduceLSMComponentFilterRule.java     |   4 +-
 .../rules/am/InvertedIndexAccessMethod.java     |  38 +--
 .../rules/am/OptimizableOperatorSubTree.java    |   2 +-
 .../rules/typecast/StaticTypeCastUtil.java      |   8 +-
 .../SqlppExpressionToPlanTranslator.java        |   4 +-
 .../asterix/translator/util/ValidateUtil.java   |  34 +--
 .../asterix/app/translator/QueryTranslator.java |   4 +-
 .../app/data/gen/ARecordValueGenerator.java     |   4 +-
 .../asterix/app/data/gen/TupleGenerator.java    |   4 +-
 .../src/test/resources/metadata/testsuite.xml   |   4 +-
 .../src/test/resources/runtimets/testsuite.xml  |  14 +-
 .../resources/runtimets/testsuite_sqlpp.xml     |  16 +-
 .../asterix/external/api/IDataParser.java       |   6 +-
 .../external/library/JTypeObjectFactory.java    |  10 +-
 .../external/library/JavaFunctionHelper.java    |   6 +-
 .../external/library/ResultCollector.java       |   6 +-
 .../library/RuntimeExternalFunctionUtil.java    |   4 +-
 .../external/library/java/JObjectAccessors.java |  20 +-
 .../external/library/java/JObjectUtil.java      |  20 +-
 .../asterix/external/library/java/JObjects.java |   4 +-
 .../asterix/external/parser/ADMDataParser.java  |  46 +--
 .../external/parser/HiveRecordParser.java       |  24 +-
 .../asterix/external/parser/TweetParser.java    |  10 +-
 .../external/util/ExternalDataUtils.java        |   4 +-
 .../asterix/external/library/ClassAdParser.java |  48 +--
 .../lang/common/util/LangRecordParseUtil.java   |   4 +-
 .../apache/asterix/metadata/MetadataNode.java   |   2 +-
 .../metadata/declared/LoadableDataSource.java   |   2 +-
 .../metadata/declared/MetadataProvider.java     |   6 +-
 .../DatatypeTupleTranslator.java                |   6 +-
 .../metadata/feeds/FeedMetadataUtil.java        |   2 +-
 .../functions/ExternalFunctionCompilerUtil.java |   6 +-
 .../asterix/builders/ListBuilderFactory.java    |   2 +-
 .../asterix/builders/OrderedListBuilder.java    |   2 +-
 .../asterix/builders/UnorderedListBuilder.java  |   2 +-
 .../dataflow/data/common/TypeResolverUtil.java  |   8 +-
 .../AObjectAscBinaryComparatorFactory.java      |  22 +-
 .../ListItemBinaryComparatorFactory.java        |   4 +-
 .../AMurmurHash3BinaryHashFunctionFamily.java   |   8 +-
 .../printers/adm/AObjectPrinterFactory.java     |  14 +-
 .../adm/AOrderedlistPrinterFactory.java         |   2 +-
 .../printers/adm/ARecordPrinterFactory.java     |   2 +-
 .../adm/AUnorderedlistPrinterFactory.java       |   2 +-
 .../printers/csv/AObjectPrinterFactory.java     |  10 +-
 .../printers/csv/ARecordPrinterFactory.java     |   2 +-
 .../json/clean/AObjectPrinterFactory.java       |  14 +-
 .../json/clean/AOrderedlistPrinterFactory.java  |   2 +-
 .../json/clean/ARecordPrinterFactory.java       |   2 +-
 .../clean/AUnorderedlistPrinterFactory.java     |   2 +-
 .../json/lossless/AObjectPrinterFactory.java    |  14 +-
 .../lossless/AOrderedlistPrinterFactory.java    |   2 +-
 .../json/lossless/ARecordPrinterFactory.java    |   2 +-
 .../lossless/AUnorderedlistPrinterFactory.java  |   2 +-
 .../serde/AObjectSerializerDeserializer.java    |  28 +-
 .../AOrderedListSerializerDeserializer.java     |   4 +-
 .../AUnorderedListSerializerDeserializer.java   |   4 +-
 .../PrimitiveValueProviderFactory.java          |   2 +-
 .../nontagged/ADMPrinterFactoryProvider.java    |  16 +-
 .../BinaryComparatorFactoryProvider.java        |   8 +-
 .../BinaryHashFunctionFamilyProvider.java       |   3 +-
 .../BinaryTokenizerFactoryProvider.java         |  10 +-
 .../nontagged/CSVPrinterFactoryProvider.java    |  16 +-
 .../CleanJSONPrinterFactoryProvider.java        |  16 +-
 .../LinearizeComparatorFactoryProvider.java     |   4 +-
 .../LosslessJSONPrinterFactoryProvider.java     |  16 +-
 .../NormalizedKeyComputerFactoryProvider.java   |   8 +-
 .../SerializerDeserializerProvider.java         |  14 +-
 .../formats/nontagged/TypeTraitProvider.java    |   8 +-
 .../om/pointables/PointableAllocator.java       |  10 +-
 .../pointables/base/DefaultOpenFieldType.java   |   6 +-
 .../asterix/om/pointables/cast/AListCaster.java |  12 +-
 .../impl/CollectionMemberResultType.java        |   6 +-
 .../impl/CollectionToSequenceTypeComputer.java  |   2 +-
 .../impl/FieldAccessByIndexResultType.java      |  10 +-
 .../impl/FieldAccessByNameResultType.java       |   6 +-
 .../impl/FieldAccessNestedResultType.java       |  12 +-
 .../FullTextContainsResultTypeComputer.java     |  12 +-
 .../impl/MinMaxAggTypeComputer.java             |   8 +-
 .../impl/NonTaggedGetItemResultType.java        |   8 +-
 .../impl/NumericAddSubMulDivTypeComputer.java   |  64 ++--
 .../impl/NumericAggTypeComputer.java            |  16 +-
 ...NumericDoubleOutputFunctionTypeComputer.java |  12 +-
 .../NumericInt8OutputFunctionTypeComputer.java  |  12 +-
 .../impl/NumericRound2TypeComputer.java         |  32 +-
 .../impl/NumericUnaryFunctionTypeComputer.java  |  20 +-
 .../impl/RecordAddFieldsTypeComputer.java       |   4 +-
 .../impl/RecordMergeTypeComputer.java           |  12 +-
 .../impl/RecordPairsTypeComputer.java           |   4 +-
 .../impl/RecordRemoveFieldsTypeComputer.java    |  33 +--
 .../ScalarVersionOfAggregateResultType.java     |   6 +-
 .../om/typecomputer/impl/SleepTypeComputer.java |  12 +-
 .../impl/StringIntToStringTypeComputer.java     |  12 +-
 .../impl/SubsetCollectionTypeComputer.java      |  18 +-
 .../impl/SubstringTypeComputer.java             |  12 +-
 .../om/typecomputer/impl/TypeComputeUtils.java  |  12 +-
 .../impl/UnaryMinusTypeComputer.java            |  20 +-
 .../asterix/om/types/AOrderedListType.java      |   7 +-
 .../apache/asterix/om/types/ARecordType.java    |   8 +-
 .../org/apache/asterix/om/types/ATypeTag.java   |  32 +-
 .../org/apache/asterix/om/types/AUnionType.java |   4 +-
 .../asterix/om/types/AUnorderedListType.java    |   8 +-
 .../apache/asterix/om/types/BuiltinType.java    |   8 +-
 .../apache/asterix/om/types/TypeTagUtil.java    |  14 +-
 .../om/types/hierachy/ATypeHierarchy.java       | 296 ++++++++++---------
 .../AbstractIntegerTypeConvertComputer.java     |  42 +--
 .../DoubleToInt16TypeConvertComputer.java       |   8 +-
 .../DoubleToInt32TypeConvertComputer.java       |   8 +-
 .../DoubleToInt64TypeConvertComputer.java       |   8 +-
 .../DoubleToInt8TypeConvertComputer.java        |   8 +-
 .../FloatToInt16TypeConvertComputer.java        |   8 +-
 .../FloatToInt32TypeConvertComputer.java        |   8 +-
 .../FloatToInt64TypeConvertComputer.java        |   8 +-
 .../FloatToInt8TypeConvertComputer.java         |   8 +-
 .../IntegerToDoubleTypeConvertComputer.java     |   8 +-
 .../IntegerToFloatTypeConvertComputer.java      |   8 +-
 .../IntegerToInt16TypeConvertComputer.java      |   2 +-
 .../IntegerToInt32TypeConvertComputer.java      |   2 +-
 .../IntegerToInt64TypeConvertComputer.java      |   2 +-
 .../IntegerToInt8TypeConvertComputer.java       |   2 +-
 .../om/utils/ConstantExpressionUtil.java        |   4 +-
 .../asterix/om/utils/NonTaggedFormatUtil.java   |  22 +-
 ...bstractSerializableAvgAggregateFunction.java |  10 +-
 ...bstractSerializableSumAggregateFunction.java |  16 +-
 .../std/AbstractAvgAggregateFunction.java       |  10 +-
 .../std/AbstractSumAggregateFunction.java       |  16 +-
 .../common/AbstractAsterixListIterator.java     |   8 +-
 .../common/EditDistanceCheckEvaluator.java      |   2 +-
 .../common/EditDistanceContainsEvaluator.java   |   2 +-
 .../common/EditDistanceEvaluator.java           |   6 +-
 .../common/FullTextContainsEvaluator.java       |  16 +-
 .../runtime/evaluators/common/ListAccessor.java |   2 +-
 .../common/SimilarityJaccardEvaluator.java      |   8 +-
 .../comparisons/ComparisonHelper.java           |  56 ++--
 .../AStringConstructorDescriptor.java           |  14 +-
 .../AbstractNumericArithmeticEval.java          |   8 +-
 .../functions/CastTypeDescriptor.java           |   6 +-
 .../functions/CodePointToStringDescriptor.java  |  10 +-
 .../EditDistanceListIsFilterableDescriptor.java |   4 +-
 .../functions/NumericSubtractDescriptor.java    |   8 +-
 .../binary/AbstractSubBinaryEvaluator.java      |   2 +-
 .../records/FieldAccessNestedEvalFactory.java   |   4 +-
 .../records/RecordAddFieldsDescriptor.java      |   2 +-
 .../functions/records/RecordFieldsUtil.java     |   8 +-
 .../records/RecordMergeDescriptor.java          |   4 +-
 .../records/RecordRemoveFieldsEvalFactory.java  |   6 +-
 .../DatetimeFromUnixTimeInMsDescriptor.java     |   8 +-
 .../DatetimeFromUnixTimeInSecsDescriptor.java   |   8 +-
 .../DurationFromMillisecondsDescriptor.java     |   8 +-
 .../runtime/formats/NonTaggedDataFormat.java    |  24 +-
 .../asterix/tools/datagen/AdmDataGen.java       |  21 +-
 162 files changed, 957 insertions(+), 963 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
index 3d7ba34..4e3ae55 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/InvertedIndexPOperator.java
@@ -171,7 +171,7 @@ public class InvertedIndexPOperator extends IndexSearchPOperator {
                         "Cannot use " + numSecondaryKeys + " fields as a key for an inverted index. "
                                 + "There can be only one field as a key for the inverted index index.");
             }
-            if (itemType.getTypeTag() != ATypeTag.RECORD) {
+            if (itemType.getTypeTag() != ATypeTag.OBJECT) {
                 throw new AlgebricksException("Only record types can be indexed.");
             }
             ARecordType recordType = (ARecordType) itemType;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/FuzzyUtils.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/FuzzyUtils.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/FuzzyUtils.java
index f888ee0..503a631 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/FuzzyUtils.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/FuzzyUtils.java
@@ -50,8 +50,8 @@ public class FuzzyUtils {
         switch (inputTag) {
             case STRING:
                 return BuiltinFunctions.COUNTHASHED_WORD_TOKENS;
-            case UNORDEREDLIST:
-            case ORDEREDLIST:
+            case MULTISET:
+            case ARRAY:
             case ANY:
                 return null;
             default:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ByNameToByIndexFieldAccessRule.java
----------------------------------------------------------------------
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 c7d5ad2..b3b0ad7 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
@@ -113,7 +113,7 @@ public class ByNameToByIndexFieldAccessRule implements IAlgebraicRewriteRule {
     // Rewrites field-access-by-name into field-access-by-index if possible.
     private boolean rewriteFieldAccess(Mutable<ILogicalExpression> exprRef, AbstractFunctionCallExpression fce,
             IAType t) throws AlgebricksException {
-        if (t.getTypeTag() != ATypeTag.RECORD) {
+        if (t.getTypeTag() != ATypeTag.OBJECT) {
             return false;
         }
         ILogicalExpression fai = createFieldAccessByIndex((ARecordType) t, fce);
@@ -128,7 +128,7 @@ public class ByNameToByIndexFieldAccessRule implements IAlgebraicRewriteRule {
     private IAType getActualType(IAType t) throws AlgebricksException {
         switch (t.getTypeTag()) {
             case ANY:
-            case RECORD:
+            case OBJECT:
                 return t;
             case UNION:
                 return ((AUnionType) t).getActualType();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FullTextContainsParameterCheckRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FullTextContainsParameterCheckRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FullTextContainsParameterCheckRule.java
index 20c043a..42cea34 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FullTextContainsParameterCheckRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/FullTextContainsParameterCheckRule.java
@@ -172,8 +172,8 @@ public class FullTextContainsParameterCheckRule implements IAlgebraicRewriteRule
             ATypeTag exprTypeTag = ConstantExpressionUtil.getConstantIaObjectType(secondExpr);
             switch (exprTypeTag) {
                 case STRING:
-                case UNORDEREDLIST:
-                case ORDEREDLIST:
+                case MULTISET:
+                case ARRAY:
                     break;
                 default:
                     throw new AlgebricksException("The second expression of " + functionName

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceDynamicTypeCastRule.java
----------------------------------------------------------------------
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 535edbe..075a65c 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
@@ -248,7 +248,7 @@ public class IntroduceDynamicTypeCastRule implements IAlgebraicRewriteRule {
         if (inputType.getTypeTag() == ATypeTag.ANY) {
             return false;
         }
-        if (inputType.getTypeTag() != ATypeTag.RECORD) {
+        if (inputType.getTypeTag() != ATypeTag.OBJECT) {
             throw new AlgebricksException("The input type " + inputType + " is not a valid record type!");
         }
         ARecordType inputRecType = (ARecordType) inputType;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
----------------------------------------------------------------------
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 949786a..e322e9e 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
@@ -156,7 +156,7 @@ public class IntroduceSecondaryIndexInsertDeleteRule implements IAlgebraicRewrit
         // Create operators for secondary index insert / delete.
         String itemTypeName = dataset.getItemTypeName();
         IAType itemType = mp.findType(dataset.getItemTypeDataverseName(), itemTypeName);
-        if (itemType.getTypeTag() != ATypeTag.RECORD) {
+        if (itemType.getTypeTag() != ATypeTag.OBJECT) {
             throw new AlgebricksException("Only record types can be indexed.");
         }
         ARecordType recType = (ARecordType) itemType;
@@ -206,7 +206,7 @@ public class IntroduceSecondaryIndexInsertDeleteRule implements IAlgebraicRewrit
         ReplicateOperator replicateOp = null;
         if (secondaryIndexTotalCnt > 1 && primaryIndexModificationOp.isBulkload()) {
             // Split the logical plan into "each secondary index update branch"
-            // to replicate each <PK,RECORD> pair.
+            // to replicate each <PK,OBJECT> pair.
             replicateOp = new ReplicateOperator(secondaryIndexTotalCnt);
             replicateOp.getInputs().add(new MutableObject<ILogicalOperator>(currentTop));
             replicateOp.setExecutionMode(ExecutionMode.PARTITIONED);
@@ -531,7 +531,7 @@ public class IntroduceSecondaryIndexInsertDeleteRule implements IAlgebraicRewrit
             throws AlgebricksException {
         if (recordExpr.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
             IAType type = (IAType) typeEnvironment.getType(recordExpr);
-            return type != null && type.getTypeTag() == ATypeTag.RECORD;
+            return type != null && type.getTypeTag() == ATypeTag.OBJECT;
         }
         return false;
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/MetaFunctionToMetaVariableRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/MetaFunctionToMetaVariableRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/MetaFunctionToMetaVariableRule.java
index 4343e69..f0917af 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/MetaFunctionToMetaVariableRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/MetaFunctionToMetaVariableRule.java
@@ -276,7 +276,7 @@ class MetaKeyToFieldAccessTransform implements ILogicalExpressionReferenceTransf
         IAType fieldNameType = fieldNameValue.getObject().getType();
         FunctionIdentifier functionIdentifier;
         switch (fieldNameType.getTypeTag()) {
-            case ORDEREDLIST:
+            case ARRAY:
                 // Field access nested
                 functionIdentifier = BuiltinFunctions.FIELD_ACCESS_NESTED;
                 break;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushFieldAccessRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushFieldAccessRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushFieldAccessRule.java
index 6ca822a..e0fb1db 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushFieldAccessRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushFieldAccessRule.java
@@ -136,7 +136,7 @@ public class PushFieldAccessRule implements IAlgebraicRewriteRule {
         if (pos != null) {
             String tName = dataset.getItemTypeName();
             IAType t = mp.findType(dataset.getItemTypeDataverseName(), tName);
-            if (t.getTypeTag() != ATypeTag.RECORD) {
+            if (t.getTypeTag() != ATypeTag.OBJECT) {
                 return false;
             }
             ARecordType rt = (ARecordType) t;
@@ -322,7 +322,7 @@ public class PushFieldAccessRule implements IAlgebraicRewriteRule {
                                 int pos = ((AInt32) obj).getIntegerValue();
                                 String tName = dataset.getItemTypeName();
                                 IAType t = mp.findType(dataset.getItemTypeDataverseName(), tName);
-                                if (t.getTypeTag() != ATypeTag.RECORD) {
+                                if (t.getTypeTag() != ATypeTag.OBJECT) {
                                     return false;
                                 }
                                 ARecordType rt = (ARecordType) t;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ResolveVariableRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ResolveVariableRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ResolveVariableRule.java
index 4ae26fc..2d7695f 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ResolveVariableRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ResolveVariableRule.java
@@ -231,7 +231,7 @@ public class ResolveVariableRule implements IAlgebraicRewriteRule {
             path.add(unresolvedVarName);
             varAccessCandidates.add(new Pair<>(expr, path));
         }
-        if (tag == ATypeTag.RECORD) {
+        if (tag == ATypeTag.OBJECT) {
             ARecordType recordType = (ARecordType) type;
             if (recordType.canContainField(unresolvedVarName)) {
                 // If the field name is possible.

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SimilarityCheckRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SimilarityCheckRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SimilarityCheckRule.java
index 46e0f7e..585bc71 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SimilarityCheckRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/SimilarityCheckRule.java
@@ -288,7 +288,7 @@ public class SimilarityCheckRule implements IAlgebraicRewriteRule {
         if (funcExpr.getFunctionIdentifier() == BuiltinFunctions.EDIT_DISTANCE) {
             AInt32 aInt = new AInt32(0);
             try {
-                aInt = (AInt32) ATypeHierarchy.convertNumericTypeObject(constVal.getObject(), ATypeTag.INT32);
+                aInt = (AInt32) ATypeHierarchy.convertNumericTypeObject(constVal.getObject(), ATypeTag.INTEGER);
             } catch (AsterixException e) {
                 throw new AlgebricksException(e);
             }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java
----------------------------------------------------------------------
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 5179adc..86d2b9f 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
@@ -304,8 +304,8 @@ public abstract class AbstractIntroduceAccessMethodRule implements IAlgebraicRew
                             || optFuncExpr.getFuncExpr()
                                     .getFunctionIdentifier() == BuiltinFunctions.FULLTEXT_CONTAINS_WO_OPTION) {
                         for (int j = 0; j < matchedTypes.size(); j++) {
-                            if (matchedTypes.get(j).getTypeTag() == ATypeTag.ORDEREDLIST
-                                    || matchedTypes.get(j).getTypeTag() == ATypeTag.UNORDEREDLIST) {
+                            if (matchedTypes.get(j).getTypeTag() == ATypeTag.ARRAY
+                                    || matchedTypes.get(j).getTypeTag() == ATypeTag.MULTISET) {
                                 elementTypes.set(j, ((AbstractCollectionType) matchedTypes.get(j)).getItemType());
                             }
                         }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AccessMethodUtils.java
----------------------------------------------------------------------
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 e059574..c3b6473 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
@@ -245,11 +245,11 @@ public class AccessMethodUtils {
                 arg2Value = ConstantExpressionUtil.getStringConstant(objectFromExpr);
                 checkAndGenerateFTSearchExceptionForStringPhrase(arg2Value);
                 break;
-            case ORDEREDLIST:
+            case ARRAY:
                 oListCursor = ConstantExpressionUtil.getOrderedListConstant(objectFromExpr).getCursor();
                 checkEachElementInFTSearchListPredicate(oListCursor);
                 break;
-            case UNORDEREDLIST:
+            case MULTISET:
                 oListCursor = ConstantExpressionUtil.getUnorderedListConstant(objectFromExpr).getCursor();
                 checkEachElementInFTSearchListPredicate(oListCursor);
                 break;
@@ -434,10 +434,10 @@ public class AccessMethodUtils {
                     case DOUBLE:
                     case FLOAT:
                         switch (fieldType.getTypeTag()) {
-                            case INT8:
-                            case INT16:
-                            case INT32:
-                            case INT64:
+                            case TINYINT:
+                            case SMALLINT:
+                            case INTEGER:
+                            case BIGINT:
                                 realTypeConvertedToIntegerType = true;
                                 break;
                             default:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceLSMComponentFilterRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceLSMComponentFilterRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceLSMComponentFilterRule.java
index 18641e5..c7401b2 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceLSMComponentFilterRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceLSMComponentFilterRule.java
@@ -94,7 +94,7 @@ public class IntroduceLSMComponentFilterRule implements IAlgebraicRewriteRule {
             filterFieldName = DatasetUtil.getFilterField(dataset);
             IAType itemType = ((MetadataProvider) context.getMetadataProvider())
                     .findType(dataset.getItemTypeDataverseName(), dataset.getItemTypeName());
-            if (itemType.getTypeTag() == ATypeTag.RECORD) {
+            if (itemType.getTypeTag() == ATypeTag.OBJECT) {
                 recType = (ARecordType) itemType;
             }
         }
@@ -457,7 +457,7 @@ public class IntroduceLSMComponentFilterRule implements IAlgebraicRewriteRule {
                 }
                 returnList.add(recType.getFieldNames()[fieldIndex]);
                 IAType subType = recType.getFieldTypes()[fieldIndex];
-                if (subType.getTypeTag() == ATypeTag.RECORD) {
+                if (subType.getTypeTag() == ATypeTag.OBJECT) {
                     recType = (ARecordType) subType;
                 }
                 return new Pair<>(recType, returnList);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/InvertedIndexAccessMethod.java
----------------------------------------------------------------------
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 a02679d..0752979 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
@@ -764,8 +764,8 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
                         isFilterableArgs);
                 break;
             }
-            case UNORDEREDLIST:
-            case ORDEREDLIST: {
+            case MULTISET:
+            case ARRAY:
                 List<Mutable<ILogicalExpression>> isFilterableArgs = new ArrayList<Mutable<ILogicalExpression>>(2);
                 isFilterableArgs
                         .add(new MutableObject<ILogicalExpression>(new VariableReferenceExpression(inputSearchVar)));
@@ -775,10 +775,8 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
                         FunctionUtil.getFunctionInfo(BuiltinFunctions.EDIT_DISTANCE_LIST_IS_FILTERABLE),
                         isFilterableArgs);
                 break;
-            }
-            default: {
+            default:
                 throw CompilationException.create(ErrorCode.NO_SUPPORTED_TYPE);
-            }
         }
 
         SelectOperator isFilterableSelectOp = new SelectOperator(
@@ -829,7 +827,7 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
                 // If this is a nullable field, then we need to get the actual type tag.
                 typeTag = ((AUnionType) type).getActualType().getTypeTag();
             }
-            if (typeTag != ATypeTag.ORDEREDLIST && typeTag != ATypeTag.STRING && typeTag != ATypeTag.UNORDEREDLIST) {
+            if (typeTag != ATypeTag.ARRAY && typeTag != ATypeTag.STRING && typeTag != ATypeTag.MULTISET) {
                 throw CompilationException.create(ErrorCode.NO_SUPPORTED_TYPE);
             }
         }
@@ -962,7 +960,7 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
             return true;
         }
         // We can only optimize edit distance on lists using a word index.
-        if ((typeTag == ATypeTag.ORDEREDLIST) && (indexType == IndexType.SINGLE_PARTITION_WORD_INVIX
+        if ((typeTag == ATypeTag.ARRAY) && (indexType == IndexType.SINGLE_PARTITION_WORD_INVIX
                 || indexType == IndexType.LENGTH_PARTITIONED_WORD_INVIX)) {
             return true;
         }
@@ -988,9 +986,9 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
         IAObject intObj = intConstVal.getObject();
 
         AInt32 edThresh = null;
-        // Apply type casting based on numeric types of the input to INT32 type.
+        // Apply type casting based on numeric types of the input to INTEGER type.
         try {
-            edThresh = (AInt32) ATypeHierarchy.convertNumericTypeObject(intObj, ATypeTag.INT32);
+            edThresh = (AInt32) ATypeHierarchy.convertNumericTypeObject(intObj, ATypeTag.INTEGER);
         } catch (AsterixException e) {
             throw new AlgebricksException(e);
         }
@@ -1008,7 +1006,7 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
             }
         }
 
-        if ((typeTag == ATypeTag.ORDEREDLIST) && (index.getIndexType() == IndexType.SINGLE_PARTITION_WORD_INVIX
+        if ((typeTag == ATypeTag.ARRAY) && (index.getIndexType() == IndexType.SINGLE_PARTITION_WORD_INVIX
                 || index.getIndexType() == IndexType.LENGTH_PARTITIONED_WORD_INVIX)) {
             IACollection alist = (IACollection) listOrStrObj;
             // Compute merge threshold.
@@ -1066,7 +1064,7 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
 
     private boolean isFullTextContainsFuncCompatible(ATypeTag typeTag, IndexType indexType) {
         //We can only optimize contains with full-text indexes.
-        return (typeTag == ATypeTag.STRING || typeTag == ATypeTag.ORDEREDLIST || typeTag == ATypeTag.UNORDEREDLIST)
+        return (typeTag == ATypeTag.STRING || typeTag == ATypeTag.ARRAY || typeTag == ATypeTag.MULTISET)
                 && indexType == IndexType.SINGLE_PARTITION_WORD_INVIX;
     }
 
@@ -1080,7 +1078,7 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
     }
 
     // Checks whether the given index is compatible with full-text search and
-    // the type of the constant search predicate is STRING, ORDEREDLIST, or UNORDEREDLIST
+    // the type of the constant search predicate is STRING, ARRAY, or MULTISET
     private boolean isFullTextContainsFuncSelectOptimizable(Index index, IOptimizableFuncExpr optFuncExpr) {
         AsterixConstantValue strConstVal =
                 (AsterixConstantValue) ((ConstantExpression) optFuncExpr.getConstantExpr(0)).getValue();
@@ -1156,15 +1154,11 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
             }
         }
 
-        if (nonConstArg.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
-            if ((typeTag == ATypeTag.ORDEREDLIST || typeTag == ATypeTag.UNORDEREDLIST)
-                    && (indexType == IndexType.SINGLE_PARTITION_WORD_INVIX
-                            || indexType == IndexType.LENGTH_PARTITIONED_WORD_INVIX)) {
-                return true;
-            }
-            // We assume that the given list variable doesn't have ngram list in it since it is unrealistic.
-        }
-        return false;
+        // We assume that the given list variable doesn't have ngram list in it since it is unrealistic.
+        boolean isVar = nonConstArg.getExpressionTag() == LogicalExpressionTag.VARIABLE;
+        return isVar && (typeTag == ATypeTag.ARRAY || typeTag == ATypeTag.MULTISET)
+                && (indexType == IndexType.SINGLE_PARTITION_WORD_INVIX
+                        || indexType == IndexType.LENGTH_PARTITIONED_WORD_INVIX);
     }
 
     private boolean isContainsFuncOptimizable(Index index, IOptimizableFuncExpr optFuncExpr) {
@@ -1247,7 +1241,7 @@ public class InvertedIndexAccessMethod implements IAccessMethod {
             case CONJUNCTIVE_EDIT_DISTANCE:
                 int edThresh = 0;
                 try {
-                    edThresh = ((AInt32) ATypeHierarchy.convertNumericTypeObject(simThresh, ATypeTag.INT32))
+                    edThresh = ((AInt32) ATypeHierarchy.convertNumericTypeObject(simThresh, ATypeTag.INTEGER))
                             .getIntegerValue();
                 } catch (AsterixException e) {
                     throw new AlgebricksException(e);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/OptimizableOperatorSubTree.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/OptimizableOperatorSubTree.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/OptimizableOperatorSubTree.java
index 7eae931..18358c6 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/OptimizableOperatorSubTree.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/OptimizableOperatorSubTree.java
@@ -291,7 +291,7 @@ public class OptimizableOperatorSubTree {
             }
             // Get the record type for that dataset.
             IAType itemType = metadataProvider.findType(ds.getItemTypeDataverseName(), ds.getItemTypeName());
-            if (itemType.getTypeTag() != ATypeTag.RECORD) {
+            if (itemType.getTypeTag() != ATypeTag.OBJECT) {
                 if (i == 0) {
                     return false;
                 } else {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
----------------------------------------------------------------------
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 2a569b9..efea208 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
@@ -148,7 +148,7 @@ public class StaticTypeCastUtil {
             }
             return rewriteListFuncExpr(funcExpr, (AbstractCollectionType) reqType, (AbstractCollectionType) inputType,
                     env);
-        } else if (inputType.getTypeTag().equals(ATypeTag.RECORD)) {
+        } else if (inputType.getTypeTag().equals(ATypeTag.OBJECT)) {
             if (reqType.equals(BuiltinType.ANY)) {
                 reqType = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
             }
@@ -456,13 +456,13 @@ public class StaticTypeCastUtil {
             IAType reqFieldType = inputFieldType;
             // do not enforce nested type in the case of no-used variables
             switch (inputFieldType.getTypeTag()) {
-                case RECORD:
+                case OBJECT:
                     reqFieldType = DefaultOpenFieldType.NESTED_OPEN_RECORD_TYPE;
                     break;
-                case ORDEREDLIST:
+                case ARRAY:
                     reqFieldType = DefaultOpenFieldType.NESTED_OPEN_AORDERED_LIST_TYPE;
                     break;
-                case UNORDEREDLIST:
+                case MULTISET:
                     reqFieldType = DefaultOpenFieldType.NESTED_OPEN_AUNORDERED_LIST_TYPE;
                     break;
                 default:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
index 477d596..285a35e 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
@@ -254,7 +254,7 @@ class SqlppExpressionToPlanTranslator extends LangExpressionToPlanTranslator imp
         ILogicalOperator unnestOp;
         if (fromTerm.hasPositionalVariable()) {
             LogicalVariable pVar = context.newVarFromExpression(fromTerm.getPositionalVariable());
-            // We set the positional variable type as INT64 type.
+            // We set the positional variable type as BIGINT type.
             unnestOp =
                     new UnnestOperator(fromVar, new MutableObject<ILogicalExpression>(makeUnnestExpression(eo.first)),
                             pVar, BuiltinType.AINT64, new PositionWriter());
@@ -454,7 +454,7 @@ class SqlppExpressionToPlanTranslator extends LangExpressionToPlanTranslator imp
         ILogicalOperator unnestOp;
         if (binaryCorrelate.hasPositionalVariable()) {
             LogicalVariable pVar = context.newVarFromExpression(binaryCorrelate.getPositionalVariable());
-            // We set the positional variable type as INT64 type.
+            // We set the positional variable type as BIGINT type.
             unnestOp = innerUnnest
                     ? new UnnestOperator(rightVar, new MutableObject<>(makeUnnestExpression(eo.first)), pVar,
                             BuiltinType.AINT64, new PositionWriter())

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java
----------------------------------------------------------------------
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 3d0315c..d262bb8 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
@@ -63,10 +63,10 @@ public class ValidateUtil {
                     RecordUtil.toFullyQualifiedName(filterField));
         }
         switch (fieldType.getTypeTag()) {
-            case INT8:
-            case INT16:
-            case INT32:
-            case INT64:
+            case TINYINT:
+            case SMALLINT:
+            case INTEGER:
+            case BIGINT:
             case FLOAT:
             case DOUBLE:
             case STRING:
@@ -134,10 +134,10 @@ public class ValidateUtil {
                             RecordUtil.toFullyQualifiedName(partitioningExprs.get(fidx)));
                 }
                 switch (fieldType.getTypeTag()) {
-                    case INT8:
-                    case INT16:
-                    case INT32:
-                    case INT64:
+                    case TINYINT:
+                    case SMALLINT:
+                    case INTEGER:
+                    case BIGINT:
                     case FLOAT:
                     case DOUBLE:
                     case STRING:
@@ -154,7 +154,7 @@ public class ValidateUtil {
                                 RecordUtil.toFullyQualifiedName(partitioningExprs.get(fidx)));
                     default:
                         throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_PRIMARY_KEY_TYPE,
-                                fieldType.getTypeTag().name());
+                                fieldType.getTypeTag());
                 }
             }
         }
@@ -200,10 +200,10 @@ public class ValidateUtil {
             switch (indexType) {
                 case BTREE:
                     switch (fieldType.getTypeTag()) {
-                        case INT8:
-                        case INT16:
-                        case INT32:
-                        case INT64:
+                        case TINYINT:
+                        case SMALLINT:
+                        case INTEGER:
+                        case BIGINT:
                         case FLOAT:
                         case DOUBLE:
                         case STRING:
@@ -249,8 +249,8 @@ public class ValidateUtil {
                 case LENGTH_PARTITIONED_WORD_INVIX:
                     switch (fieldType.getTypeTag()) {
                         case STRING:
-                        case UNORDEREDLIST:
-                        case ORDEREDLIST:
+                        case MULTISET:
+                        case ARRAY:
                         case UNION:
                             break;
                         default:
@@ -272,8 +272,8 @@ public class ValidateUtil {
                 case SINGLE_PARTITION_WORD_INVIX:
                     switch (fieldType.getTypeTag()) {
                         case STRING:
-                        case UNORDEREDLIST:
-                        case ORDEREDLIST:
+                        case MULTISET:
+                        case ARRAY:
                         case UNION:
                             break;
                         default:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index e97a7e1..d37de0d 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -548,7 +548,7 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen
             switch (dd.getDatasetType()) {
                 case INTERNAL:
                     IAType itemType = dt.getDatatype();
-                    if (itemType.getTypeTag() != ATypeTag.RECORD) {
+                    if (itemType.getTypeTag() != ATypeTag.OBJECT) {
                         throw new AlgebricksException("Dataset type has to be a record type.");
                     }
 
@@ -556,7 +556,7 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen
                     if (metaItemTypeDataverseName != null && metaItemTypeName != null) {
                         metaItemType = metadataProvider.findType(metaItemTypeDataverseName, metaItemTypeName);
                     }
-                    if (metaItemType != null && metaItemType.getTypeTag() != ATypeTag.RECORD) {
+                    if (metaItemType != null && metaItemType.getTypeTag() != ATypeTag.OBJECT) {
                         throw new AlgebricksException("Dataset meta type has to be a record type.");
                     }
                     ARecordType metaRecType = (ARecordType) metaItemType;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/ARecordValueGenerator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/ARecordValueGenerator.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/ARecordValueGenerator.java
index df717e9..cd4de62 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/ARecordValueGenerator.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/ARecordValueGenerator.java
@@ -56,10 +56,10 @@ public class ARecordValueGenerator implements IAsterixFieldValueGenerator<ITuple
                 case DOUBLE:
                     generators[i] = new ADoubleFieldValueGenerator(generationFunctions[i], uniques[i], true);
                     break;
-                case INT32:
+                case INTEGER:
                     generators[i] = new AInt32FieldValueGenerator(generationFunctions[i], uniques[i], true);
                     break;
-                case INT64:
+                case BIGINT:
                     generators[i] = new AInt64FieldValueGenerator(generationFunctions[i], uniques[i], true);
                     break;
                 case STRING:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/TupleGenerator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/TupleGenerator.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/TupleGenerator.java
index 98c57a0..0469349 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/TupleGenerator.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/app/data/gen/TupleGenerator.java
@@ -115,8 +115,8 @@ public class TupleGenerator {
         switch (field.getTypeTag()) {
             case BOOLEAN:
             case DOUBLE:
-            case INT32:
-            case INT64:
+            case INTEGER:
+            case BIGINT:
             case STRING:
                 break;
             default:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml b/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml
index 0b93b96..02efe62 100644
--- a/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml
@@ -423,7 +423,7 @@
     <test-case FilePath="exception">
       <compilation-unit name="issue_255_create_dataset_error_2">
         <output-dir compare="Text">none</output-dir>
-        <expected-error>Field of type RECORD cannot be used as a primary key field</expected-error>
+        <expected-error>Field of type object cannot be used as a primary key field</expected-error>
       </compilation-unit>
     </test-case>
     <!-- Feed datasets are not supported anymore
@@ -455,7 +455,7 @@
     <test-case FilePath="exception">
       <compilation-unit name="issue_384_create_index_error_2">
         <output-dir compare="Text">none</output-dir>
-        <expected-error>Error: The field "[age]" which is of type int32 cannot be indexed using the RTree index.</expected-error>
+        <expected-error>Error: The field "[age]" which is of type integer cannot be indexed using the RTree index.</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="exception">

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
index d28371d..a69d313 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -2672,7 +2672,7 @@
     <test-case FilePath="fuzzyjoin">
       <compilation-unit name="dblp-aqlplus_2">
         <output-dir compare="Text">dblp-aqlplus_2</output-dir>
-        <expected-error>Type mismatch: function similarity-jaccard expects its 1st input parameter to be type orderedlist or unorderedlist, but the actual input type is string</expected-error>
+        <expected-error>Type mismatch: function similarity-jaccard expects its 1st input parameter to be type array or multiset, but the actual input type is string</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="fuzzyjoin">
@@ -3452,13 +3452,13 @@
       <test-case FilePath="open-index-enforced/error-checking">
         <compilation-unit name="index-type-collision">
           <output-dir compare="Text">index-type-collision</output-dir>
-          <expected-error>Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[int32]"</expected-error>
+          <expected-error>Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[integer]"</expected-error>
         </compilation-unit>
       </test-case>
       <test-case FilePath="open-index-enforced/error-checking">
         <compilation-unit name="index-type-promotion-collision">
           <output-dir compare="Text">index-type-promotion-collision</output-dir>
-          <expected-error>Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[int64]"</expected-error>
+          <expected-error>Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[bigint]"</expected-error>
         </compilation-unit>
       </test-case>
       <test-case FilePath="open-index-enforced/error-checking">
@@ -6962,10 +6962,10 @@
     <test-case FilePath="types">
       <compilation-unit name="domain_boundaries_error">
         <output-dir compare="Text">domain_boundaries_error</output-dir>
-        <expected-error>ASX0006: Invalid format for int8 in int8</expected-error>
-        <expected-error>ASX0006: Invalid format for int16 in int16</expected-error>
-        <expected-error>ASX0006: Invalid format for int32 in int32</expected-error>
-        <expected-error>ASX0006: Invalid format for int64 in int64</expected-error>
+        <expected-error>ASX0006: Invalid format for int8 in tinyint</expected-error>
+        <expected-error>ASX0006: Invalid format for int16 in smallint</expected-error>
+        <expected-error>ASX0006: Invalid format for int32 in integer</expected-error>
+        <expected-error>ASX0006: Invalid format for int64 in bigint</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="types">

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
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 3931601..8f7ffc3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -2592,13 +2592,13 @@
     <test-case FilePath="global-aggregate">
       <compilation-unit name="q05_error">
         <output-dir compare="Text">q01</output-dir>
-        <expected-error>Type mismatch: function field-access-by-name expects its 1st input parameter to be type record, but the actual input type is orderedlist</expected-error>
+        <expected-error>Type mismatch: function field-access-by-name expects its 1st input parameter to be type object, but the actual input type is array</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="global-aggregate">
       <compilation-unit name="q06_error">
         <output-dir compare="Text">q01</output-dir>
-        <expected-error>Type mismatch: function scan-collection expects its 1st input parameter to be type orderedlist or unorderedlist, but the actual input type is string</expected-error>
+        <expected-error>Type mismatch: function scan-collection expects its 1st input parameter to be type array or multiset, but the actual input type is string</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="global-aggregate">
@@ -2683,7 +2683,7 @@
     <test-case FilePath="group-by">
       <compilation-unit name="sugar-01-negative">
         <output-dir compare="Text">core-01</output-dir>
-        <expected-error>Type mismatch: function field-access-by-name expects its 1st input parameter to be type record, but the actual input type is orderedlist</expected-error>
+        <expected-error>Type mismatch: function field-access-by-name expects its 1st input parameter to be type object, but the actual input type is array</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="group-by">
@@ -3319,7 +3319,7 @@
     <test-case FilePath="misc">
       <compilation-unit name="query-ASTERIXDB-1577">
         <output-dir compare="Text">query-ASTERIXDB-1577</output-dir>
-        <expected-error>Type mismatch: function field-access-by-name expects its 1st input parameter to be type record, but the actual input type is orderedlist</expected-error>
+        <expected-error>Type mismatch: function field-access-by-name expects its 1st input parameter to be type object, but the actual input type is array</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="misc">
@@ -6075,7 +6075,7 @@
     <test-case FilePath="subquery">
       <compilation-unit name="query-ASTERIXDB-1574">
         <output-dir compare="Text">query-ASTERIXDB-1574</output-dir>
-        <expected-error>Type mismatch: function scan-collection expects its 1st input parameter to be type unorderedlist or orderedlist, but the actual input type is record</expected-error>
+        <expected-error>Type mismatch: function scan-collection expects its 1st input parameter to be type multiset or array, but the actual input type is object</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="subquery">
@@ -7429,7 +7429,7 @@
         <output-dir compare="Text">cross-dv07</output-dir>
       </compilation-unit>
     </test-case>
-    <!--NotImplementedException: No binary comparator factory implemented for type RECORD.
+    <!--NotImplementedException: No binary comparator factory implemented for type OBJECT.
         <test-case FilePath="cross-dataverse">
           <compilation-unit name="cross-dv08">
             <output-dir compare="Text">cross-dv08</output-dir>
@@ -7473,14 +7473,14 @@
         <expected-error>Recursive invocation testdv1.fun04@0</expected-error>
       </compilation-unit>
     </test-case>
-    <!--NotImplementedException: No binary comparator factory implemented for type RECORD.
+    <!--NotImplementedException: No binary comparator factory implemented for type OBJECT.
         <test-case FilePath="cross-dataverse">
           <compilation-unit name="cross-dv17">
             <output-dir compare="Text">cross-dv17</output-dir>
           </compilation-unit>
         </test-case>
         -->
-    <!--NotImplementedException: No binary comparator factory implemented for type RECORD.
+    <!--NotImplementedException: No binary comparator factory implemented for type OBJECT.
         <test-case FilePath="cross-dataverse">
           <compilation-unit name="cross-dv18">
             <output-dir compare="Text">cross-dv18</output-dir>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IDataParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IDataParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IDataParser.java
index 7b936a9..f3d8c89 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IDataParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/api/IDataParser.java
@@ -60,7 +60,7 @@ public interface IDataParser {
     @SuppressWarnings("unchecked")
     public static void writeObject(IAObject obj, DataOutput dataOutput) throws HyracksDataException {
         switch (obj.getType().getTypeTag()) {
-            case RECORD: {
+            case OBJECT: {
                 IARecordBuilder recordBuilder = new RecordBuilder();
                 recordBuilder.reset((ARecordType) obj.getType());
                 recordBuilder.init();
@@ -68,7 +68,7 @@ public interface IDataParser {
                 break;
             }
 
-            case ORDEREDLIST: {
+            case ARRAY: {
                 OrderedListBuilder listBuilder = new OrderedListBuilder();
                 listBuilder.reset((AOrderedListType) ((AMutableOrderedList) obj).getType());
                 IACursor cursor = ((AMutableOrderedList) obj).getCursor();
@@ -83,7 +83,7 @@ public interface IDataParser {
                 break;
             }
 
-            case UNORDEREDLIST: {
+            case MULTISET: {
                 UnorderedListBuilder listBuilder = new UnorderedListBuilder();
                 listBuilder.reset((AUnorderedListType) ((AMutableUnorderedList) obj).getType());
                 IACursor cursor = ((AMutableUnorderedList) obj).getCursor();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
----------------------------------------------------------------------
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 fb9fd79..916e668 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
@@ -59,7 +59,7 @@ public class JTypeObjectFactory implements IObjectFactory<IJObject, IAType> {
     public IJObject create(IAType type) {
         IJObject retValue = null;
         switch (type.getTypeTag()) {
-            case INT32:
+            case INTEGER:
                 retValue = new JInt(0);
                 break;
             case STRING:
@@ -107,7 +107,7 @@ public class JTypeObjectFactory implements IObjectFactory<IJObject, IAType> {
             case TIME:
                 retValue = new JTime(0);
                 break;
-            case INT64:
+            case BIGINT:
                 retValue = new JLong(0);
                 break;
             case NULL:
@@ -116,19 +116,19 @@ public class JTypeObjectFactory implements IObjectFactory<IJObject, IAType> {
             case MISSING:
                 retValue = JObjects.JMissing.INSTANCE;
                 break;
-            case ORDEREDLIST:
+            case ARRAY:
                 AOrderedListType ot = (AOrderedListType) type;
                 IAType orderedItemType = ot.getItemType();
                 IJObject orderedItemObject = create(orderedItemType);
                 retValue = new JOrderedList(orderedItemObject);
                 break;
-            case UNORDEREDLIST:
+            case MULTISET:
                 AUnorderedListType ut = (AUnorderedListType) type;
                 IAType unorderedItemType = ut.getItemType();
                 IJObject unorderedItemObject = create(unorderedItemType);
                 retValue = new JUnorderedList(unorderedItemObject);
                 break;
-            case RECORD:
+            case OBJECT:
                 IAType[] fieldTypes = ((ARecordType) type).getFieldTypes();
                 IJObject[] fieldObjects = new IJObject[fieldTypes.length];
                 int index = 0;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JavaFunctionHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JavaFunctionHelper.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JavaFunctionHelper.java
index c1b22dc..3006454 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JavaFunctionHelper.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JavaFunctionHelper.java
@@ -107,13 +107,13 @@ public class JavaFunctionHelper implements IFunctionHelper {
         IJObject jObject = null;
         IAType type = finfo.getParamList().get(index);
         switch (type.getTypeTag()) {
-            case RECORD:
+            case OBJECT:
                 pointable = pointableAllocator.allocateRecordValue(type);
                 pointable.set(valueReference);
                 jObject = pointableVisitor.visit((ARecordVisitablePointable) pointable, getTypeInfo(index, type));
                 break;
-            case ORDEREDLIST:
-            case UNORDEREDLIST:
+            case ARRAY:
+            case MULTISET:
                 pointable = pointableAllocator.allocateListValue(type);
                 pointable.set(valueReference);
                 jObject = pointableVisitor.visit((AListVisitablePointable) pointable, getTypeInfo(index, type));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ResultCollector.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ResultCollector.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ResultCollector.java
index 43e4e09..7d8b504 100755
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ResultCollector.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ResultCollector.java
@@ -54,7 +54,7 @@ public class ResultCollector implements IResultCollector {
 
     private IAObject allocateResultObjectHolder(IAType type) {
         switch (type.getTypeTag()) {
-            case INT32:
+            case INTEGER:
                 return new AMutableInt32(0);
             case FLOAT:
                 return new AMutableFloat(0f);
@@ -62,9 +62,9 @@ public class ResultCollector implements IResultCollector {
                 return new AMutableDouble(0);
             case STRING:
                 return new AMutableString("");
-            case ORDEREDLIST:
+            case ARRAY:
                 return new AMutableOrderedList((AOrderedListType) type);
-            case RECORD:
+            case OBJECT:
                 IAType[] fieldType = ((ARecordType) type).getFieldTypes();
                 IAObject[] fieldObjects = new IAObject[fieldType.length];
                 for (int i = 0; i < fieldType.length; i++) {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/RuntimeExternalFunctionUtil.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/RuntimeExternalFunctionUtil.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/RuntimeExternalFunctionUtil.java
index 8cd157c..8b7b06e 100755
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/RuntimeExternalFunctionUtil.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/RuntimeExternalFunctionUtil.java
@@ -77,7 +77,7 @@ public class RuntimeExternalFunctionUtil {
 
     public static ByteBuffer allocateArgumentBuffers(IAType type) {
         switch (type.getTypeTag()) {
-            case INT32:
+            case INTEGER:
                 return ByteBuffer.allocate(4);
             case STRING:
                 return ByteBuffer.allocate(32 * 1024);
@@ -88,7 +88,7 @@ public class RuntimeExternalFunctionUtil {
 
     public static IAObject allocateArgumentObjects(IAType type) {
         switch (type.getTypeTag()) {
-            case INT32:
+            case INTEGER:
                 return new AMutableInt32(0);
             case STRING:
                 return new AMutableString("");

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectAccessors.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectAccessors.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectAccessors.java
index a35bc69..0d485924 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectAccessors.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectAccessors.java
@@ -101,16 +101,16 @@ public class JObjectAccessors {
             case BOOLEAN:
                 accessor = new JBooleanAccessor();
                 break;
-            case INT8:
+            case TINYINT:
                 accessor = new JInt8Accessor();
                 break;
-            case INT16:
+            case SMALLINT:
                 accessor = new JInt16Accessor();
                 break;
-            case INT32:
+            case INTEGER:
                 accessor = new JInt32Accessor();
                 break;
-            case INT64:
+            case BIGINT:
                 accessor = new JInt64Accessor();
                 break;
             case FLOAT:
@@ -507,11 +507,11 @@ public class JObjectAccessors {
                     IVisitablePointable fieldName = fieldNames.get(index);
                     typeInfo.reset(fieldType, typeTag);
                     switch (typeTag) {
-                        case RECORD:
+                        case OBJECT:
                             fieldObject = pointableVisitor.visit((ARecordVisitablePointable) fieldPointable, typeInfo);
                             break;
-                        case ORDEREDLIST:
-                        case UNORDEREDLIST:
+                        case ARRAY:
+                        case MULTISET:
                             if (fieldPointable instanceof AFlatValuePointable) {
                                 // value is null
                                 fieldObject = null;
@@ -577,11 +577,11 @@ public class JObjectAccessors {
                     fieldType = TypeTagUtil.getBuiltinTypeByTag(itemTypeTag);
                     typeInfo.reset(fieldType, itemTypeTag);
                     switch (itemTypeTag) {
-                        case RECORD:
+                        case OBJECT:
                             listItem = pointableVisitor.visit((ARecordVisitablePointable) itemPointable, typeInfo);
                             break;
-                        case UNORDEREDLIST:
-                        case ORDEREDLIST:
+                        case MULTISET:
+                        case ARRAY:
                             listItem = pointableVisitor.visit((AListVisitablePointable) itemPointable, typeInfo);
                             break;
                         case ANY:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
----------------------------------------------------------------------
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 a107421..5bc1ec2 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
@@ -94,7 +94,7 @@ public class JObjectUtil {
 
         switch (typeTag) {
 
-            case INT32: {
+            case INTEGER: {
                 int v = dis.readInt();
                 jObject = objectPool.allocate(BuiltinType.AINT32);
                 ((JInt) jObject).setValue(v);
@@ -234,7 +234,7 @@ public class JObjectUtil {
                 break;
             }
 
-            case UNORDEREDLIST: {
+            case MULTISET: {
                 AUnorderedListType listType = (AUnorderedListType) type;
                 IAType elementType = listType.getItemType();
                 jObject = objectPool.allocate(listType);
@@ -243,9 +243,9 @@ public class JObjectUtil {
                 ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(dis.readByte());
                 switch (tag) {
                     case STRING:
-                    case RECORD:
-                    case ORDEREDLIST:
-                    case UNORDEREDLIST:
+                    case OBJECT:
+                    case ARRAY:
+                    case MULTISET:
                     case ANY:
                         fixedSize = false;
                         break;
@@ -270,7 +270,7 @@ public class JObjectUtil {
                 }
                 break;
             }
-            case ORDEREDLIST: {
+            case ARRAY: {
                 AOrderedListType listType = (AOrderedListType) type;
                 IAType elementType = listType.getItemType();
                 jObject = objectPool.allocate(listType);
@@ -278,9 +278,9 @@ public class JObjectUtil {
                 ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(dis.readByte());
                 switch (tag) {
                     case STRING:
-                    case RECORD:
-                    case ORDEREDLIST:
-                    case UNORDEREDLIST:
+                    case OBJECT:
+                    case ARRAY:
+                    case MULTISET:
                     case ANY:
                         fixedSize = false;
                         break;
@@ -306,7 +306,7 @@ public class JObjectUtil {
                 }
                 break;
             }
-            case RECORD:
+            case OBJECT:
                 ARecordType recordType = (ARecordType) type;
                 int numberOfSchemaFields = recordType.getFieldTypes().length;
                 byte[] recordBits = dis.getInputStream().getArray();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
----------------------------------------------------------------------
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 859a327..6226192 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
@@ -906,7 +906,7 @@ public class JObjects {
 
         @Override
         public ATypeTag getTypeTag() {
-            return ATypeTag.ORDEREDLIST;
+            return ATypeTag.ARRAY;
         }
 
         @Override
@@ -966,7 +966,7 @@ public class JObjects {
 
         @Override
         public ATypeTag getTypeTag() {
-            return ATypeTag.UNORDEREDLIST;
+            return ATypeTag.MULTISET;
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
----------------------------------------------------------------------
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 d1a3ad1..18bf52c 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
@@ -226,33 +226,33 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
                 parseConstructor(ATypeTag.FLOAT, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT8_LITERAL:
-                parseAndCastNumeric(ATypeTag.INT8, objectType, out);
+                parseAndCastNumeric(ATypeTag.TINYINT, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT8_CONS:
-                parseConstructor(ATypeTag.INT8, objectType, out);
+                parseConstructor(ATypeTag.TINYINT, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT16_LITERAL:
-                parseAndCastNumeric(ATypeTag.INT16, objectType, out);
+                parseAndCastNumeric(ATypeTag.SMALLINT, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT16_CONS:
-                parseConstructor(ATypeTag.INT16, objectType, out);
+                parseConstructor(ATypeTag.SMALLINT, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT_LITERAL:
-                // For an INT value without any suffix, we return it as INT64 type value since it is
+                // For an INT value without any suffix, we return it as BIGINT type value since it is
                 // the default integer type.
-                parseAndCastNumeric(ATypeTag.INT64, objectType, out);
+                parseAndCastNumeric(ATypeTag.BIGINT, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT32_LITERAL:
-                parseAndCastNumeric(ATypeTag.INT32, objectType, out);
+                parseAndCastNumeric(ATypeTag.INTEGER, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT32_CONS:
-                parseConstructor(ATypeTag.INT32, objectType, out);
+                parseConstructor(ATypeTag.INTEGER, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT64_LITERAL:
-                parseAndCastNumeric(ATypeTag.INT64, objectType, out);
+                parseAndCastNumeric(ATypeTag.BIGINT, objectType, out);
                 break;
             case AdmLexer.TOKEN_INT64_CONS:
-                parseConstructor(ATypeTag.INT64, objectType, out);
+                parseConstructor(ATypeTag.BIGINT, objectType, out);
                 break;
             case AdmLexer.TOKEN_STRING_LITERAL:
                 if (checkType(ATypeTag.STRING, objectType)) {
@@ -334,8 +334,8 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
                 parseConstructor(ATypeTag.POLYGON, objectType, out);
                 break;
             case AdmLexer.TOKEN_START_UNORDERED_LIST:
-                if (checkType(ATypeTag.UNORDEREDLIST, objectType)) {
-                    objectType = getComplexType(objectType, ATypeTag.UNORDEREDLIST);
+                if (checkType(ATypeTag.MULTISET, objectType)) {
+                    objectType = getComplexType(objectType, ATypeTag.MULTISET);
                     parseUnorderedList((AUnorderedListType) objectType, out);
                 } else {
                     throw new ParseException(ErrorCode.PARSER_ADM_DATA_PARSER_TYPE_MISMATCH,
@@ -343,8 +343,8 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
                 }
                 break;
             case AdmLexer.TOKEN_START_ORDERED_LIST:
-                if (checkType(ATypeTag.ORDEREDLIST, objectType)) {
-                    objectType = getComplexType(objectType, ATypeTag.ORDEREDLIST);
+                if (checkType(ATypeTag.ARRAY, objectType)) {
+                    objectType = getComplexType(objectType, ATypeTag.ARRAY);
                     parseOrderedList((AOrderedListType) objectType, out);
                 } else {
                     throw new ParseException(ErrorCode.PARSER_ADM_DATA_PARSER_TYPE_MISMATCH,
@@ -352,8 +352,8 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
                 }
                 break;
             case AdmLexer.TOKEN_START_RECORD:
-                if (checkType(ATypeTag.RECORD, objectType)) {
-                    objectType = getComplexType(objectType, ATypeTag.RECORD);
+                if (checkType(ATypeTag.OBJECT, objectType)) {
+                    objectType = getComplexType(objectType, ATypeTag.OBJECT);
                     parseRecord((ARecordType) objectType, out);
                 } else {
                     throw new ParseException(ErrorCode.PARSER_ADM_DATA_PARSER_TYPE_MISMATCH,
@@ -790,15 +790,15 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
     }
 
     private IARecordBuilder getRecordBuilder() {
-        return recordBuilderPool.allocate(ATypeTag.RECORD);
+        return recordBuilderPool.allocate(ATypeTag.OBJECT);
     }
 
     private IAsterixListBuilder getOrderedListBuilder() {
-        return listBuilderPool.allocate(ATypeTag.ORDEREDLIST);
+        return listBuilderPool.allocate(ATypeTag.ARRAY);
     }
 
     private IAsterixListBuilder getUnorderedListBuilder() {
-        return listBuilderPool.allocate(ATypeTag.UNORDEREDLIST);
+        return listBuilderPool.allocate(ATypeTag.MULTISET);
     }
 
     private ArrayBackedValueStorage getTempBuffer() {
@@ -907,16 +907,16 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
             case BOOLEAN:
                 parseBoolean(unquoted, out);
                 return true;
-            case INT8:
+            case TINYINT:
                 parseInt8(unquoted, out);
                 return true;
-            case INT16:
+            case SMALLINT:
                 parseInt16(unquoted, out);
                 return true;
-            case INT32:
+            case INTEGER:
                 parseInt32(unquoted, out);
                 return true;
-            case INT64:
+            case BIGINT:
                 parseInt64(unquoted, out);
                 return true;
             case FLOAT:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
----------------------------------------------------------------------
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 5e6e288..ffeb941 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
@@ -156,28 +156,28 @@ public class HiveRecordParser implements IRecordDataParser<Writable> {
                 case FLOAT:
                     parseFloat(value, (FloatObjectInspector) foi, dataOutput);
                     break;
-                case INT8:
+                case TINYINT:
                     parseInt8(value, (ByteObjectInspector) foi, dataOutput);
                     break;
-                case INT16:
+                case SMALLINT:
                     parseInt16(value, (ShortObjectInspector) foi, dataOutput);
                     break;
-                case INT32:
+                case INTEGER:
                     parseInt32(value, (IntObjectInspector) foi, dataOutput);
                     break;
-                case INT64:
+                case BIGINT:
                     parseInt64(value, (LongObjectInspector) foi, dataOutput);
                     break;
                 case STRING:
                     parseString(value, (StringObjectInspector) foi, dataOutput);
                     break;
-                case ORDEREDLIST:
+                case ARRAY:
                     if (primitiveOnly) {
                         throw new RuntimeDataException(ErrorCode.PARSER_HIVE_NON_PRIMITIVE_LIST_NOT_SUPPORT);
                     }
                     parseOrderedList((AOrderedListType) itemType, value, (ListObjectInspector) foi);
                     break;
-                case UNORDEREDLIST:
+                case MULTISET:
                     if (primitiveOnly) {
                         throw new RuntimeDataException(ErrorCode.PARSER_HIVE_NON_PRIMITIVE_LIST_NOT_SUPPORT);
                     }
@@ -239,21 +239,21 @@ public class HiveRecordParser implements IRecordDataParser<Writable> {
                 return Constants.DOUBLE_TYPE_NAME;
             case FLOAT:
                 return Constants.FLOAT_TYPE_NAME;
-            case INT16:
+            case SMALLINT:
                 return Constants.SMALLINT_TYPE_NAME;
-            case INT32:
+            case INTEGER:
                 return Constants.INT_TYPE_NAME;
-            case INT64:
+            case BIGINT:
                 return Constants.BIGINT_TYPE_NAME;
-            case INT8:
+            case TINYINT:
                 return Constants.TINYINT_TYPE_NAME;
-            case ORDEREDLIST:
+            case ARRAY:
                 return Constants.LIST_TYPE_NAME;
             case STRING:
                 return Constants.STRING_TYPE_NAME;
             case TIME:
                 return Constants.DATETIME_TYPE_NAME;
-            case UNORDEREDLIST:
+            case MULTISET:
                 return Constants.LIST_TYPE_NAME;
             default:
                 throw new RuntimeDataException(ErrorCode.PARSER_HIVE_FIELD_TYPE, tag);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ac5108ec/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java
index bb0b136..1b29c887 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/TweetParser.java
@@ -84,11 +84,11 @@ public class TweetParser extends AbstractDataParser implements IRecordDataParser
                     out.write(BuiltinType.ASTRING.getTypeTag().serialize());
                     utf8Writer.writeUTF8(fieldObj.asText(), out);
                     break;
-                case INT64:
+                case BIGINT:
                     aInt64.setValue(fieldObj.asLong());
                     int64Serde.serialize(aInt64, out);
                     break;
-                case INT32:
+                case INTEGER:
                     out.write(BuiltinType.AINT32.getTypeTag().serialize());
                     out.writeInt(fieldObj.asInt());
                     break;
@@ -100,7 +100,7 @@ public class TweetParser extends AbstractDataParser implements IRecordDataParser
                     out.write(BuiltinType.ABOOLEAN.getTypeTag().serialize());
                     out.writeBoolean(fieldObj.asBoolean());
                     break;
-                case RECORD:
+                case OBJECT:
                     writeRecord(fieldObj, out, (ARecordType) fieldType);
                     break;
                 default:
@@ -227,11 +227,11 @@ public class TweetParser extends AbstractDataParser implements IRecordDataParser
     }
 
     private IARecordBuilder getRecordBuilder() {
-        return recordBuilderPool.allocate(ATypeTag.RECORD);
+        return recordBuilderPool.allocate(ATypeTag.OBJECT);
     }
 
     private IAsterixListBuilder getUnorderedListBuilder() {
-        return listBuilderPool.allocate(ATypeTag.UNORDEREDLIST);
+        return listBuilderPool.allocate(ATypeTag.MULTISET);
     }
 
     private ArrayBackedValueStorage getTempBuffer() {


Mime
View raw message