GitHub user HyukjinKwon opened a pull request:

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

    [SPARK-10216][SQL] Avoid creating empty files during overwrite into Hive 
table with group by query

    ## What changes were proposed in this pull request?
    
    Currently, `INSERT INTO` with `GROUP BY` query tries to make at least 200 
files (default value of `spark.sql.shuffle.partition`), which results in lots 
of empty files.
    
    This PR makes Hive table overriding avoid creating empty files during 
overwrite into Hive table with group by query.
    
    ## How was this patch tested?
    
    Unittests in `InsertIntoHiveTableSuite`. This checks whether the given 
partition has data in it or not
    and creates/writes file only when it actually has data.
    
    Closes #8411

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

    $ git pull https://github.com/HyukjinKwon/spark pr/8411

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

    https://github.com/apache/spark/pull/12855.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 #12855
    
----
commit 80184556a48b22793ef2bdf991595cc845a9aded
Author: Keuntae Park <[email protected]>
Date:   2015-08-25T01:21:22Z

    do not make empty file when insert overwrite into Hive table

commit 46f085a2a13dbea616d2620bf8437e05cf99a573
Author: Keuntae Park <[email protected]>
Date:   2015-08-25T01:46:01Z

    Merge branch 'master' into NoEmptyInsert

commit 689252a6d531037ba74d998caca0991ad1798d4c
Author: Keuntae Park <[email protected]>
Date:   2015-08-25T04:06:04Z

    Merge remote-tracking branch 'upstream/master' into SPARK-10216

commit e2749d7bc78d6b64644cd7fcbf89fbda27e5688b
Author: Keuntae Park <[email protected]>
Date:   2015-08-25T04:07:37Z

    change test name to reflect issue number and name

commit acdc53778eb5f752d3a9462d7152aaa36df3ac41
Author: hyukjinkwon <[email protected]>
Date:   2016-05-03T00:55:26Z

    Stash chagnes

commit 9a89ed149300f1cd1699d52d8b0138d1c84fb468
Author: hyukjinkwon <[email protected]>
Date:   2016-05-03T00:56:56Z

    Rebase upstream

commit 57f2eccdcb2b8249142da22509068ceefbef04e1
Author: hyukjinkwon <[email protected]>
Date:   2016-05-03T01:22:59Z

    Add the function in hiveWriterContainers and polish test codes

----


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