Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 33187200CBC for ; Tue, 20 Jun 2017 16:44:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 31E6D160BE1; Tue, 20 Jun 2017 14:44:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7805B160BD3 for ; Tue, 20 Jun 2017 16:44:04 +0200 (CEST) Received: (qmail 64674 invoked by uid 500); 20 Jun 2017 14:44:03 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 64662 invoked by uid 99); 20 Jun 2017 14:44:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2017 14:44:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BAD8DC152A; Tue, 20 Jun 2017 14:43:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.99 X-Spam-Level: ** X-Spam-Status: No, score=2.99 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id onsqxLFpcWGX; Tue, 20 Jun 2017 14:43:57 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id AF16C5F341; Tue, 20 Jun 2017 14:43:57 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8B1BFE0D28; Tue, 20 Jun 2017 14:43:56 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 7C867C4021B; Tue, 20 Jun 2017 14:43:56 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3720780761297687990==" MIME-Version: 1.0 Subject: Re: Review Request 60204: Added Additional Validation to AtlasFloatType & AtlasDoubleType From: Ashutosh Mestry To: Madhan Neethiraj , Sarath Subramanian Cc: Ashutosh Mestry , atlas Date: Tue, 20 Jun 2017 14:43:56 -0000 Message-ID: <20170620144356.43050.19196@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Ashutosh Mestry X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/60204/ X-Sender: Ashutosh Mestry References: <20170620073304.43050.83511@reviews-vm2.apache.org> In-Reply-To: <20170620073304.43050.83511@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: intg/src/test/java/org/apache/atlas/type/AtlasBuiltInTypesTest.java Reply-To: Ashutosh Mestry X-ReviewRequest-Repository: atlas archived-at: Tue, 20 Jun 2017 14:44:05 -0000 --===============3720780761297687990== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On June 20, 2017, 7:33 a.m., Sarath Subramanian wrote: > > Tests for built-in types exist. I just didn't find them. I will add my unit tests to those. Also I found flaw in my logic, I need to re-work it. Please don't review, until I upload a new patch. - Ashutosh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60204/#review178352 ----------------------------------------------------------- On June 19, 2017, 7:41 p.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60204/ > ----------------------------------------------------------- > > (Updated June 19, 2017, 7:41 p.m.) > > > Review request for atlas, Madhan Neethiraj and Sarath Subramanian. > > > Bugs: ATLAS-1876 > https://issues.apache.org/jira/browse/ATLAS-1876 > > > Repository: atlas > > > Description > ------- > > **Background** > Refer to ATLAS-1876 for details. Please see the modified steps in comments section. > > **Root Cause** > _AtlasBuiltInTypes_ do not validate the incoming types using the range check for the primitive types. This causes out of range _float_ and _double_ values to be passed as valid even when they are holding _Infinity_. > > While the attribute value assignment goes through within the code, subsequent operations fail as the correct values are not present in the database. > > **Fix** > Range check added for _float_ and _double_. > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java f08a6015 > intg/src/test/java/org/apache/atlas/type/AtlasBuiltInTypesTest.java PRE-CREATION > > > Diff: https://reviews.apache.org/r/60204/diff/1/ > > > Testing > ------- > > **Unit tests** > - New unit tests added for _AtlasFloatType_ and _AtlasDoubleType_. > > **Functional tests** > - Validation verified by following steps mentioned in JIRA. Validation error is returned instead of successful operation. > > > Thanks, > > Ashutosh Mestry > > --===============3720780761297687990==--