sahnib commented on code in PR #45674:
URL: https://github.com/apache/spark/pull/45674#discussion_r1548203583
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StateTypesEncoderUtils.scala:
##########
@@ -65,22 +75,49 @@ class StateTypesEncoder[GK, V](
// TODO: validate places that are trying to encode the key and check if we
can eliminate/
// add caching for some of these calls.
def encodeGroupingKey(): UnsafeRow = {
+ val keyRow = keyProjection(InternalRow(serializeGroupingKey()))
+ keyRow
+ }
+
+ /**
+ * Encodes the provided grouping key into Spark UnsafeRow.
+ *
+ * @param groupingKeyBytes serialized grouping key byte array
+ * @return encoded UnsafeRow
+ */
+ def encodeSerializedGroupingKey(
+ groupingKeyBytes: Array[Byte]): UnsafeRow = {
Review Comment:
yes, done.
--
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]