jackylee-ch commented on code in PR #8560:
URL: https://github.com/apache/incubator-gluten/pull/8560#discussion_r1922956843
##########
shims/spark35/src/main/scala/org/apache/gluten/sql/shims/spark35/Spark35Shims.scala:
##########
@@ -554,7 +559,22 @@ class Spark35Shims extends SparkShims {
override def isParquetFileEncrypted(
fileStatus: LocatedFileStatus,
conf: Configuration): Boolean = {
- // TODO: Support will be added
(https://github.com/apache/incubator-gluten/pull/8501)
- return false
+ try {
+ val footer =
+ ParquetFileReader.readFooter(conf, fileStatus.getPath,
ParquetMetadataConverter.NO_FILTER)
+ val fileMetaData = footer.getFileMetaData
+ fileMetaData.getEncryptionType match {
+ case EncryptionType.UNENCRYPTED =>
+ false
+ case EncryptionType.PLAINTEXT_FOOTER =>
+ true
+ case _ =>
+ false
+ }
Review Comment:
Could you add some comments to it? It should have some `EncryptionType`
description and how we deal with it.
--
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]