ericm-db commented on code in PR #48401:
URL: https://github.com/apache/spark/pull/48401#discussion_r1828311471
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ListStateImpl.scala:
##########
@@ -40,7 +40,8 @@ class ListStateImpl[S](
stateName: String,
keyExprEnc: ExpressionEncoder[Any],
valEncoder: Encoder[S],
- metrics: Map[String, SQLMetric] = Map.empty)
+ metrics: Map[String, SQLMetric] = Map.empty,
+ avroEnc: Option[AvroEncoderSpec] = None)
Review Comment:
Add Comment
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StateStoreColumnFamilySchemaUtils.scala:
##########
@@ -17,35 +17,67 @@
package org.apache.spark.sql.execution.streaming
import org.apache.spark.sql.Encoder
+import org.apache.spark.sql.avro.{AvroDeserializer, AvroOptions,
AvroSerializer, SchemaConverters}
import org.apache.spark.sql.catalyst.encoders.ExpressionEncoder
import
org.apache.spark.sql.execution.streaming.TransformWithStateKeyValueRowSchemaUtils._
import
org.apache.spark.sql.execution.streaming.state.{NoPrefixKeyStateEncoderSpec,
PrefixKeyScanStateEncoderSpec, StateStoreColFamilySchema}
+import org.apache.spark.sql.execution.streaming.state.AvroEncoderSpec
import org.apache.spark.sql.types.StructType
object StateStoreColumnFamilySchemaUtils {
+ def apply(initializeAvroSerde: Boolean): StateStoreColumnFamilySchemaUtils =
+ new StateStoreColumnFamilySchemaUtils(initializeAvroSerde)
+}
+
+class StateStoreColumnFamilySchemaUtils(initializeAvroSerde: Boolean) {
+
+ private def getAvroSerde(
Review Comment:
Add comment
--
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]