Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20933#discussion_r179515742
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
---
@@ -213,6 +215,26 @@ case class DataSourceAnalysis(conf: SQLConf) extends
Rule[LogicalPlan] with Cast
}
}
+/**
+ * Replaces [[OrcDataSourceV2]] with [[DataSource]] if parent node is
[[InsertIntoTable]].
+ * This is because [[OrcDataSourceV2]] doesn't support writing data yet.
+ * @param sparkSession
+ */
+class FallBackToOrcV1(sparkSession: SparkSession) extends
Rule[LogicalPlan] {
+ private def convertToOrcV1(v2Relation: DataSourceV2Relation):
LogicalPlan = {
+ val v1 = DataSource.apply(
+ sparkSession = sparkSession,
+ paths = Seq.empty,
+ userSpecifiedSchema = v2Relation.userSpecifiedSchema,
+ className = "org.apache.spark.sql.execution.datasources.orc",
--- End diff --
don't hardcode it
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]