stefankandic commented on code in PR #45383:
URL: https://github.com/apache/spark/pull/45383#discussion_r1513032494


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala:
##########
@@ -958,14 +1062,16 @@ object TypeCoercion extends TypeCoercionBase {
 
   override def implicitCast(e: Expression, expectedType: AbstractDataType): 
Option[Expression] = {
     implicitCast(e.dataType, expectedType).map { dt =>
-      if (dt == e.dataType) e else Cast(e, dt)
+      if (dt == e.dataType) { e }

Review Comment:
   if the whole if statement isn't in one line statements shouldn't be on the 
same line as the condition
   see 
https://github.com/databricks/scala-style-guide?tab=readme-ov-file#curly-braces



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