commit | c5c78e48ea360ed3f56e91ffe217b2c121d49fc7 | [log] [tgz] |
---|---|---|
author | Abdullah Alamoudi <bamousaa@gmail.com> | Fri Apr 08 20:17:06 2016 +0300 |
committer | abdullah alamoudi <bamousaa@gmail.com> | Fri Apr 08 10:43:12 2016 -0700 |
tree | 0c0bf3a106ce426a8107ca310cea43d10f7043c3 | |
parent | fd0147101de9bdfa5d35b211b51b7fbfd6aa5618 [diff] |
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>
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)) {