You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2017/12/12 18:45:01 UTC
[jira] [Resolved] (SPARK-22729) Add getTruncateQuery to JdbcDialect
[ https://issues.apache.org/jira/browse/SPARK-22729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiao Li resolved SPARK-22729.
-----------------------------
Resolution: Fixed
Fix Version/s: 2.3.0
> 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
> Assignee: Daniel van der Ende
> Fix For: 2.3.0
>
>
> 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