cloud-fan commented on a change in pull request #23383: [SPARK-23817][SQL] 
Migrate ORC file format read path to data source V2
URL: https://github.com/apache/spark/pull/23383#discussion_r245276897
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
 ##########
 @@ -90,10 +94,19 @@ case class DataSource(
 
   case class SourceInfo(name: String, schema: StructType, partitionColumns: 
Seq[String])
 
-  lazy val providingClass: Class[_] =
-    DataSource.lookupDataSource(className, sparkSession.sessionState.conf)
+  lazy val providingClass: Class[_] = {
+    val cls = DataSource.lookupDataSource(className, 
sparkSession.sessionState.conf)
+    // Here `providingClass` is supposed to be V1 file format. Currently 
[[FileDataSourceV2]]
+    // doesn't support catalog, so creating tables with V2 file format still 
uses this code path.
+    // As a temporary hack to avoid failure, [[FileDataSourceV2]] is falled 
back to [[FileFormat]].
 
 Review comment:
   instead of handling it here, shall we do it at the rule 
`FindDataSourceTable`?

----------------------------------------------------------------
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]

Reply via email to