From reviews-return-964046-archive-asf-public=cust-asf.ponee.io@spark.apache.org Tue Nov 12 07:47:17 2019 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 F285C180656 for ; Tue, 12 Nov 2019 08:47:16 +0100 (CET) Received: (qmail 60640 invoked by uid 500); 12 Nov 2019 07:47:16 -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 60625 invoked by uid 99); 12 Nov 2019 07:47:16 -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; Tue, 12 Nov 2019 07:47:16 +0000 From: GitBox To: reviews@spark.apache.org Subject: [GitHub] [spark] cloud-fan commented on a change in pull request #26463: [SPARK-29837][SQL] PostgreSQL dialect: cast to boolean Message-ID: <157354483622.27224.10236317119462361263.gitbox@gitbox.apache.org> Date: Tue, 12 Nov 2019 07:47:16 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit cloud-fan commented on a change in pull request #26463: [SPARK-29837][SQL] PostgreSQL dialect: cast to boolean URL: https://github.com/apache/spark/pull/26463#discussion_r345054707 ########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala ########## @@ -273,7 +273,7 @@ abstract class CastBase extends UnaryExpression with TimeZoneAwareExpression wit private[this] def needsTimeZone: Boolean = Cast.needsTimeZone(child.dataType, dataType) // [[func]] assumes the input is no longer null because eval already does the null check. - @inline private[this] def buildCast[T](a: Any, func: T => Any): Any = func(a.asInstanceOf[T]) + @inline protected[this] def buildCast[T](a: Any, func: T => Any): Any = func(a.asInstanceOf[T]) Review comment: nit: I don't think `[this]` here can buy us anything. How about just use `protected`? ---------------------------------------------------------------- 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