stefankandic commented on code in PR #45549:
URL: https://github.com/apache/spark/pull/45549#discussion_r1535334643
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NormalizeFloatingNumbers.scala:
##########
@@ -144,6 +142,17 @@ object NormalizeFloatingNumbers extends Rule[LogicalPlan] {
val function = normalize(lv)
KnownFloatingPointNormalized(ArrayTransform(expr,
LambdaFunction(function, Seq(lv))))
+ case _ if expr.dataType.isInstanceOf[MapType] =>
+ val MapType(kt, vt, containsNull) = expr.dataType
+ val lv1 = NamedLambdaVariable("arg", kt, containsNull)
+ val lv2 = NamedLambdaVariable("arg", vt, containsNull)
+ val functionL1 = normalize(lv1)
+ val functionL2 = normalize(lv2)
+ KnownFloatingPointNormalized(
Review Comment:
if i'm reading this correctly this will return an array and not a map - we
should probably want to do normalization on keys and values separately and then
create a new map out of those right?
--
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]