andygrove commented on code in PR #1485:
URL: https://github.com/apache/datafusion-comet/pull/1485#discussion_r1993588356
##########
spark/src/main/scala/org/apache/spark/Plugins.scala:
##########
@@ -101,14 +101,16 @@ class CometDriverPlugin extends DriverPlugin with Logging
with ShimCometDriverPl
* unified memory manager.
*/
private def shouldOverrideMemoryConf(conf: SparkConf): Boolean = {
- conf.getBoolean(CometConf.COMET_ENABLED.key, true) && (
- conf.getBoolean(
- CometConf.COMET_EXEC_SHUFFLE_ENABLED.key,
- CometConf.COMET_EXEC_SHUFFLE_ENABLED.defaultValue.get) ||
- conf.getBoolean(
- CometConf.COMET_EXEC_ENABLED.key,
- CometConf.COMET_EXEC_ENABLED.defaultValue.get)
- ) && CometSparkSessionExtensions.cometUnifiedMemoryManagerEnabled(conf)
+ val comet_enabled = conf.getBoolean(CometConf.COMET_ENABLED.key, true)
+ val comet_exec_shuffle = conf.getBoolean(
+ CometConf.COMET_EXEC_SHUFFLE_ENABLED.key,
+ CometConf.COMET_EXEC_SHUFFLE_ENABLED.defaultValue.get)
+ val comet_exec = conf.getBoolean(
+ CometConf.COMET_EXEC_ENABLED.key,
+ CometConf.COMET_EXEC_ENABLED.defaultValue.get)
+ val unified_memory =
CometSparkSessionExtensions.cometUnifiedMemoryManagerEnabled(conf)
+
+ comet_enabled && (comet_exec_shuffle || comet_exec) && !unified_memory
Review Comment:
this is much clearer
--
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]