Return-Path: X-Original-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2558119217 for ; Fri, 8 Apr 2016 17:48:27 +0000 (UTC) Received: (qmail 66893 invoked by uid 500); 8 Apr 2016 17:48:26 -0000 Delivered-To: apmail-asterixdb-notifications-archive@asterixdb.apache.org Received: (qmail 66828 invoked by uid 500); 8 Apr 2016 17:48:26 -0000 Mailing-List: contact notifications-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list notifications@asterixdb.incubator.apache.org Received: (qmail 66749 invoked by uid 99); 8 Apr 2016 17:48:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2016 17:48:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E124E1804FC for ; Fri, 8 Apr 2016 17:48:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.126 X-Spam-Level: ** X-Spam-Status: No, score=2.126 tagged_above=-999 required=6.31 tests=[MISSING_HEADERS=1.207, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 65UbMfFgPgD4 for ; Fri, 8 Apr 2016 17:48:24 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 7BB4A5F19B for ; Fri, 8 Apr 2016 17:48:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id 2D98B241E51; Fri, 8 Apr 2016 10:43:13 -0700 (PDT) Date: Fri, 8 Apr 2016 10:43:13 -0700 From: "abdullah alamoudi (Code Review)" CC: Jenkins , Murtadha Hubail Reply-To: bamousaa@gmail.com X-Gerrit-MessageType: merged Subject: Change in asterixdb[master]: Fixed the classad-parser for Optional Fields X-Gerrit-Change-Id: Ie231ed3ca7411ed7a48192bf6f3c6385d287323a X-Gerrit-ChangeURL: X-Gerrit-Commit: c5c78e48ea360ed3f56e91ffe217b2c121d49fc7 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.8.4 Message-Id: <20160408174313.2D98B241E51@unhygienix.ics.uci.edu> 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 Reviewed-by: Murtadha Hubail --- 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 Gerrit-Reviewer: Jenkins Gerrit-Reviewer: Murtadha Hubail Gerrit-Reviewer: abdullah alamoudi