File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
main/scala/org/apache/comet/rules
test/scala/org/apache/spark/sql/comet Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,16 @@ case class CometScanRule(session: SparkSession) extends Rule[SparkPlan] {
132
132
return withInfos(scanExec, fallbackReasons.toSet)
133
133
}
134
134
135
+ val encryptionEnabled : Boolean =
136
+ conf.getConfString(" parquet.crypto.factory.class" , " " ).nonEmpty &&
137
+ conf.getConfString(" parquet.encryption.kms.client.class" , " " ).nonEmpty
138
+
139
+ if (scanImpl != CometConf .SCAN_NATIVE_COMET && encryptionEnabled) {
140
+ fallbackReasons +=
141
+ " Full native scan disabled because encryption is not supported"
142
+ return withInfos(scanExec, fallbackReasons.toSet)
143
+ }
144
+
135
145
val typeChecker = CometScanTypeChecker (scanImpl)
136
146
val schemaSupported =
137
147
typeChecker.isSchemaSupported(scanExec.requiredSchema, fallbackReasons)
Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ class ParquetEncryptionITCase extends CometTestBase with SQLTestUtils {
49
49
private val key2 = encoder.encodeToString(" 1234567890123451" .getBytes(StandardCharsets .UTF_8 ))
50
50
51
51
test(" SPARK-34990: Write and read an encrypted parquet" ) {
52
- // https://github.com/apache/datafusion-comet/issues/1488
53
- assume(CometConf .COMET_NATIVE_SCAN_IMPL .get() != CometConf .SCAN_NATIVE_ICEBERG_COMPAT )
52
+ assume(CometConf .COMET_NATIVE_SCAN_IMPL .get() == CometConf .SCAN_NATIVE_COMET )
54
53
55
54
import testImplicits ._
56
55
@@ -93,8 +92,7 @@ class ParquetEncryptionITCase extends CometTestBase with SQLTestUtils {
93
92
}
94
93
95
94
test(" SPARK-37117: Can't read files in Parquet encryption external key material mode" ) {
96
- // https://github.com/apache/datafusion-comet/issues/1488
97
- assume(CometConf .COMET_NATIVE_SCAN_IMPL .get() != CometConf .SCAN_NATIVE_ICEBERG_COMPAT )
95
+ assume(CometConf .COMET_NATIVE_SCAN_IMPL .get() == CometConf .SCAN_NATIVE_COMET )
98
96
99
97
import testImplicits ._
100
98
You can’t perform that action at this time.
0 commit comments