stefankandic commented on code in PR #45549:
URL: https://github.com/apache/spark/pull/45549#discussion_r1535329950
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NormalizeFloatingNumbers.scala:
##########
@@ -98,9 +98,7 @@ object NormalizeFloatingNumbers extends Rule[LogicalPlan] {
case FloatType | DoubleType => true
case StructType(fields) => fields.exists(f => needNormalize(f.dataType))
case ArrayType(et, _) => needNormalize(et)
- // Currently MapType is not comparable and analyzer should fail earlier if
this case happens.
- case _: MapType =>
- throw SparkException.internalError("grouping/join/window partition keys
cannot be map type.")
+ case MapType(kt, vt, _) => needNormalize(kt) && needNormalize(vt)
Review Comment:
also we should probably add some tests for cases where the normalization is
needed
--
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]