Github user dilipbiswal commented on the issue:

    https://github.com/apache/spark/pull/19286
  
    @viirya Hey simon, thanks for catching this. Will it be little easier to 
follow if we wrote like this ?
    ```
    override def isCascadingTruncateTable(): Option[Boolean] = {
       def compute(left: Option[Boolean], right: Option[Boolean]): 
Option[Boolean] = {
         (left, right) match {
           case (_, Some(true)) => Some(true)
           case (Some(true), _) => Some(true)
           case (Some(false), Some(false)) => Some(false)
           case (_, _) => None
         }
       }
       // If any dialect claims cascading truncate, this dialect is also 
cascading truncate.
       // Otherwise, if any dialect has unknown cascading truncate, this 
dialect is also unknown.
       dialects.map(_.isCascadingTruncateTable()).reduce(compute(_, _))
    ```


---

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

Reply via email to