Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DML] Add target attributes parsing for UPSERT and REPLACE #841

Open
am357 opened this issue Oct 13, 2022 · 0 comments
Open

[DML] Add target attributes parsing for UPSERT and REPLACE #841

am357 opened this issue Oct 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@am357
Copy link
Contributor

am357 commented Oct 13, 2022

Requested Solution/Feature

  • The current parsing of UPSERT INTO and REPLACE INTO does not support parsing of [ ( <attr name> [, <attr name> ]... ) ] in the following grammar; this issue is to track the effort for making this addition.
<upsert statement> ::= UPSERT INTO <table name> [ AS <alias> ] 
    [  ( <attr name> [, <attr name> ]... ) ]
        <values>
        
<replace statement> ::= REPLACE INTO <table name> [ AS <alias> ] 
    [  ( <attr name> [, <attr name> ]... ) ]
        <values>

Describe Alternatives

N/A.

Additional Context

N/A.

DoD (Definition of Done)

The following tests pass:

REPLACE INTO foo (a, b) SELECT bar.id, bar.name FROM bar

UPSERT INTO foo (a, b) SELECT bar.id, bar.name FROM bar

REPLACE INTO foo (a, b, c) VALUES (2, DEFAULT, 4)

UPSERT INTO foo (a, b) VALUES ('bar', DEFAULT)
@am357 am357 added the enhancement New feature or request label Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant