From 72b9f2d407045827d6caa22ef1738bc4291d6fb7 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Tue, 17 Sep 2024 07:52:59 -0700 Subject: [PATCH] review comment --- .../streaming/state/StateSchemaCompatibilityChecker.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateSchemaCompatibilityChecker.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateSchemaCompatibilityChecker.scala index 3dee2aec5cc7d..22702216ba45a 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateSchemaCompatibilityChecker.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateSchemaCompatibilityChecker.scala @@ -173,7 +173,7 @@ class StateSchemaCompatibilityChecker( if (existingStateSchemaList.isEmpty) { // write the schema file if it doesn't exist - createSchemaFile(newStateSchemaList, stateSchemaVersion) + createSchemaFile(newStateSchemaList.sortBy(_.colFamilyName), stateSchemaVersion) true } else { // validate if the new schema is compatible with the existing schema