From reviews-return-658447-archive-asf-public=cust-asf.ponee.io@spark.apache.org Mon Jun 11 21:52:35 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 32C67180647 for ; Mon, 11 Jun 2018 21:52:35 +0200 (CEST) Received: (qmail 76700 invoked by uid 500); 11 Jun 2018 19:52:34 -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 76689 invoked by uid 99); 11 Jun 2018 19:52:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2018 19:52:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 82EFEE0BBC; Mon, 11 Jun 2018 19:52:33 +0000 (UTC) From: cloud-fan To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request #20636: [SPARK-23415][SQL][TEST] Make behavior of BufferH... Content-Type: text/plain Message-Id: <20180611195233.82EFEE0BBC@git1-us-west.apache.org> Date: Mon, 11 Jun 2018 19:52:33 +0000 (UTC) Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20636#discussion_r194526656 --- Diff: sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/BufferHolder.java --- @@ -61,6 +61,10 @@ * Grows the buffer by at least neededSize and points the row to the buffer. */ void grow(int neededSize) { + if (neededSize < 0) { --- End diff -- I think we can use `assert` here. When `neededSize` is negative, there must be an overflow. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org