[ 
https://issues.apache.org/jira/browse/SPARK-57354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Calvin Qin updated SPARK-57354:
-------------------------------
    Description: 
Spark's file-based data sources skip hidden files and directories (names who 
start with _ or . and files ending in ._COPYING _) during file listing and 
partition discovery. This filter is always on, with no way to override it. 

This adds a way to opt out of the filter, with a per-read data source option 
`ignoredPathSegmentRegex` and a session config that default to `^[._]`. Note 
that spark-specific files remain hardcoded and their listing behavior cannot be 
overridden with this option.

When changed, the pattern is applied to path segments. Positive matches are 
filtered out. `""` is special-cased to also list all files. The per-read option 
takes precedent over the session config.

  was:
Spark's file-based data sources skip hidden files and directories (names who 
start with _ or . and files ending in ._COPYING _) during file listing and 
partition discovery. This filter is always on, with no way to override it. 

This adds a way to opt out of the filter, with a per-read data source option 
`listHiddenFiles` and a session config `spark.sql.files.listHiddenFiles` 
(default false)

When true, hidden files and directories are listed. False maintains default 
behavior. The per-read option takes precedent over the session config.


> Add data source option to list hidden files
> -------------------------------------------
>
>                 Key: SPARK-57354
>                 URL: https://issues.apache.org/jira/browse/SPARK-57354
>             Project: Spark
>          Issue Type: New Feature
>          Components: Spark Core
>    Affects Versions: 4.2.0
>            Reporter: Calvin Qin
>            Assignee: Calvin Qin
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.3.0
>
>
> Spark's file-based data sources skip hidden files and directories (names who 
> start with _ or . and files ending in ._COPYING _) during file listing and 
> partition discovery. This filter is always on, with no way to override it. 
> This adds a way to opt out of the filter, with a per-read data source option 
> `ignoredPathSegmentRegex` and a session config that default to `^[._]`. Note 
> that spark-specific files remain hardcoded and their listing behavior cannot 
> be overridden with this option.
> When changed, the pattern is applied to path segments. Positive matches are 
> filtered out. `""` is special-cased to also list all files. The per-read 
> option takes precedent over the session config.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to