anishshri-db commented on code in PR #52056:
URL: https://github.com/apache/spark/pull/52056#discussion_r2282968341
##########
sql/connect/common/src/main/scala/org/apache/spark/sql/connect/KeyValueGroupedDataset.scala:
##########
@@ -658,8 +659,14 @@ private class KeyValueGroupedDatasetImpl[K, V, IK, IV](
initialState: Option[sql.KeyValueGroupedDataset[K, S]] = None,
eventTimeColumnName: String = ""): Dataset[U] = {
val outputEncoder = agnosticEncoderFor[U]
- val stateEncoder = agnosticEncoderFor[S]
- val inputEncoders: Seq[AgnosticEncoder[_]] = Seq(kEncoder, stateEncoder,
ivEncoder)
+ val initialStateEncoder = if (initialState.isDefined) {
+ agnosticEncoderFor[S]
+ } else {
+ // Can not use `agnosticEncoderFor[S]` here because it points to
incorrect encoder
Review Comment:
nit: `Cannot use`
--
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]