address code revew feedback, changed type for cardinality hint to Long from Int 2) fixed indx value in DatasetTupleTranslator

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_issue_251@1108 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/DatasetHints.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/DatasetHints.java
index 516a559..4836302 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/DatasetHints.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/DatasetHints.java
@@ -69,15 +69,15 @@
     @Override
     public Pair<Boolean, String> validateValue(String value) {
         boolean valid = true;
-        int intValue;
+        long longValue;
         try {
-            intValue = Integer.parseInt(value);
-            if (intValue < 0) {
+            longValue = Long.parseLong(value);
+            if (longValue < 0) {
                 return new Pair<Boolean, String>(false, "Value must be >= 0");
             }
         } catch (NumberFormatException nfe) {
             valid = false;
-            return new Pair<Boolean, String>(valid, "Inappropriate value, not an integer");
+            return new Pair<Boolean, String>(valid, "Inappropriate value");
         }
         return new Pair<Boolean, String>(true, null);
     }
diff --git a/asterix-aql/src/main/javacc/AQL.jj b/asterix-aql/src/main/javacc/AQL.jj
index fd5aaaa..33ee7dc 100644
--- a/asterix-aql/src/main/javacc/AQL.jj
+++ b/asterix-aql/src/main/javacc/AQL.jj
@@ -954,7 +954,7 @@
             (<INTEGER_LITERAL>
              {
              try{
-              value = "" + Integer.valueOf(token.image);
+              value = "" + Long.valueOf(token.image);
               } catch (NumberFormatException nfe){
                   throw new ParseException("inapproriate value: " + token.image); 
               }
@@ -981,7 +981,7 @@
            (<INTEGER_LITERAL>
             {
               try{
-                value = "" + Integer.valueOf(token.image);
+                value = "" + Long.valueOf(token.image);
               } catch (NumberFormatException nfe){
               	throw new ParseException("inapproriate value: " + token.image); 
               }
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java
index f9a9916..483bb70 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/entitytupletranslators/DatasetTupleTranslator.java
@@ -313,7 +313,7 @@
             ARecord field = (ARecord) cursor.get();
             key = ((AString) field.getValueByPos(MetadataRecordTypes.DATASOURCE_PROPERTIES_NAME_FIELD_INDEX))
                     .getStringValue();
-            value = ((AString) field.getValueByPos(MetadataRecordTypes.DATASOURCE_PROPERTIES_NAME_FIELD_INDEX))
+            value = ((AString) field.getValueByPos(MetadataRecordTypes.DATASOURCE_PROPERTIES_VALUE_FIELD_INDEX))
                     .getStringValue();
             hints.put(key, value);
         }