You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/07/17 04:52:00 UTC
[jira] [Commented] (CALCITE-5852) Enhance MERGE INTO statement
[ https://issues.apache.org/jira/browse/CALCITE-5852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743618#comment-17743618 ]
Julian Hyde commented on CALCITE-5852:
--------------------------------------
I don’t think this clarifies. I believe that the implementation of MERGE isn't complete. (See CALCITE-985.) So how can you enhance what doesn’t currently work?
> Enhance MERGE INTO statement
> ----------------------------
>
> Key: CALCITE-5852
> URL: https://issues.apache.org/jira/browse/CALCITE-5852
> Project: Calcite
> Issue Type: Improvement
> Reporter: hongyu guo
> Priority: Major
>
> In Calcite, MERGE INTO statement:
> {code:sql}
> merge:
> MERGE INTO tablePrimary [ [ AS ] alias ]
> USING tablePrimary
> ON booleanExpression
> [ WHEN MATCHED THEN UPDATE SET assign [, assign ]* ]
> [ WHEN NOT MATCHED THEN INSERT VALUES '(' value [ , value ]* ')' ]
> {code}
> SQL-2011 and postgres support for <merge when clause>:
> {code:sql}
> -- when matched clause
> WHEN MATCHED [ AND <search condition> ]
> THEN <merge update or delete specification>
> -- when not matched clause
> WHEN NOT MATCHED [ AND <search condition> ]
> THEN <merge insert specification>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)