[
https://issues.apache.org/jira/browse/SPARK-22729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xiao Li updated SPARK-22729:
----------------------------
Issue Type: Improvement (was: New Feature)
> Add getTruncateQuery to JdbcDialect
> -----------------------------------
>
> Key: SPARK-22729
> URL: https://issues.apache.org/jira/browse/SPARK-22729
> Project: Spark
> Issue Type: Improvement
> 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: [email protected]
For additional commands, e-mail: [email protected]