cloud-fan commented on code in PR #47545:
URL: https://github.com/apache/spark/pull/47545#discussion_r1708993166
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala:
##########
@@ -894,8 +894,8 @@ case class MapFromEntries(child: Expression)
case class MapSort(base: Expression)
extends UnaryExpression with NullIntolerant with QueryErrorsBase {
- val keyType: DataType = base.dataType.asInstanceOf[MapType].keyType
- val valueType: DataType = base.dataType.asInstanceOf[MapType].valueType
+ private lazy val keyType: DataType =
base.dataType.asInstanceOf[MapType].keyType
+ private lazy val valueType: DataType =
base.dataType.asInstanceOf[MapType].valueType
Review Comment:
why lazy val? it's a very cheap operation
--
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]