cloud-fan commented on a change in pull request #23908: [SPARK-27001][SQL] Refactor "serializerFor" method between ScalaReflection and JavaTypeInference URL: https://github.com/apache/spark/pull/23908#discussion_r261513064
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala ########## @@ -1378,7 +1378,10 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String * Cast the child expression to the target data type, but will throw error if the cast might * truncate, e.g. long -> int, timestamp -> data. */ -case class UpCast(child: Expression, dataType: DataType, walkedTypePath: Seq[String]) +case class UpCast( + child: Expression, + dataType: DataType, + walkedTypePath: WalkedTypePath = new WalkedTypePath()) Review comment: can we keep it `Seq[String]`? When we reach here, the `walkedTypePath` is only needed for logging/error message, and we don't need the `WalkedTypePath` class to help accumulate the paths. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
