You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/12/07 13:08:00 UTC

[jira] [Assigned] (SPARK-22729) Add getTruncateQuery to JdbcDialect

     [ https://issues.apache.org/jira/browse/SPARK-22729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-22729:
------------------------------------

    Assignee:     (was: Apache Spark)

> Add getTruncateQuery to JdbcDialect
> -----------------------------------
>
>                 Key: SPARK-22729
>                 URL: https://issues.apache.org/jira/browse/SPARK-22729
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 2.2.1
>            Reporter: Daniel van der Ende
>
> In order to enable truncate for PostgreSQL databases in Spark JDBC, a change is needed to the query used for truncating a PostgreSQL table. By default, PostgreSQL will automatically truncate any descendant tables if a TRUNCATE query is executed. As this may result in (unwanted) side-effects, the query used for the truncate should be specified separately for PostgreSQL, specifying only to TRUNCATE a single table.
> This will also resolve SPARK-22717
> See PostgreSQL documentation https://www.postgresql.org/docs/current/static/sql-truncate.html
> This change will still not let users truncate a table with cascade enabled (which would also truncate tables with foreign key constraints to the table).



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

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