anishshri-db commented on code in PR #48985:
URL: https://github.com/apache/spark/pull/48985#discussion_r1861275972
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TransformWithStateExec.scala:
##########
@@ -83,6 +83,23 @@ case class TransformWithStateExec(
// dummy value schema, the real schema will get during state variable init
time
private val DUMMY_VALUE_ROW_SCHEMA = new StructType().add("value",
BinaryType)
+ // We need to just initialize key and value deserializer once per partition.
+ // The deserializers need to be lazily created on the executor since they
+ // are not serializable.
+ // TODO we can further optimize this to be done once per query.
+ // Currently, the deserializers are created once per partition per batch.
+ // We can improve this by creating the deserializers once per query run.
+ // To do this, we need adjust certain APIs in CodeGenerator to allow
Review Comment:
nit: `we need to adjust`
--
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]