From reviews-return-1161928-archive-asf-public=cust-asf.ponee.io@spark.apache.org Wed Sep 2 09:08:49 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id B142A18065D for ; Wed, 2 Sep 2020 11:08:49 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id E51FE121927 for ; Wed, 2 Sep 2020 09:08:48 +0000 (UTC) Received: (qmail 38617 invoked by uid 500); 2 Sep 2020 09:08:48 -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 38601 invoked by uid 99); 2 Sep 2020 09:08:48 -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; Wed, 02 Sep 2020 09:08:48 +0000 From: =?utf-8?q?GitBox?= To: reviews@spark.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bspark=5D_cloud-fan_commented_on_a_change_in_pull_r?= =?utf-8?q?equest_=2329502=3A_=5BSPARK-32677=5D=5BSQL=5D_Load_function_resou?= =?utf-8?q?rce_before_create?= Message-ID: <159903772864.32230.12203274382394165339.asfpy@gitbox.apache.org> Date: Wed, 02 Sep 2020 09:08:48 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: cloud-fan commented on a change in pull request #29502: URL: https://github.com/apache/spark/pull/29502#discussion_r481919641 ########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala ########## @@ -76,14 +76,15 @@ case class CreateFunctionCommand( override def run(sparkSession: SparkSession): Seq[Row] = { val catalog = sparkSession.sessionState.catalog val func = CatalogFunction(FunctionIdentifier(functionName, databaseName), className, resources) + catalog.loadFunctionResources(resources) + // We fail fast if function class is not exists. + catalog.requireFunctionClassExists(func) Review comment: is this needed? shouldn't `loadFunctionResources` already does the work? ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org