You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "Yohahaha (via GitHub)" <gi...@apache.org> on 2025/01/18 02:52:05 UTC
Re: [PR] [GLUTEN-8455][VL] Support encrypted parquet fallback for 3.5 [incubator-gluten]
Yohahaha commented on code in PR #8560:
URL: https://github.com/apache/incubator-gluten/pull/8560#discussion_r1920935586
##########
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:
why return file is encrypted when `EncryptionType.PLAINTEXT_FOOTER`?
would you post official parquet encrypt type doc?
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org