Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19874#discussion_r154853773
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
 ---
    @@ -850,3 +834,45 @@ object TypeCoercion {
         }
       }
     }
    +
    +trait TypePropagation extends Logging {
    --- End diff --
    
    how about
    ```
    trait TypeCoercionRule extends Rule[LogicalPlan] {
      protected def coerciveType(plan: LogicalPlan): LogicalPlan
    
      def apply(plan: LogicalPlan): LogicalPlan = {
        val newPlan = coerciveType(plan)
        ...
      }
    }
    ```


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to