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

    https://github.com/apache/spark/pull/19911#discussion_r155331702
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala ---
    @@ -100,5 +100,5 @@ private object PostgresDialect extends JdbcDialect {
     
       }
     
    -  override def isCascadingTruncateTable(): Option[Boolean] = Some(true)
    +  override def isCascadingTruncateTable(): Option[Boolean] = Some(false)
    --- End diff --
    
    ```
    
    CASCADE
    
        Automatically truncate all tables that have foreign-key references to 
any of the named tables, or to any tables added to the group due to CASCADE.
    
    ``` 
    So I think the difference is that `CASCADE` will also affect tables with 
foreign-key references to the table in question, rather than only its 
descendant tables. The function definition (and its name) seems to point more 
towards the definition of `CASCADE` behaviour than `ONLY` imho


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to