jiwen624 commented on code in PR #58235:
URL: https://github.com/apache/spark/pull/58235#discussion_r3942893544


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/PivotFirst.scala:
##########
@@ -88,11 +89,27 @@ case class PivotFirst(
 
   private val usesTreeMap: Boolean = 
!TypeUtils.typeWithProperEquals(pivotColumn.dataType)
 

Review Comment:
   Hi @uros-b Thanks for the review! `DoubleType` still uses HashMap, but it's 
Scala's HashMap not Java's: it compares keys with `==`, so +0.0/-0.0 are on the 
same entry and the buffer does shrink today. (I added a test case to demo it, 
will push it) - or I misunderstood what you meant?
   
   The description "identical literals, and values that compare equal on the 
current index (UTF8_LCASE 'a'/'A', equal structs/binaries)" makes sense to me 
though (since it covers +0.0/-0.0 too). Updated.



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