imback82 commented on a change in pull request #29437:
URL: https://github.com/apache/spark/pull/29437#discussion_r471253976



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -64,7 +64,9 @@ abstract class CSVDataSource extends Serializable {
       inputPaths: Seq[FileStatus],
       parsedOptions: CSVOptions): Option[StructType] = {
     if (inputPaths.nonEmpty) {
-      Some(infer(sparkSession, inputPaths, parsedOptions))
+      // Remove "path" option so that it is not added to the given 
`inputPaths`.

Review comment:
       For v1, I can fix it at the caller side of `FileFormat.inferSchema` to 
cover all datasources. And for v2, I can fix it at `CSVTable.inferSchema` and 
`JSONTable.inferSchema`; the other built-in datasources don't seem to be 
affected. WDYT?




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

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