jackylee-ch commented on code in PR #13149:
URL: https://github.com/apache/gluten/pull/13149#discussion_r4129215195


##########
gluten-core/src/main/scala/org/apache/gluten/extension/GlutenSessionExtensions.scala:
##########
@@ -44,7 +44,7 @@ private[gluten] class GlutenSessionExtensions
       session =>
         val glutenEnabledForThread =
           
Option(session.sparkContext.getLocalProperty(GLUTEN_ENABLE_FOR_THREAD_KEY))
-            .forall(_.toBoolean)
+            .forall(isEnabledForThread)

Review Comment:
   Could we extract a helper method for 
`session.sparkContext.getLocalProperty(GLUTEN_ENABLE_FOR_THREAD_KEY)`? There 
are other places using the same pattern, so it would be better to handle the 
check and conversion consistently in one place.



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