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

Add list support to primary_key #377

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lucasfcnunes
Copy link

@lucasfcnunes lucasfcnunes commented Nov 3, 2024

Summary

Enhance the primary_key macro to accept a list of columns, allowing for primary keys with multiple columns. This improves flexibility in configuration.

With this PR it's now possible to do the following:

{{
    config(
        primary_key=['a', 'b'],
        order_by=['a', 'b'],
    )
}}
-- ...

Before, you would need to use the literal expression as follows primary_key='(a, b)'

Checklist

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@lucasfcnunes lucasfcnunes marked this pull request as ready for review November 3, 2024 01:20
Signed-off-by: Lucas Fernando Cardoso Nunes <[email protected]>
Signed-off-by: Lucas Fernando Cardoso Nunes <[email protected]>
@BentsiLeviav
Copy link
Contributor

Hi @lucasfcnunes

Thank you for your contribution!
Before reviewing your PR, please add an indication in the Changelog for your changes (Make sure to follow the structure).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants