Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4689#discussion_r24976046
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -888,6 +893,13 @@ class SQLContext(@transient val sparkContext: 
SparkContext)
        * only during the lifetime of this instance of SQLContext.
        */
       private[sql] def registerDataFrameAsTable(df: DataFrame, tableName: 
String): Unit = {
    +    if (catalog.tableExists(Seq(tableName)) && 
cacheManager.lookupCachedData(df).isEmpty) {
    +      // If the table already exists and the data of df has not already 
been cached
    +      // (we are trying to overwrite an existing temporary table),
    +      // we will try to uncache the InMemoryRelation associated with the 
existing table.
    +      cacheManager.tryUncacheQuery(table(tableName))
    --- End diff --
    
    Should we add `blocking = false` here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to