@@ -47,8 +47,8 @@ import org.apache.comet.CometSparkSessionExtensions.{isCometLoaded, withInfo, wi
4747import org .apache .comet .DataTypeSupport .isComplexType
4848import org .apache .comet .iceberg .{CometIcebergNativeScanMetadata , IcebergReflection }
4949import org .apache .comet .objectstore .NativeConfig
50- import org .apache .comet .parquet .{Native , SupportsComet }
5150import org .apache .comet .parquet .CometParquetUtils .{encryptionEnabled , isEncryptionConfigSupported }
51+ import org .apache .comet .parquet .Native
5252import org .apache .comet .serde .operator .{CometIcebergNativeScan , CometNativeScan }
5353import org .apache .comet .shims .{CometTypeShim , ShimFileFormat , ShimSubqueryBroadcast }
5454
@@ -303,36 +303,7 @@ case class CometScanRule(session: SparkSession)
303303 withInfos(scanExec, fallbackReasons.toSet)
304304 }
305305
306- // Iceberg scan - patched version implementing SupportsComet interface
307- case s : SupportsComet if ! COMET_ICEBERG_NATIVE_ENABLED .get() =>
308- val fallbackReasons = new ListBuffer [String ]()
309-
310- if (! s.isCometEnabled) {
311- fallbackReasons += " Comet extension is not enabled for " +
312- s " ${scanExec.scan.getClass.getSimpleName}: not enabled on data source side "
313- }
314-
315- val schemaSupported =
316- CometBatchScanExec .isSchemaSupported(scanExec.scan.readSchema(), fallbackReasons)
317-
318- if (! schemaSupported) {
319- fallbackReasons += " Comet extension is not enabled for " +
320- s " ${scanExec.scan.getClass.getSimpleName}: Schema not supported "
321- }
322-
323- if (s.isCometEnabled && schemaSupported) {
324- // When reading from Iceberg, we automatically enable type promotion
325- SQLConf .get.setConfString(COMET_SCHEMA_EVOLUTION_ENABLED .key, " true" )
326- // When reading from Iceberg, we automatically disable native columnar to row
327- SQLConf .get.setConfString(COMET_NATIVE_COLUMNAR_TO_ROW_ENABLED .key, " false" )
328- CometBatchScanExec (
329- scanExec.clone().asInstanceOf [BatchScanExec ],
330- runtimeFilters = scanExec.runtimeFilters)
331- } else {
332- withInfos(scanExec, fallbackReasons.toSet)
333- }
334-
335- // Iceberg scan - detected by class name (works with unpatched Iceberg)
306+ // Iceberg scan - detected by class name
336307 case _
337308 if scanExec.scan.getClass.getName ==
338309 " org.apache.iceberg.spark.source.SparkBatchQueryScan" =>
0 commit comments