[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 <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
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 @@
}
@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 @@
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;
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 @@
}
@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 @@
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;
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 @@
}
@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 @@
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;
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 @@
}
@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 @@
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;
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 @@
}
@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 @@
return null;
}
} else {
- switch (aqlType.getTypeTag()) {
+ switch (type.getTypeTag()) {
case DATE:
case TIME:
case YEARMONTHDURATION:
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 @@
@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 @@
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 @@
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 @@
return AGeometrySerializerDeserializer.INSTANCE;
default:
throw new NotImplementedException(
- "No serializer/deserializer implemented for type " + aqlType.getTypeTag() + " .");
+ "No serializer/deserializer implemented for type " + type.getTypeTag() + " .");
}
}
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 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;