feat: Add full-featured Iceberg MERGE INTO conditional merges support and argument validation#3201
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Currently failing 1 Athena test:
Plan to fix on next commit. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Hi @pedrorfdez it looks like there is an error in |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Marking this pull request as stale due to inactivity. This helps our maintainers find and focus on the active pull requests. |
e7acaf0 to
04ad6e9
Compare
|
I will continue working on this again, thanks for the in-depth review @inbar-beehero will check it out. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
…bject) to match athena's read_sql_query dtype conversion
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Although CI CD tests passed, I'm still working on a few refinements in the code, so not ready to review yet |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Pull request ready to review |
…ses on 'conditional_merge' merge condition
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Marking this pull request as stale due to inactivity. This helps our maintainers find and focus on the active pull requests. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Feature or Bugfix
Detail
MERGE INTOoperations in _write_iceberg.py/to_icebergmerge_on_clause: CustomONstatement in theMERGE INTO ... USING ... ON [custom_expression]to allow<,<=,>and>=operators. Until now, only column equality was allowed. Risk of having more than one match in target table is warned in stringdocs.merge_condition: Added new accepted valueconditional_mergemerge_conditional_clauses: List of dictionaries specifying custom conditional clauses for theMERGE INTOstatement.Each dictionary should have:
- 'when': One of ['MATCHED', 'NOT MATCHED', 'NOT MATCHED BY SOURCE'] (case-insensitive)
- 'action': One of ['UPDATE', 'DELETE', 'INSERT'] (case-insensitive)
- 'condition': (optional) Additional SQL condition for the clause
- 'columns': (optional) List of columns to update or insert
Used only when merge_condition is 'conditional_merge'.
merge_cols,merge_on_clause,merge_match_nulls,merge_condition,merge_conditional_clauses,Relates
This is the first draft of the implementation, feel free to suggest any changes in the approach. I am open to suggestions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.