micheal-o commented on code in PR #54019:
URL: https://github.com/apache/spark/pull/54019#discussion_r2735039854
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StatePartitionWriter.scala:
##########
@@ -55,24 +53,16 @@ class StatePartitionAllColumnFamiliesWriter(
storeName: String,
currentBatchId: Long,
colFamilyToWriterInfoMap: Map[String,
StatePartitionWriterColumnFamilyInfo],
- operatorName: String,
- schemaProviderOpt: Option[StateSchemaProvider],
- sqlConf: SQLConf) {
-
- private def isJoinV3Operator(
- operatorName: String, sqlConf: SQLConf): Boolean = {
- operatorName == StatefulOperatorsUtils.SYMMETRIC_HASH_JOIN_EXEC_OP_NAME &&
- sqlConf.getConf(SQLConf.STREAMING_JOIN_STATE_FORMAT_VERSION) == 3
- }
+ schemaProviderOpt: Option[StateSchemaProvider]) {
+ // Using the heuristic that all operators that enable column families
+ // has a non-default column family
+ private val useColumnFamilies = colFamilyToWriterInfoMap.keys.toSeq
+ .exists(_ != StateStoreId.DEFAULT_STORE_NAME)
private val defaultSchema = {
colFamilyToWriterInfoMap.get(StateStore.DEFAULT_COL_FAMILY_NAME) match {
case Some(info) => info.schema
case None =>
- // joinV3 operator doesn't have default column family schema
- assert(isJoinV3Operator(operatorName, sqlConf),
Review Comment:
fyi @zifeif2 so you don't miss this 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]