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

Daniel van der Ende edited comment on SPARK-22880 at 12/22/17 6:31 PM:
-----------------------------------------------------------------------

It's different in the sense that SPARK-22717's scope was to correct a bug; 
PostgreSQL does not cascade by default. The reason this was particularly nasty, 
was that it actually prevented any PostgreSQL table from being truncated, as 
the logic dictates that if a table is truncated by default by a database, it 
cannot be truncated. This issue (SPARK-22880) is about adding an option to 
allow users to enable cascade for truncating tables if they want to. 


was (Author: danielvdende):
It's different in the sense that 
[SPARK-22717|https://github.com/apache/spark/pull/19911]'s scope was to correct 
a bug; PostgreSQL does not cascade by default. The reason this was particularly 
nasty, was that it actually prevented any PostgreSQL table from being 
truncated, as the logic dictates that if a table is truncated by default by a 
database, it cannot be truncated. This issue (SPARK-22880) is about adding an 
option to allow users to enable cascade for truncating tables if they want to. 

> Add option to cascade jdbc truncate if database supports this (PostgreSQL and 
> Oracle)
> -------------------------------------------------------------------------------------
>
>                 Key: SPARK-22880
>                 URL: https://issues.apache.org/jira/browse/SPARK-22880
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 2.2.1
>            Reporter: Daniel van der Ende
>            Priority: Minor
>
> When truncating tables, PostgreSQL and Oracle support an option `TRUNCATE`. 
> This cascades the truncate to tables with foreign key constraints on a column 
> in the table specified to truncate. It would be nice to be able to optionally 
> set this `TRUNCATE` option for PostgreSQL and Oracle.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to