cloud-fan commented on a change in pull request #29667:
URL: https://github.com/apache/spark/pull/29667#discussion_r484618482



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
##########
@@ -177,7 +177,11 @@ case class FileSourceScanExec(
 
   private lazy val needsUnsafeRowConversion: Boolean = {
     if (relation.fileFormat.isInstanceOf[ParquetSource]) {
-      
SparkSession.getActiveSession.get.sessionState.conf.parquetVectorizedReaderEnabled
+      SparkSession.getActiveSession.orElse(SparkSession.getDefaultSession).map 
{ session =>
+        session.sessionState.conf.parquetVectorizedReaderEnabled
+      }.getOrElse {
+        SQLConf.get.parquetVectorizedReaderEnabled

Review comment:
       +1, if active session is set, `SQLConf.get` will read conf from active 
session.




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

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