[NO-ISSUE][MTD] Incorrect deserailization of dataset primary key types
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
While deserializing dataset details, all primary key types were
incorrectly set to string.
Change-Id: I20636cb8535709f607e8748e1fdd9383ab269cf7
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17532
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java
index e659b8f..70dfde1 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java
@@ -149,7 +149,6 @@
.getValueByPos(MetadataRecordTypes.INTERNAL_DETAILS_ARECORD_PARTITIONKEY_FIELD_INDEX))
.getCursor();
List<List<String>> partitioningKey = new ArrayList<>();
- List<IAType> partitioningKeyType = new ArrayList<>();
while (cursor.next()) {
AOrderedList fieldNameList = (AOrderedList) cursor.get();
@@ -159,7 +158,6 @@
nestedFieldName.add(((AString) nestedFieldNameCursor.get()).getStringValue());
}
partitioningKey.add(nestedFieldName);
- partitioningKeyType.add(BuiltinType.ASTRING);
}
// Check if there is a primary key types field
@@ -223,7 +221,7 @@
}
datasetDetails = new InternalDatasetDetails(fileStructure, partitioningStrategy, partitioningKey,
- partitioningKey, keyFieldSourceIndicator, partitioningKeyType, autogenerated,
+ partitioningKey, keyFieldSourceIndicator, primaryKeyTypes, autogenerated,
filterSourceIndicator, filterField);
break;
}