sryza commented on code in PR #51283:
URL: https://github.com/apache/spark/pull/51283#discussion_r2201512634


##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala:
##########
@@ -181,7 +182,7 @@ private[hive] class TestHiveSparkSession(
     @transient private val existingSharedState: Option[TestHiveSharedState],
     @transient private val parentSessionState: Option[SessionState],
     private val loadTestTables: Boolean)
-  extends SparkSession(sc) with Logging { self =>
+  extends TestSparkSession(sc) with Logging { self =>

Review Comment:
   For `HiveMaterializeTablesSuite`, we want to run the tests inside 
`MaterializeTablesSuite` against a `TestHiveSparkSession`.
   
   `MaterializeTablesSuite` inherits from `SharedSparkSession`, which has an 
overrideable `createSparkSession` method which returns a `TestSparkSession`. So 
my thought was to have `HiveMaterializeTablesSuite` to inherit from 
`MaterializeTablesSuite` and override `createSparkSession` inside 
`HiveMaterializeTablesSuite` to return a `TestHiveSparkSession`.  However, 
because `TestHiveSparkSession` is not a `TestSparkSession`, it's not a valid 
type to return from `createSparkSession`. Making `TestHiveSparkSession` extend 
`TestSparkSession` fixes this.
   
   I'm not at all convinced this is the right thing to do though. Do you have 
any other suggestions?



-- 
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]

Reply via email to