Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/12616#discussion_r62741054
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSource.scala
---
@@ -97,21 +102,30 @@ class FileStreamSource(
assert(startId <= endId)
val files = metadataLog.get(Some(startId + 1),
Some(endId)).flatMap(_._2)
logInfo(s"Processing ${files.length} files from ${startId + 1}:$endId")
- logDebug(s"Streaming ${files.mkString(", ")}")
- dataFrameBuilder(files)
+ logTrace(s"Files are:\n\t" + files.mkString("\n\t"))
+ val newOptions = options.filterKeys(_ != "path")
+ val newDataSource =
+ DataSource(
+ sparkSession,
+ paths = files,
+ userSpecifiedSchema = Some(schema),
+ className = fileFormatClassName,
+ options = new CaseInsensitiveMap(newOptions))
--- End diff --
No we dont need to. Not adding base path, and giving only a list of files
(no dirs in them) ensures that partitioned directories are not parsed. That is
the intention, we are not supporting partitioned directories in the file stream
yet.
On that note, if the user exlicitly specifies base path in the options, I
dont know what will happen. Maybe we should throw an error in that case. What
do you think?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]