asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Fixed the classad-parser for Optional Fields
Date Fri, 08 Apr 2016 17:43:13 GMT
abdullah alamoudi has submitted this change and it was merged.

Change subject: Fixed the classad-parser for Optional Fields
......................................................................


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>
---
M asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library/ClassAdParser.java
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Murtadha Hubail: Looks good to me, approved
  Jenkins: Verified



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 @@
                 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)) {

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/794
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie231ed3ca7411ed7a48192bf6f3c6385d287323a
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Murtadha Hubail <hubailmor@gmail.com>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message