zifeif2 commented on code in PR #53874:
URL: https://github.com/apache/spark/pull/53874#discussion_r2733553149
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/OfflineStateRepartitionIntegrationSuite.scala:
##########
@@ -25,17 +25,13 @@ import org.apache.spark.sql.streaming.{OutputMode, Trigger}
import org.apache.spark.sql.streaming.util.StreamManualClock
/**
- * Integration test suite for OfflineStateRepartitionRunner with stateful
operators.
+ * Integration test suite helper class for OfflineStateRepartitionRunner with
stateful operators.
* Tests state repartitioning (increase and decrease partitions) and validates:
* 1. State data remains identical after repartitioning
* 2. Offset and commit logs are updated correctly
* 3. Query can resume successfully and compute correctly with repartitioned
state
*/
-class OfflineStateRepartitionIntegrationSuite
- extends StateDataSourceTestBase {
-
- import testImplicits._
- import OfflineStateRepartitionTestUtils._
+abstract class OfflineStateRepartitionIntegrationSuiteBase extends
StateDataSourceTestBase {
Review Comment:
Changing this to abstract class instead of trait because here is the
inheritance chain
```
1. OfflineStateRepartitionIntegrationSuite (class) extends
OfflineStateRepartitionIntegrationSuiteBase (trait)
2. OfflineStateRepartitionIntegrationSuiteBase (trait) extends
StateDataSourceTestBase (trait)
3. StateDataSourceTestBase (trait) extends StreamTest (trait)
4. StreamTest (trait) extends QueryTest (abstract class)
5. QueryTest (abstract class) extends PlanTest (trait)
6. PlanTest (trait) extends SparkFunSuite (class)
```
which means that there is a ` concrete class → trait → trait → abstract
class → trait → class`.
In Scala, traits cannot safely hide or defer concrete superclasses for
concrete subclasses; the concrete superclass must be resolved at a class
boundary. Making this an abstract class allows it to legally “anchor” the
concrete superclass in the inheritance chain, ensuring correct class
linearization and avoiding illegal inheritance errors during compilation
--
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]