You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takeshi Yamamuro (JIRA)" <ji...@apache.org> on 2016/07/01 02:07:11 UTC

[jira] [Commented] (SPARK-16317) Add file filtering interface for FileFormat

    [ https://issues.apache.org/jira/browse/SPARK-16317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15358235#comment-15358235 ] 

Takeshi Yamamuro commented on SPARK-16317:
------------------------------------------

Does this intend a hadoop PathFilter-like interface?
How about adding codes below in DataSource#inferFileFormatSchemal?
{code}
val passFilter = format.getPassFilter
format.inferSchema(
  sparkSession,
  caseInsensitiveOptions,
  fileCatalog.allFiles(passFilter))
{code}

> Add file filtering interface for FileFormat
> -------------------------------------------
>
>                 Key: SPARK-16317
>                 URL: https://issues.apache.org/jira/browse/SPARK-16317
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Cheng Lian
>            Priority: Minor
>
> {{FileFormat}} data sources like Parquet and Avro (provided by spark-avro) have customized file filtering logics. For example, Parquet needs to filter out summary files, while Avro provides a Hadoop configuration option to filter out all files whose names don't end with ".avro".
> It would be nice to have a general file filtering interface in {{FileFormat}} to handle similar requirements.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org