c21 commented on a change in pull request #33695:
URL: https://github.com/apache/spark/pull/33695#discussion_r696272822



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala
##########
@@ -170,7 +170,16 @@ class ParquetFileFormat
     val conf = sparkSession.sessionState.conf
     conf.parquetVectorizedReaderEnabled && conf.wholeStageEnabled &&
       schema.length <= conf.wholeStageMaxNumFields &&
-      schema.forall(_.dataType.isInstanceOf[AtomicType])
+      
schema.map(_.dataType).forall(isBatchReadSupported(sparkSession.sessionState.conf,
 _))
+  }
+
+  private def isBatchReadSupported(sqlConf: SQLConf, dt: DataType): Boolean = 
dt match {
+    case _: AtomicType =>
+      true
+    case _: ArrayType | _: MapType | _: StructType =>
+      sqlConf.parquetVectorizedReaderNestedColumnEnabled

Review comment:
       We need to check the sub-field type recursively right?




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