MaxGekk commented on pull request #31475: URL: https://github.com/apache/spark/pull/31475#issuecomment-775901454
> ... can you share the use case that you have for this? @rdblue For instance, v2 table catalog for JDBC: 0. I assume if a table supports the `SupportsTruncate` interface, it must support atomic remove of all data and write any set of rows (empty and **non-empty**). 1. Support of atomic `SupportsTruncate` is not so easy in the case of JDBC. For example, we still don't support it in JDBC v2 Table Catalog, see SPARK-32595. 2. DBMS usually provides special command for table truncation (see [DB2](https://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/sqlref/src/tpc/db2z_sql_truncate.html), [Oracle](https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_10007.htm#SQLRF01707), [PostgreSQL](https://www.postgresql.org/docs/9.1/sql-truncate.html), [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-TruncateTable)). So, we could map the new method `truncateTable` to a DBMS command. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
