anishshri-db commented on code in PR #47257:
URL: https://github.com/apache/spark/pull/47257#discussion_r1683554622


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MapStateImplWithTTL.scala:
##########
@@ -169,13 +174,22 @@ class MapStateImplWithTTL[K, V](
    * @param groupingKey grouping key for which cleanup should be performed.
    * @param userKey     user key for which cleanup should be performed.
    */
-  override def clearIfExpired(groupingKey: Array[Byte], userKey: Array[Byte]): 
Long = {
-    val encodedCompositeKey = 
stateTypesEncoder.encodeCompositeKey(groupingKey, userKey)
-    val retRow = store.get(encodedCompositeKey, stateName)
+  override def clearIfExpired(
+      groupingKeyRow: UnsafeRow,
+      userKeyRow: UnsafeRow): Long = {
+    val compositeKeyRow =

Review Comment:
   we need to do this each time ?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to