jinchengchenghh commented on code in PR #11117:
URL: 
https://github.com/apache/incubator-gluten/pull/11117#discussion_r2572212587


##########
backends-velox/src/main/scala/org/apache/gluten/utils/ParquetMetadataUtils.scala:
##########
@@ -82,21 +87,63 @@ object ParquetMetadataUtils {
    * @return
    *   True if an encrypted file is detected, false otherwise
    */
-  private def checkForEncryptionWithLimit(
+  private def checkForUnexpectedMetadataWithLimit(
       fs: FileSystem,
       path: Path,
       conf: Configuration,
+      parquetOptions: ParquetOptions,
       fileLimit: Int
-  ): Boolean = {
-
+  ): Option[String] = {
+    val isEncryptionValidationEnabled = 
GlutenConfig.get.parquetEncryptionValidationEnabled
     val filesIterator: RemoteIterator[LocatedFileStatus] = fs.listFiles(path, 
true)
     var checkedFileCount = 0
     while (filesIterator.hasNext && checkedFileCount < fileLimit) {
       val fileStatus = filesIterator.next()
       checkedFileCount += 1
-      if (SparkShimLoader.getSparkShims.isParquetFileEncrypted(fileStatus, 
conf)) {
-        return true
+      if (
+        isEncryptionValidationEnabled && 
SparkShimLoader.getSparkShims.isParquetFileEncrypted(

Review Comment:
   The isEncryptionValidationEnabled is false, this change will cause though 
isEncryptionValidationEnabled is false, fetch all the file, the hadoop 
listStatus is is heavy



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