zhztheplayer commented on code in PR #10657:
URL: 
https://github.com/apache/incubator-gluten/pull/10657#discussion_r2332985562


##########
gluten-substrait/src/main/scala/org/apache/spark/sql/execution/ui/GlutenUIUtils.scala:
##########
@@ -28,16 +28,13 @@ object GlutenUIUtils {
    * Check if enabled the gluten ui, Please note that, developer should pass 
the gluten config if
    * call from sql module to prevent misjudgment caused by users directly 
setting sparkConf.
    */
-  def uiEnabled(sc: SparkContext, glutenConfig: Option[GlutenConfig] = None): 
Boolean = {
-    val glutenTabEnabled = if (glutenConfig.isDefined) {
-      glutenConfig.get.glutenUiEnabled
-    } else {
-      sc.getConf.getBoolean(
-        GlutenConfig.GLUTEN_UI_ENABLED.key,
-        GlutenConfig.GLUTEN_UI_ENABLED.defaultValue.get)
-    }
-    sc.ui.isDefined && glutenTabEnabled
-  }
+  def uiEnabled(sc: SparkContext, glutenConfig: Option[GlutenConfig] = None): 
Boolean =
+    sc.ui.isDefined && glutenConfig

Review Comment:
   Is it possible to keep only one parameter? i.e., `def uiEnabled(sc: 
SparkContext)`?



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