From reviews-return-1015939-archive-asf-public=cust-asf.ponee.io@spark.apache.org Fri Jan 17 05:33:59 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id BA218180636 for ; Fri, 17 Jan 2020 06:33:58 +0100 (CET) Received: (qmail 37413 invoked by uid 500); 17 Jan 2020 05:33:58 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 37395 invoked by uid 99); 17 Jan 2020 05:33:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2020 05:33:58 +0000 From: GitBox To: reviews@spark.apache.org Subject: [GitHub] [spark] Ngone51 commented on issue #26881: [SPARK-30252][SQL] Disallow negative scale of Decimal Message-ID: <157923923804.4540.11184428306304829260.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Fri, 17 Jan 2020 05:33:58 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Ngone51 commented on issue #26881: [SPARK-30252][SQL] Disallow negative scale of Decimal URL: https://github.com/apache/spark/pull/26881#issuecomment-575472015 I reverted the check for max precision added in `set(decimal: BigDecimal)` because it can break overflow check. That is, Spark is allowed to create a decimal which has precision larger than 38 and then overflow check will decide to return null or throw exception which depends on ansi. So, if we try to add check early in the `set`, then we'll get exception early too before we check overflow. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org