[ 
https://issues.apache.org/jira/browse/SPARK-52855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18032809#comment-18032809
 ] 

Sanford Ryza commented on SPARK-52855:
--------------------------------------

PR: https://github.com/apache/spark/pull/51590

> Prevent creating and dropping temp views on the session within Pipelines 
> Python definition files
> ------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-52855
>                 URL: https://issues.apache.org/jira/browse/SPARK-52855
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Declarative Pipelines
>    Affects Versions: 4.1.0
>            Reporter: Sandy Ryza
>            Assignee: Jacky Wang
>            Priority: Major
>             Fix For: 4.1.0
>
>
> Creating/replacing/dropping the temp views on the Spark session is an 
> imperative construct that can cause friction and unexpected behavior from 
> within a pipeline declaration. E.g. it makes pipeline behavior sensitive to 
> the order that Python files are imported in, which can be unpredictable. 
> Temporary views can already be defined using the `@temporary_view` decorator.
> Raising an error when someone tries to invoke to create/replace/drop a 
> temprary view in this situation would avoid this unpredictable behavior.
>  
> The ways to do this in Python are:
>  * DataFrame.createOrReplaceTempView
>  * DataFrame.createTempView
>  * spark.catalog.dropTempView
>  * DataFrame.createOrReplaceGlobalTempView
>  * DataFrame.createGlobalTempView
>  * spark.catalog.dropGlobalTempView



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to