You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/27 02:23:31 UTC

[GitHub] [spark] sandeep-katta commented on issue #25399: [SPARK-28670][SQL] create function should thrown Exception if the resource is not found

sandeep-katta commented on issue #25399: [SPARK-28670][SQL] create function should thrown Exception if the resource is not found
URL: https://github.com/apache/spark/pull/25399#issuecomment-569168809
 
 
   > can you resolve conflicts?
   > 
   > Also,
   > 
   > > current flow is as below
   > 
   > > Once the resource is loaded, spark checks for given className if it doesn't find it throws AnalysisException.
   > 
   > > In case of temporary function the above checks at creation time.
   > > For Permanent function check is delayed till the select statement.
   > 
   > Where does "In case of temporary function the above checks at creation time" happen?
   
   Here https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala#L81
   
   ![image](https://user-images.githubusercontent.com/35216143/71497075-97705a80-287c-11ea-84b1-b75c3b3c2d90.png)
   
   `catalog.loadFunctionResources` API throws exception if no resources are find. For permanent function `catalog.loadFunctionResources` API will be called on select statement
   
   `catalog.loadFunctionResources` will call `SparkContext.addJar`. Resource check condition in addJar 
   https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L1844-L1882
    
   ![image](https://user-images.githubusercontent.com/35216143/71497329-b3283080-287d-11ea-95b4-da3b2ba3b498.png)
   

----------------------------------------------------------------
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