GitHub user kasjain opened a pull request:

    https://github.com/apache/spark/pull/12356

    [SPARK-14557][SQL] Reading textfile (created though CTAS) doesn't work

    ## What changes were proposed in this pull request?
    
    These changes fixes the below broken functionality
    Reading the CSV table created through CTAS query when the path pathFilter 
is provided.
    1) A bug in HadoopFileReader. Resolved by passing the directory instead of
    a list of files in case of pathFilter also, since the below code sets the 
path incorrectly otherwise.
     FileInputFormat.setInputPaths(jobConf, Seq[Path](new Path(path)): _*) 
    
    2) Not using the applyFilterIfApplicable since this triggers the filtering 
twice. Once in applyFilterIfApplicable and then again in FileInputFormat. These 
changes will also save multiple filterings in the codePath.
    
    ## How was this patch tested?
    Integration tests, manual tests


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kasjain/spark master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12356.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #12356
    
----
commit 48a598efe78ef1c9560a6af2d74e98b3bfaa8819
Author: Kashish Jain <[email protected]>
Date:   2016-04-13T10:40:34Z

    [SPARK-14557][SQL] Reading textfile (created though CTAS) doesn't work when
    pathFilter is enabled.
    1) A bug in HadoopFileReader. Resolved by passing the directory instead
    of a list of files in case of pathFilter also, since it gets triggerred in
    FileInputFormat. This also saves multiple filterings in the codePath.
    2) Not using the applyFilterIfApplicable

----


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

Reply via email to