asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From il...@apache.org
Subject incubator-asterixdb git commit: ASTERIX-1211: Malformed metadata record for enforced open index - Changed type on the open olist field in index metadata to [ ANY ] - Fixed heterogeneous list deserialization
Date Sat, 05 Dec 2015 08:16:32 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/release-0.8.8 c9cded97c -> 288cfb4b4


ASTERIX-1211: Malformed metadata record for enforced open index
- Changed type on the open olist field in index metadata to [ ANY ]
- Fixed heterogeneous list deserialization

Change-Id: Ib587a138f59f37c369ba01e627a1ef9dd5a4989e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/532
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


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

Branch: refs/heads/release-0.8.8
Commit: 288cfb4b41d4dc2bb106e1b79d4a2ed133e008cc
Parents: c9cded9
Author: Ildar Absalyamov <ildar.absalyamov@gmail.com>
Authored: Fri Dec 4 13:27:54 2015 -0800
Committer: Ildar Absalyamov <ildar.absalyamov@gmail.com>
Committed: Fri Dec 4 14:12:12 2015 -0800

----------------------------------------------------------------------
 .../queries/basic/meta24/meta24.1.ddl.aql       | 34 ++++++++++++++++++
 .../queries/basic/meta24/meta24.2.update.aql    | 18 ++++++++++
 .../queries/basic/meta24/meta24.3.query.aql     | 28 +++++++++++++++
 .../queries/basic/meta24/meta24.4.query.aql     | 28 +++++++++++++++
 .../metadata/results/basic/meta24/meta24.1.adm  |  3 ++
 .../metadata/results/basic/meta24/meta24.2.adm  |  3 ++
 .../src/test/resources/metadata/testsuite.xml   | 25 +++++++------
 .../entities/InternalDatasetDetails.java        | 11 +++---
 .../IndexTupleTranslator.java                   | 13 +++----
 .../AOrderedListSerializerDeserializer.java     | 18 +++-------
 .../apache/asterix/om/types/BuiltinType.java    | 37 +++-----------------
 11 files changed, 150 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.1.ddl.aql
b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.1.ddl.aql
new file mode 100644
index 0000000..7ae4adb
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.1.ddl.aql
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create primary index & secondary index on open union field & query
Metadata dataset to verify.
+ * Expected Res : Success
+ * Date         : 30 Sep 2013
+ */
+
+drop dataverse testdv if exists;
+create dataverse testdv;
+
+create type testdv.testtype as open {
+id : int32
+}
+
+create dataset testdv.t1(testtype) primary key id;
+
+create index idx1 on testdv.t1(name: string) type btree enforced;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.2.update.aql
b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.2.update.aql
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.3.query.aql
b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.3.query.aql
new file mode 100644
index 0000000..e8ca427
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create primary index & secondary index on open union field & query
Metadata dataset to verify.
+ * Expected Res : Success
+ * Date         : 30 Sep 2013
+ */
+
+for $l in dataset('Metadata.Index')
+where $l.DataverseName='testdv'
+return $l.SearchKeyType
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.4.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.4.query.aql
b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.4.query.aql
new file mode 100644
index 0000000..774ff28
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/queries/basic/meta24/meta24.4.query.aql
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description  : Create primary index & secondary index on open union field & query
Metadata dataset to verify.
+ * Expected Res : Success
+ * Date         : 30 Sep 2013
+ */
+
+for $l in dataset('Metadata.Index')
+where $l.DataverseName='testdv'
+return $l.IsEnforced
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.1.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.1.adm b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.1.adm
new file mode 100644
index 0000000..75bf2df
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.1.adm
@@ -0,0 +1,3 @@
+[ [ "string" ]
+, null
+ ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.2.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.2.adm b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.2.adm
new file mode 100644
index 0000000..43df3ea
--- /dev/null
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta24/meta24.2.adm
@@ -0,0 +1,3 @@
+[ true
+, null
+ ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-app/src/test/resources/metadata/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/metadata/testsuite.xml b/asterix-app/src/test/resources/metadata/testsuite.xml
index ab4303c..577d486 100644
--- a/asterix-app/src/test/resources/metadata/testsuite.xml
+++ b/asterix-app/src/test/resources/metadata/testsuite.xml
@@ -114,16 +114,6 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="basic">
-      <compilation-unit name="meta22">
-        <output-dir compare="Text">meta22</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="basic">
-      <compilation-unit name="meta23">
-        <output-dir compare="Text">meta23</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="basic">
       <compilation-unit name="meta06">
         <output-dir compare="Text">meta06</output-dir>
       </compilation-unit>
@@ -204,6 +194,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="basic">
+      <compilation-unit name="meta22">
+        <output-dir compare="Text">meta22</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="basic">
+      <compilation-unit name="meta23">
+        <output-dir compare="Text">meta23</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="basic">
+      <compilation-unit name="meta24">
+        <output-dir compare="Text">meta24</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="basic">
       <compilation-unit name="metadata_compaction_policy">
         <output-dir compare="Text">metadata_compaction_policy</output-dir>
       </compilation-unit>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/InternalDatasetDetails.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/InternalDatasetDetails.java
b/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/InternalDatasetDetails.java
index 73c263f..8f806e2 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/InternalDatasetDetails.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/InternalDatasetDetails.java
@@ -132,6 +132,7 @@ public class InternalDatasetDetails implements IDatasetDetails {
         ArrayBackedValueStorage itemValue = new ArrayBackedValueStorage();
         OrderedListBuilder primaryKeyListBuilder = new OrderedListBuilder();
         AOrderedListType stringList = new AOrderedListType(BuiltinType.ASTRING, null);
+        AOrderedListType heterogeneousList = new AOrderedListType(BuiltinType.ANY, null);
         internalRecordBuilder.reset(MetadataRecordTypes.INTERNAL_DETAILS_RECORDTYPE);
         AMutableString aString = new AMutableString("");
         @SuppressWarnings("unchecked")
@@ -156,8 +157,8 @@ public class InternalDatasetDetails implements IDatasetDetails {
                 fieldValue);
 
         // write field 2
-        primaryKeyListBuilder
-                .reset((AOrderedListType) MetadataRecordTypes.INTERNAL_DETAILS_RECORDTYPE.getFieldTypes()[MetadataRecordTypes.INTERNAL_DETAILS_ARECORD_PARTITIONKEY_FIELD_INDEX]);
+        primaryKeyListBuilder.reset((AOrderedListType) MetadataRecordTypes.INTERNAL_DETAILS_RECORDTYPE
+                .getFieldTypes()[MetadataRecordTypes.INTERNAL_DETAILS_ARECORD_PARTITIONKEY_FIELD_INDEX]);
         for (List<String> field : partitioningKeys) {
             listBuilder.reset(stringList);
             for (String subField : field) {
@@ -176,8 +177,8 @@ public class InternalDatasetDetails implements IDatasetDetails {
                 fieldValue);
 
         // write field 3
-        primaryKeyListBuilder
-                .reset((AOrderedListType) MetadataRecordTypes.INTERNAL_DETAILS_RECORDTYPE.getFieldTypes()[MetadataRecordTypes.INTERNAL_DETAILS_ARECORD_PRIMARYKEY_FIELD_INDEX]);
+        primaryKeyListBuilder.reset((AOrderedListType) MetadataRecordTypes.INTERNAL_DETAILS_RECORDTYPE
+                .getFieldTypes()[MetadataRecordTypes.INTERNAL_DETAILS_ARECORD_PRIMARYKEY_FIELD_INDEX]);
         for (List<String> field : primaryKeys) {
             listBuilder.reset(stringList);
             for (String subField : field) {
@@ -203,7 +204,7 @@ public class InternalDatasetDetails implements IDatasetDetails {
 
         List<String> filterField = getFilterField();
         if (filterField != null) {
-            listBuilder.reset(stringList);
+            listBuilder.reset(heterogeneousList);
             ArrayBackedValueStorage nameValue = new ArrayBackedValueStorage();
             nameValue.reset();
             aString.setValue(FILTER_FIELD_NAME);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
b/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
index ee172cc..312f586 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java
@@ -107,8 +107,9 @@ public class IndexTupleTranslator extends AbstractTupleTranslator<Index>
{
                 .getStringValue();
         String indexName = ((AString) rec.getValueByPos(MetadataRecordTypes.INDEX_ARECORD_INDEXNAME_FIELD_INDEX))
                 .getStringValue();
-        IndexType indexStructure = IndexType.valueOf(((AString) rec
-                .getValueByPos(MetadataRecordTypes.INDEX_ARECORD_INDEXSTRUCTURE_FIELD_INDEX)).getStringValue());
+        IndexType indexStructure = IndexType
+                .valueOf(((AString) rec.getValueByPos(MetadataRecordTypes.INDEX_ARECORD_INDEXSTRUCTURE_FIELD_INDEX))
+                        .getStringValue());
         IACursor fieldNameCursor = ((AOrderedList) rec
                 .getValueByPos(MetadataRecordTypes.INDEX_ARECORD_SEARCHKEY_FIELD_INDEX)).getCursor();
         List<List<String>> searchKey = new ArrayList<List<String>>();
@@ -200,8 +201,8 @@ public class IndexTupleTranslator extends AbstractTupleTranslator<Index>
{
         recordBuilder.addField(MetadataRecordTypes.INDEX_ARECORD_INDEXSTRUCTURE_FIELD_INDEX,
fieldValue);
 
         // write field 4
-        primaryKeyListBuilder
-                .reset((AOrderedListType) MetadataRecordTypes.INDEX_RECORDTYPE.getFieldTypes()[MetadataRecordTypes.INDEX_ARECORD_SEARCHKEY_FIELD_INDEX]);
+        primaryKeyListBuilder.reset((AOrderedListType) MetadataRecordTypes.INDEX_RECORDTYPE
+                .getFieldTypes()[MetadataRecordTypes.INDEX_ARECORD_SEARCHKEY_FIELD_INDEX]);
         this.searchKey = instance.getKeyFieldNames();
         for (List<String> field : this.searchKey) {
             listBuilder.reset(stringList);
@@ -239,7 +240,7 @@ public class IndexTupleTranslator extends AbstractTupleTranslator<Index>
{
         intSerde.serialize(new AInt32(instance.getPendingOp()), fieldValue.getDataOutput());
         recordBuilder.addField(MetadataRecordTypes.INDEX_ARECORD_PENDINGOP_FIELD_INDEX, fieldValue);
 
-        // write optional field 8        
+        // write optional field 8
         if (instance.getGramLength() > 0) {
             fieldValue.reset();
             nameValue.reset();
@@ -256,7 +257,7 @@ public class IndexTupleTranslator extends AbstractTupleTranslator<Index>
{
         if (instance.isEnforcingKeyFileds()) {
             // write optional field 9
             OrderedListBuilder typeListBuilder = new OrderedListBuilder();
-            typeListBuilder.reset(new AOrderedListType(BuiltinType.ASTRING, null));
+            typeListBuilder.reset(new AOrderedListType(BuiltinType.ANY, null));
             ArrayBackedValueStorage nameValue = new ArrayBackedValueStorage();
             nameValue.reset();
             aString.setValue(INDEX_SEARCHKEY_TYPE_FIELD_NAME);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
index e8317eb..9b3207c 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AOrderedListSerializerDeserializer.java
@@ -20,7 +20,6 @@ package org.apache.asterix.dataflow.data.nontagged.serde;
 
 import java.io.DataInput;
 import java.io.DataOutput;
-import java.io.IOException;
 import java.util.ArrayList;
 
 import org.apache.asterix.builders.OrderedListBuilder;
@@ -64,9 +63,9 @@ public class AOrderedListSerializerDeserializer implements ISerializerDeserializ
     private void initSerializerDeserializer(IAType itemType) {
         this.itemType = itemType;
         serializer = AqlSerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(itemType);
-        deserializer = itemType.getTypeTag() == ATypeTag.ANY ? AqlSerializerDeserializerProvider.INSTANCE
-                .getSerializerDeserializer(itemType) : AqlSerializerDeserializerProvider.INSTANCE
-                .getNonTaggedSerializerDeserializer(itemType);
+        deserializer = itemType.getTypeTag() == ATypeTag.ANY
+                ? AqlSerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(itemType)
+                : AqlSerializerDeserializerProvider.INSTANCE.getNonTaggedSerializerDeserializer(itemType);
     }
 
     @Override
@@ -87,14 +86,6 @@ public class AOrderedListSerializerDeserializer implements ISerializerDeserializ
                     fixedSize = true;
                     break;
             }
-            
-            if (itemType.getTypeTag() == ATypeTag.ANY && typeTag != ATypeTag.ANY)
  
-            try {   
-                initSerializerDeserializer(BuiltinType.builtinTypeFromString(typeTag.name().toLowerCase()));
   
-            } catch (AsterixException e) {  
-                throw new HyracksDataException(e);  
-            }
-            
 
             in.readInt(); // list size
             int numberOfitems;
@@ -112,8 +103,7 @@ public class AOrderedListSerializerDeserializer implements ISerializerDeserializ
             }
             AOrderedListType type = new AOrderedListType(itemType, "orderedlist");
             return new AOrderedList(type, items);
-
-        } catch (IOException e) {
+        } catch (Exception e) {
             throw new HyracksDataException(e);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/288cfb4b/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java b/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
index 41d197f..e0bc10a 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
@@ -18,12 +18,11 @@
  */
 package org.apache.asterix.om.types;
 
-import org.json.JSONException;
-import org.json.JSONObject;
-
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.om.base.IAObject;
 import org.apache.asterix.om.visitors.IOMVisitor;
+import org.json.JSONException;
+import org.json.JSONObject;
 
 public abstract class BuiltinType implements IAType {
 
@@ -742,8 +741,8 @@ public abstract class BuiltinType implements IAType {
         }
     };
 
-    // AUUID_STRING is used when converting between the string representation of        
-    // UUID and corresponding a UUID instance       
+    // AUUID_STRING is used when converting between the string representation of
+    // UUID and corresponding a UUID instance
     public static final BuiltinType AUUID_STRING = new LowerCaseConstructorType() {
         private static final long serialVersionUID = 1L;
 
@@ -877,32 +876,4 @@ public abstract class BuiltinType implements IAType {
         return getType().getTypeTag().serialize();
     }
 
-    public static BuiltinType builtinTypeFromString(String str) throws AsterixException {
-        if (str.equals(BuiltinType.AINT32.getTypeName())) {
-            return BuiltinType.AINT32;
-        } else if (str.equals(BuiltinType.ASTRING.getTypeName())) {
-            return BuiltinType.ASTRING;
-        } else if (str.equals(BuiltinType.ADOUBLE.getTypeName())) {
-            return BuiltinType.ADOUBLE;
-        } else if (str.equals(BuiltinType.AFLOAT.getTypeName())) {
-            return BuiltinType.AFLOAT;
-        } else if (str.equals(BuiltinType.ANY.getTypeName())) {
-            return BuiltinType.ANY;
-        }
-        throw new AsterixException("No string translation for type: " + str + " .");
-    }
-
-    public static ATypeTag builtinTypeTagFromString(String str) throws AsterixException {
-        if (str.equals("int32")) {
-            return ATypeTag.INT32;
-        } else if (str.equals("string")) {
-            return ATypeTag.STRING;
-        } else if (str.equals("double")) {
-            return ATypeTag.DOUBLE;
-        } else if (str.equals("float")) {
-            return ATypeTag.FLOAT;
-        }
-        throw new AsterixException("No string translation for type: " + str + " .");
-    }
-
 }


Mime
View raw message