You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ht...@apache.org on 2018/12/29 16:24:55 UTC

asterixdb git commit: [NO ISSUE] Renaming AQL variables to more generic names

Repository: asterixdb
Updated Branches:
  refs/heads/master 1226c41fc -> e99f652e7


[NO ISSUE] Renaming AQL variables to more generic names

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Renaming AQL variables to more generic names.

Change-Id: If9cf5fc13e1da7c9e172c2b866643973fafaaf13
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3098
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mh...@apache.org>


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

Branch: refs/heads/master
Commit: e99f652e71f0fd589e7acbebba481f7e03b4b451
Parents: 1226c41
Author: Hussain Towaileb <Hu...@Gmail.com>
Authored: Wed Dec 26 06:56:01 2018 +0300
Committer: Hussain Towaileb <hu...@gmail.com>
Committed: Sat Dec 29 08:22:01 2018 -0800

----------------------------------------------------------------------
 .../nontagged/ADMPrinterFactoryProvider.java    | 20 ++++++++++----------
 .../nontagged/CSVPrinterFactoryProvider.java    | 16 ++++++++--------
 .../CleanJSONPrinterFactoryProvider.java        | 20 ++++++++++----------
 .../LosslessJSONPrinterFactoryProvider.java     | 20 ++++++++++----------
 .../NormalizedKeyComputerFactoryProvider.java   |  8 ++++----
 .../SerializerDeserializerProvider.java         | 20 ++++++++++----------
 .../formats/nontagged/TypeTraitProvider.java    |  8 ++++----
 7 files changed, 56 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e99f652e/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/ADMPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/ADMPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/ADMPrinterFactoryProvider.java
index 14c773d..ef32876 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/ADMPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/ADMPrinterFactoryProvider.java
@@ -65,11 +65,11 @@ public class ADMPrinterFactoryProvider implements IPrinterFactoryProvider {
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) {
-        IAType aqlType = (IAType) type;
+    public IPrinterFactory getPrinterFactory(Object typeInfo) {
+        IAType type = (IAType) typeInfo;
 
-        if (aqlType != null) {
-            switch (aqlType.getTypeTag()) {
+        if (type != null) {
+            switch (type.getTypeTag()) {
                 case TINYINT:
                     return AInt8PrinterFactory.INSTANCE;
                 case SMALLINT:
@@ -118,16 +118,16 @@ public class ADMPrinterFactoryProvider implements IPrinterFactoryProvider {
                 case BINARY:
                     return ABinaryHexPrinterFactory.INSTANCE;
                 case OBJECT:
-                    return new ARecordPrinterFactory((ARecordType) aqlType);
+                    return new ARecordPrinterFactory((ARecordType) type);
                 case ARRAY:
-                    return new AOrderedlistPrinterFactory((AOrderedListType) aqlType);
+                    return new AOrderedlistPrinterFactory((AOrderedListType) type);
                 case MULTISET:
-                    return new AUnorderedlistPrinterFactory((AUnorderedListType) aqlType);
+                    return new AUnorderedlistPrinterFactory((AUnorderedListType) type);
                 case UNION:
-                    if (((AUnionType) aqlType).isUnknownableType()) {
-                        return new AOptionalFieldPrinterFactory((AUnionType) aqlType);
+                    if (((AUnionType) type).isUnknownableType()) {
+                        return new AOptionalFieldPrinterFactory((AUnionType) type);
                     } else {
-                        return new AUnionPrinterFactory((AUnionType) aqlType);
+                        return new AUnionPrinterFactory((AUnionType) type);
                     }
                 case UUID:
                     return AUUIDPrinterFactory.INSTANCE;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e99f652e/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CSVPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CSVPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CSVPrinterFactoryProvider.java
index cc4ed0d..b8201ae 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CSVPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CSVPrinterFactoryProvider.java
@@ -61,11 +61,11 @@ public class CSVPrinterFactoryProvider implements IPrinterFactoryProvider {
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) {
-        IAType aqlType = (IAType) type;
+    public IPrinterFactory getPrinterFactory(Object typeInfo) {
+        IAType type = (IAType) typeInfo;
 
-        if (aqlType != null) {
-            switch (aqlType.getTypeTag()) {
+        if (type != null) {
+            switch (type.getTypeTag()) {
                 case TINYINT:
                     return AInt8PrinterFactory.INSTANCE;
                 case SMALLINT:
@@ -112,16 +112,16 @@ public class CSVPrinterFactoryProvider implements IPrinterFactoryProvider {
                 case STRING:
                     return AStringPrinterFactory.INSTANCE;
                 case OBJECT:
-                    return new ARecordPrinterFactory((ARecordType) aqlType);
+                    return new ARecordPrinterFactory((ARecordType) type);
                 case ARRAY:
                     throw new NotImplementedException("'Orderedlist' type unsupported for CSV output");
                 case MULTISET:
                     throw new NotImplementedException("'Unorderedlist' type unsupported for CSV output");
                 case UNION:
-                    if (((AUnionType) aqlType).isUnknownableType()) {
-                        return new AOptionalFieldPrinterFactory((AUnionType) aqlType);
+                    if (((AUnionType) type).isUnknownableType()) {
+                        return new AOptionalFieldPrinterFactory((AUnionType) type);
                     } else {
-                        return new AUnionPrinterFactory((AUnionType) aqlType);
+                        return new AUnionPrinterFactory((AUnionType) type);
                     }
                 case UUID:
                     return AUUIDPrinterFactory.INSTANCE;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e99f652e/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CleanJSONPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CleanJSONPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CleanJSONPrinterFactoryProvider.java
index 51b0c6c..7d97e24 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CleanJSONPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/CleanJSONPrinterFactoryProvider.java
@@ -65,11 +65,11 @@ public class CleanJSONPrinterFactoryProvider implements IPrinterFactoryProvider
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) {
-        IAType aqlType = (IAType) type;
+    public IPrinterFactory getPrinterFactory(Object typeInfo) {
+        IAType type = (IAType) typeInfo;
 
-        if (aqlType != null) {
-            switch (aqlType.getTypeTag()) {
+        if (type != null) {
+            switch (type.getTypeTag()) {
                 case TINYINT:
                     return AInt8PrinterFactory.INSTANCE;
                 case SMALLINT:
@@ -118,16 +118,16 @@ public class CleanJSONPrinterFactoryProvider implements IPrinterFactoryProvider
                 case BINARY:
                     return ABinaryHexPrinterFactory.INSTANCE;
                 case OBJECT:
-                    return new ARecordPrinterFactory((ARecordType) aqlType);
+                    return new ARecordPrinterFactory((ARecordType) type);
                 case ARRAY:
-                    return new AOrderedlistPrinterFactory((AOrderedListType) aqlType);
+                    return new AOrderedlistPrinterFactory((AOrderedListType) type);
                 case MULTISET:
-                    return new AUnorderedlistPrinterFactory((AUnorderedListType) aqlType);
+                    return new AUnorderedlistPrinterFactory((AUnorderedListType) type);
                 case UNION:
-                    if (((AUnionType) aqlType).isUnknownableType()) {
-                        return new AOptionalFieldPrinterFactory((AUnionType) aqlType);
+                    if (((AUnionType) type).isUnknownableType()) {
+                        return new AOptionalFieldPrinterFactory((AUnionType) type);
                     } else {
-                        return new AUnionPrinterFactory((AUnionType) aqlType);
+                        return new AUnionPrinterFactory((AUnionType) type);
                     }
                 case UUID:
                     return AUUIDPrinterFactory.INSTANCE;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e99f652e/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/LosslessJSONPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/LosslessJSONPrinterFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/LosslessJSONPrinterFactoryProvider.java
index 8de46f7..b132689 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/LosslessJSONPrinterFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/LosslessJSONPrinterFactoryProvider.java
@@ -65,11 +65,11 @@ public class LosslessJSONPrinterFactoryProvider implements IPrinterFactoryProvid
     }
 
     @Override
-    public IPrinterFactory getPrinterFactory(Object type) {
-        IAType aqlType = (IAType) type;
+    public IPrinterFactory getPrinterFactory(Object typeInfo) {
+        IAType type = (IAType) typeInfo;
 
-        if (aqlType != null) {
-            switch (aqlType.getTypeTag()) {
+        if (type != null) {
+            switch (type.getTypeTag()) {
                 case TINYINT:
                     return AInt8PrinterFactory.INSTANCE;
                 case SMALLINT:
@@ -118,16 +118,16 @@ public class LosslessJSONPrinterFactoryProvider implements IPrinterFactoryProvid
                 case BINARY:
                     return ABinaryHexPrinterFactory.INSTANCE;
                 case OBJECT:
-                    return new ARecordPrinterFactory((ARecordType) aqlType);
+                    return new ARecordPrinterFactory((ARecordType) type);
                 case ARRAY:
-                    return new AOrderedlistPrinterFactory((AOrderedListType) aqlType);
+                    return new AOrderedlistPrinterFactory((AOrderedListType) type);
                 case MULTISET:
-                    return new AUnorderedlistPrinterFactory((AUnorderedListType) aqlType);
+                    return new AUnorderedlistPrinterFactory((AUnorderedListType) type);
                 case UNION:
-                    if (((AUnionType) aqlType).isUnknownableType()) {
-                        return new AOptionalFieldPrinterFactory((AUnionType) aqlType);
+                    if (((AUnionType) type).isUnknownableType()) {
+                        return new AOptionalFieldPrinterFactory((AUnionType) type);
                     } else {
-                        return new AUnionPrinterFactory((AUnionType) aqlType);
+                        return new AUnionPrinterFactory((AUnionType) type);
                     }
                 case UUID:
                     return AUUIDPrinterFactory.INSTANCE;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e99f652e/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/NormalizedKeyComputerFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/NormalizedKeyComputerFactoryProvider.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/NormalizedKeyComputerFactoryProvider.java
index d372062..b4457ea 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/NormalizedKeyComputerFactoryProvider.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/NormalizedKeyComputerFactoryProvider.java
@@ -39,10 +39,10 @@ public class NormalizedKeyComputerFactoryProvider implements INormalizedKeyCompu
     }
 
     @Override
-    public INormalizedKeyComputerFactory getNormalizedKeyComputerFactory(Object type, boolean ascending) {
-        IAType aqlType = (IAType) type;
+    public INormalizedKeyComputerFactory getNormalizedKeyComputerFactory(Object typeInfo, boolean ascending) {
+        IAType type = (IAType) typeInfo;
         if (ascending) {
-            switch (aqlType.getTypeTag()) {
+            switch (type.getTypeTag()) {
                 case DATE:
                 case TIME:
                 case YEARMONTHDURATION:
@@ -66,7 +66,7 @@ public class NormalizedKeyComputerFactoryProvider implements INormalizedKeyCompu
                     return null;
             }
         } else {
-            switch (aqlType.getTypeTag()) {
+            switch (type.getTypeTag()) {
                 case DATE:
                 case TIME:
                 case YEARMONTHDURATION:

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e99f652e/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 356b84c..2ba9e56 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
@@ -87,23 +87,23 @@ public class SerializerDeserializerProvider implements ISerializerDeserializerPr
     @SuppressWarnings("rawtypes")
     @Override
     public ISerializerDeserializer getSerializerDeserializer(Object typeInfo) {
-        IAType aqlType = (IAType) typeInfo;
-        if (aqlType == null) {
+        IAType type = (IAType) typeInfo;
+        if (type == null) {
             return null;
         }
-        switch (aqlType.getTypeTag()) {
+        switch (type.getTypeTag()) {
             case ANY:
             case UNION:
                 // we could do smth better for nullable fields
                 return AObjectSerializerDeserializer.INSTANCE;
             default:
-                return addTag(getNonTaggedSerializerDeserializer(aqlType));
+                return addTag(getNonTaggedSerializerDeserializer(type));
         }
     }
 
     @SuppressWarnings("rawtypes")
-    public ISerializerDeserializer getNonTaggedSerializerDeserializer(IAType aqlType) {
-        switch (aqlType.getTypeTag()) {
+    public ISerializerDeserializer getNonTaggedSerializerDeserializer(IAType type) {
+        switch (type.getTypeTag()) {
             case CIRCLE:
                 return ACircleSerializerDeserializer.INSTANCE;
             case DATE:
@@ -145,7 +145,7 @@ public class SerializerDeserializerProvider implements ISerializerDeserializerPr
             case INTERVAL:
                 return AIntervalSerializerDeserializer.INSTANCE;
             case ARRAY:
-                return new AOrderedListSerializerDeserializer((AOrderedListType) aqlType);
+                return new AOrderedListSerializerDeserializer((AOrderedListType) type);
             case POINT:
                 return APointSerializerDeserializer.INSTANCE;
             case POINT3D:
@@ -155,9 +155,9 @@ public class SerializerDeserializerProvider implements ISerializerDeserializerPr
             case POLYGON:
                 return APolygonSerializerDeserializer.INSTANCE;
             case OBJECT:
-                return new ARecordSerializerDeserializer((ARecordType) aqlType);
+                return new ARecordSerializerDeserializer((ARecordType) type);
             case MULTISET:
-                return new AUnorderedListSerializerDeserializer((AUnorderedListType) aqlType);
+                return new AUnorderedListSerializerDeserializer((AUnorderedListType) type);
             case UUID:
                 return AUUIDSerializerDeserializer.INSTANCE;
             case SHORTWITHOUTTYPEINFO:
@@ -166,7 +166,7 @@ public class SerializerDeserializerProvider implements ISerializerDeserializerPr
                 return AGeometrySerializerDeserializer.INSTANCE;
             default:
                 throw new NotImplementedException(
-                        "No serializer/deserializer implemented for type " + aqlType.getTypeTag() + " .");
+                        "No serializer/deserializer implemented for type " + type.getTypeTag() + " .");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e99f652e/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 0fd2cf8..8cfe78d 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
@@ -43,12 +43,12 @@ public class TypeTraitProvider implements ITypeTraitProvider {
     public static final TypeTraitProvider INSTANCE = new TypeTraitProvider();
 
     @Override
-    public ITypeTraits getTypeTrait(Object type) {
-        IAType aqlType = (IAType) type;
-        if (aqlType == null) {
+    public ITypeTraits getTypeTrait(Object typeInfo) {
+        IAType type = (IAType) typeInfo;
+        if (type == null) {
             return null;
         }
-        switch (aqlType.getTypeTag()) {
+        switch (type.getTypeTag()) {
             case BOOLEAN:
             case TINYINT:
                 return ONEBYTETYPETRAIT;