LuciferYang commented on code in PR #43394:
URL: https://github.com/apache/spark/pull/43394#discussion_r1361861749
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSparkSubmitSuite.scala:
##########
@@ -70,39 +71,41 @@ class WholeStageCodegenSparkSubmitSuite extends
SparkSubmitTestUtils
object WholeStageCodegenSparkSubmitSuite extends Assertions with Logging {
- var spark: SparkSession = _
-
def main(args: Array[String]): Unit = {
TestUtils.configTestLog4j2("INFO")
- spark = SparkSession.builder().getOrCreate()
+ val spark = SparkSession.builder()
+ .config(SQLConf.SHUFFLE_PARTITIONS.key, "2")
+ .getOrCreate()
+
+ try{
+ // Make sure the test is run where the driver and the executors uses
different object layouts
+ val driverArrayHeaderSize = Platform.BYTE_ARRAY_OFFSET
+ val executorArrayHeaderSize =
+ spark.sparkContext.range(0, 1).map(_ =>
Platform.BYTE_ARRAY_OFFSET).collect.head.toInt
Review Comment:
we can remove this `toInt`, it is redundant
--
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]