Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/20057#discussion_r172685440
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/jdbc/OracleDialect.scala ---
@@ -95,4 +95,21 @@ private case object OracleDialect extends JdbcDialect {
}
override def isCascadingTruncateTable(): Option[Boolean] = Some(false)
+
+ /**
+ * The SQL query used to truncate a table.
+ * @param table The table to truncate
+ * @param cascade Whether or not to cascade the truncation. Default
value is the
+ * value of isCascadingTruncateTable()
+ * @return The SQL query to use for truncating a table
+ */
+ override def getTruncateQuery(
+ table: String,
+ cascade: Option[Boolean] = isCascadingTruncateTable): String = {
+ cascade match {
+ case Some(true) => s"TRUNCATE TABLE $table CASCADE"
+ case _ => s"TRUNCATE TABLE $table"
+ }
+ }
+
--- End diff --
Let's remove line 114.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]