amaliujia commented on code in PR #38086:
URL: https://github.com/apache/spark/pull/38086#discussion_r988341922


##########
connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -81,7 +81,26 @@ class SparkConnectPlanner(plan: proto.Relation, session: 
SparkSession) {
         } else {
           child
         }
-      case _ => throw InvalidPlanInput()
+      case proto.Read.ReadTypeCase.FILE_DATA_SOURCE =>
+        val reader = session.read
+        if (rel.getFileDataSource.getFormat != null) {
+          reader.format(rel.getFileDataSource.getFormat)
+        }
+        if (rel.getFileDataSource.getSchema != null) {

Review Comment:
   This is the first I tried and I am pretty there is no `hasSchema`. This is 
so wried to me that the generate class does not have a `contains` like calls on 
these fields. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to