You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "feiwang (Jira)" <ji...@apache.org> on 2019/09/28 09:33:00 UTC
[jira] [Updated] (SPARK-29262) DataFrameWriter insertIntoPartition
function
[ https://issues.apache.org/jira/browse/SPARK-29262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
feiwang updated SPARK-29262:
----------------------------
Description:
InsertIntoPartition is a useful function.
For SQL statement, relative syntax.
{code:java}
insert overwrite table tbl_a partition(p1=v1,p2=v2,...,pn=vn) select ...
{code}
In the example above, I specify all the partition key value, so it must be a static partition overwrite, regardless whether enable dynamic partition overwrite.
If we enable dynamic partition overwrite. For the sql below, it will only overwrite relative partition not whole table.
{code:java}
insert overwrite table tbl_a partition(p1,p2,...,pn) select ...
{code}
As far as now, dataFrame does not support insertIntoPartition.
It means that, for a partitioned table, if we insert overwrite by using dataFrame with dynamic partition overwrite disabled, it will always overwrite whole table.
So, we should support insertIntoPartition for dataFrameWriter.
was:
Do we have plan to support insertIntoPartition function for dataFrameWriter?
[~cloud_fan]
> DataFrameWriter insertIntoPartition function
> --------------------------------------------
>
> Key: SPARK-29262
> URL: https://issues.apache.org/jira/browse/SPARK-29262
> Project: Spark
> Issue Type: New Feature
> Components: SQL
> Affects Versions: 2.4.4
> Reporter: feiwang
> Priority: Minor
>
> InsertIntoPartition is a useful function.
> For SQL statement, relative syntax.
> {code:java}
> insert overwrite table tbl_a partition(p1=v1,p2=v2,...,pn=vn) select ...
> {code}
> In the example above, I specify all the partition key value, so it must be a static partition overwrite, regardless whether enable dynamic partition overwrite.
> If we enable dynamic partition overwrite. For the sql below, it will only overwrite relative partition not whole table.
> {code:java}
> insert overwrite table tbl_a partition(p1,p2,...,pn) select ...
> {code}
> As far as now, dataFrame does not support insertIntoPartition.
> It means that, for a partitioned table, if we insert overwrite by using dataFrame with dynamic partition overwrite disabled, it will always overwrite whole table.
> So, we should support insertIntoPartition for dataFrameWriter.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org