asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject incubator-asterixdb git commit: Fixed the classad-parser for Optional Fields
Date Fri, 08 Apr 2016 17:49:24 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master fd0147101 -> c5c78e48e


Fixed the classad-parser for Optional Fields

Change-Id: Ie231ed3ca7411ed7a48192bf6f3c6385d287323a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/794
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <hubailmor@gmail.com>


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

Branch: refs/heads/master
Commit: c5c78e48ea360ed3f56e91ffe217b2c121d49fc7
Parents: fd01471
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Fri Apr 8 20:17:06 2016 +0300
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Fri Apr 8 10:43:12 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/asterix/external/library/ClassAdParser.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/c5c78e48/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
index 93b31ca..3c22241 100644
--- a/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
+++ b/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
@@ -385,6 +385,11 @@ public class ClassAdParser extends AbstractDataParser implements IRecordDataPars
                 throw new HyracksDataException("Unknown Expression type detected: " + tree.getKind());
         }
 
+        if (fieldType != null) {
+            if (NonTaggedFormatUtil.isOptional(fieldType)) {
+                fieldType = ((AUnionType) fieldType).getNullableType();
+            }
+        }
         switch (val.getValueType()) {
             case ABSOLUTE_TIME_VALUE:
                 if (checkType(ATypeTag.DATETIME, fieldType)) {


Mime
View raw message