Github user danielvdende commented on a diff in the pull request:
https://github.com/apache/spark/pull/19911#discussion_r155335791
--- 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 --
@dongjoon-hyun to be clear, I think there are 2 problems:
1. The PostgresDialect indicates that `CASCADE` is enabled by default for
Postgres. This isn't the case as the Postgres docs show.
2. As you correctly mention (this is what in my previous comment), Spark
doesn't use `CASCADE` at all, which, especially considering the method this PR
edits, is a bit odd I think. I plan to open a different JIRA ticket for this,
and add it. This will be more work, and is outside the scope of the current
JIRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]