[ https://issues.apache.org/jira/browse/SPARK-29262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17060747#comment-17060747 ]
Dongjoon Hyun commented on SPARK-29262: --------------------------------------- I close this issue as a `Duplicate` of SPARK-28050. Please track this issue there. > 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: 3.1.0 > 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. > If we disable dynamic partition overwrite, it will overwrite whole table. > {code:java} > insert overwrite table tbl_a partition(p1,p2,...,pn) select ... > {code} > As far as now, dataFrame does not support overwrite a specific partition. > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org