ArnavBalyan commented on code in PR #8501:
URL: https://github.com/apache/incubator-gluten/pull/8501#discussion_r1913889799
##########
shims/spark32/src/main/scala/org/apache/gluten/sql/shims/spark32/Spark32Shims.scala:
##########
@@ -296,4 +300,19 @@ class Spark32Shims extends SparkShims {
override def unsetOperatorId(plan: QueryPlan[_]): Unit = {
plan.unsetTagValue(QueryPlan.OP_ID_TAG)
}
+
+ override def isParquetFileEncrypted(
+ fileStatus: LocatedFileStatus,
+ conf: Configuration): Boolean = {
+ try {
+ ParquetFileReader.readFooter(new Configuration(),
fileStatus.getPath).toString
+ false
+ } catch {
+ case e: Exception if ExceptionUtils.hasCause(e,
classOf[ParquetCryptoRuntimeException]) =>
Review Comment:
the exception may wrap ParquetCryptoRuntimeException, and may not directly
expose it. This handles all cases thanks
##########
shims/spark33/src/main/scala/org/apache/gluten/sql/shims/spark33/Spark33Shims.scala:
##########
@@ -377,4 +381,19 @@ class Spark33Shims extends SparkShims {
override def unsetOperatorId(plan: QueryPlan[_]): Unit = {
plan.unsetTagValue(QueryPlan.OP_ID_TAG)
}
+ override def isParquetFileEncrypted(
+ fileStatus: LocatedFileStatus,
+ conf: Configuration): Boolean = {
+ try {
+ ParquetFileReader.readFooter(new Configuration(),
fileStatus.getPath).toString
+ false
+ } catch {
+ case e: Exception if ExceptionUtils.hasCause(e,
classOf[ParquetCryptoRuntimeException]) =>
Review Comment:
addressed above
--
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]