Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20057#discussion_r168971182
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala ---
    @@ -49,4 +49,17 @@ private object DB2Dialect 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(). Ignored for DB2 
as it is unsupported.
    +   * @return The SQL query to use for truncating a table
    +   */
    +  override def getTruncateQuery(
    +      table: String,
    +      cascade: Option[Boolean] = isCascadingTruncateTable): String = {
    +    s"TRUNCATE TABLE $table"
    +  }
    --- End diff --
    
    Since this is the same code from JdbcDialect, it seems we don't need to add 
this here.
    Not only this DB2Dialect, but also DerbyDialect/MsSQLDialect/MySQLDialect.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to