[
https://issues.apache.org/jira/browse/CARBONDATA-3597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacky Li resolved CARBONDATA-3597.
----------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
> Support DataSet merge functionality in Carbon
> ---------------------------------------------
>
> Key: CARBONDATA-3597
> URL:
https://issues.apache.org/jira/browse/CARBONDATA-3597> Project: CarbonData
> Issue Type: New Feature
> Reporter: Ravindra Pesala
> Priority: Major
> Fix For: 2.0.0
>
> Attachments: Support DataSet Merge in CarboonData_V1.docx
>
> Time Spent: 14h 50m
> Remaining Estimate: 0h
>
> Merge dataset is essential to improve the performance of SCD and CDC scenarios and also it eases the development effort.
> The expected behavior as follows.
> SQL Syntax
> {code}
> MERGE INTO [db_name.]target_table [AS target_alias]
> USING [db_name.]source_table [AS source_alias]
> ON <merge_condition>
> [ WHEN MATCHED [ AND <condition> ] THEN <matched_actions> ]
> [ WHEN MATCHED [ AND <condition> ] THEN <matched_actions> ]
> [ WHEN NOT MATCHED [ AND <condition> ] THEN <not_matched_actions> ]
> {code}
>
> DataFrame API
> {code}
> targetDS.merge(sourceDS, _<condition>_).
> whenMatched(_<condition>_).
> updateExpr(updateMap).
> insertExpr(insertMap_u).
> whenNotMatched(_<condition>_).
> insertExpr(insertMap).
> whenNotMatchedAndExistsOnlyOnTarget(_<condition>_).
> delete().
> insertHistoryTableExpr(insertMap_d, <table_name>).
> execute()
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)