mihailotim-db commented on code in PR #48596:
URL: https://github.com/apache/spark/pull/48596#discussion_r1822096454


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/DecimalPrecision.scala:
##########
@@ -53,9 +50,13 @@ import org.apache.spark.sql.types._
  */
 // scalastyle:on
 object DecimalPrecision extends TypeCoercionRule {
-  import scala.math.max
+  override def transform: PartialFunction[Expression, Expression] = {
+    // Skip nodes whose children have not been resolved yet
+    case e if !e.childrenResolved => e
+    case withChildrenResolved => 
DecimalPrecisionTypeCoercion(withChildrenResolved)
+  }
 
-  private def isFloat(t: DataType): Boolean = t == FloatType || t == DoubleType
+  import scala.math.max
 
   // Returns the wider decimal type that's wider than both of them
   def widerDecimalType(d1: DecimalType, d2: DecimalType): DecimalType = {

Review Comment:
   Done! Did the same for `CollationTypeCasts` as well



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to