cloud-fan commented on code in PR #45721:
URL: https://github.com/apache/spark/pull/45721#discussion_r1539209968
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapBuilder.scala:
##########
@@ -52,18 +54,36 @@ class ArrayBasedMapBuilder(keyType: DataType, valueType:
DataType) extends Seria
private val mapKeyDedupPolicy =
SQLConf.get.getConf(SQLConf.MAP_KEY_DEDUP_POLICY)
+ private lazy val keyNeedNormalize =
NormalizeFloatingNumbers.needNormalize(keyType)
+
+ def normalize(value: Any, dataType: DataType): Any = dataType match {
Review Comment:
we should return a lambda function to do normalization based on the data
type, instead of matching the data type per row.
--
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]