Is your feature request related to a problem? Please describe.
When the configuration spark.sql.hive.convertMetastoreOrc is set to false, the format of the relation object becomes org.apache.spark.sql.hive.orc.OrcFileFormat instead of org.apache.spark.sql.execution.datasources.orc.OrcFileFormat. This causes an error: "Cannot convert non parquet/orc scan exec."
Describe the solution you'd like
Improve the ORC and Parquet format detection to be more generic.
Additional context
Spark version : 3.2.1