dongjoon-hyun commented on a change in pull request #23383: [SPARK-23817][SQL]
Create file source V2 framework and migrate ORC read path
URL: https://github.com/apache/spark/pull/23383#discussion_r247195738
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
##########
@@ -213,6 +215,23 @@ case class DataSourceAnalysis(conf: SQLConf) extends
Rule[LogicalPlan] with Cast
}
}
+/**
+ * Replace the V2 data source of table in [[InsertIntoTable]] to V1
[[FileFormat]].
+ * E.g, with temporary view `t` using [[FileDataSourceV2]], inserting into
view `t` fails
+ * since there is no correspoding physical plan.
+ * This is a temporary hack for making current data source V2 work. It should
be removed
+ * when write path of file data source v2 is finished.
+ */
+class FallBackFileDataSourceToV1(sparkSession: SparkSession) extends
Rule[LogicalPlan] {
+ override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
+ case i @ InsertIntoTable(d @
+ DataSourceV2Relation(source: FileDataSourceV2, table: FileTable, _, _,
_), _, _, _, _) =>
Review comment:
Currently, line 228 and line 229 is intended identically. Line 228 should
have two more spaces.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]